Closed raisedadead closed 6 years ago
@raisedadead I dont understand. serverless.yml
configures deployment, not build notifications.
Yes, I was confused as well, but this is the place where the webhook is configured
Actually in 2 places: serverless.yml
and .travis.yml
. You can't configure Travis notifications much and it would surprise me if it would notify for forks. If it does we probably want to look in alternative way of doing notifications. See https://docs.travis-ci.com/user/notifications/#Default-notification-settings
Btw, you are right that forks that use sls deploy will not notify our channel, which we probably do not want. Agreed that is enough reason to put it under a variable.
That still leaves Travis notifications. I'm not convinced they work at the moment, I did get a green buid notification when staging recovered in my mailbox but see nothing on the Gitter channel.
Happy to look into both issues I mentioned above tomorrow.
Notes to self: the Travis integrations works, but only show in the 'activity stream in the right'. This is not what is configured in .travis.yml
. If I hit the endpoint in the room settings for "custom" I get a {"error":"Not Found"}
. Is this "custom" integration broken? Need to do some testing here..
Ooh annoying, I can't get anything to send to the "custom" integration I've configured, but if I create a new one it works. It's a bit disappointing in that it only shows up in right pane and is very easy to miss.
Yes, that's how gitter is setup for notification. I think it in future, we can have a combination of the camperbot and camper-gh-bot doing this for us.
I did get a green buid notification when staging recovered in my mailbox but see nothing on the Gitter channel.
Yup.. I have no clue on that, but my fork's builds do end up showing on that sidebar. Which we as a org do not want.
Sounds like we want to:
.travis
, but remove the current webhook, create a new one and store it as as secure variable so it is not available to forksserverless.yml
to use the secure variable so local deploys from forks do not announce their deployments for use.How does that approach sound to you @raisedadead ?
A day of Yak shaving! Today I learned:
Related PR: https://github.com/freeCodeCamp/open-api/pull/118 -sparing you the spurious PRs and commits of me adding ngrok webhooks to see if Travis was actually sending anything and if so what, and adding silly things to break builds.
serverless-pluging-notification
has a maintainer that package accepted changes but did not publish a new NPM package. I fairly quickly found out -as expected that you can just add the git url including commit you want and it Just Works.
however if you then think you are clever and use Yarn, things can fall apart if your toolchain relies on NPM -I guess I hit a bug but am currently out of time, energy or interest to chase that up. In this cases Serverless uses NPM internally and expects npm ls
to work as expected. Well it won't 🤪
My hack was to fork the NPM package, bump the version and publish my copied package -I've notified the maintainer of the original package that I'd be happy to nuke it after he gets his act together.
Related PRs https://github.com/maasglobal/serverless-plugin-notification/pull/5 https://github.com/freeCodeCamp/open-api/pull/112
/cc @Bouncey for your entertainment 🍿
https://github.com/freeCodeCamp/open-api/blob/staging/serverless.yml#L37
This is going deliver payloads from all forks