-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI/CD setup #1026
CI/CD setup #1026
Conversation
wtf, github
Oh interesting! So Travis test-runs, but this auto-publishes, nice! This'll definitely fix the GitHub I'm a little scared to automatically NPM tho because (?) each commit doesn't always have a package version change (?) and even if/when do, without full test coverage I'd be worried to publish without additional review (running PANIC, etc.). Pulling! Thanks <3 <3 <3 You may need to help/remind me about the tokens, as I don't know how those work ( @hillct and I have tried a bunch of times to get docker to work and it won't, happy to give people credentials to get it to work tho). |
Don't worry :) Each commit will trigger a CI test run. But only if all test pass, that commit is explicitly tagged as release (e.g. I am happy to help with credentials bit. If you want we can do a quick screenshare session (or just do some hand holding on discord) to set this up. Just ping me, @amark ! |
Another ping :) All the infos are above - but if you want help: It should take only be a few minutes :) |
Last year we looked at reimplementing the dockrhub integration but it appears the Docker Hub dev team isn't keeping up with changed to Github permissions management, so it became an issue. It's certainly worth implementing a Github Actions CI pipeline, bypassings 3rd party tools like Travis, and I'm all for integrating the existing docker build with a better integrated workflow. While it makes sense o do this with docker images, I'd hesitate to fully automate the NPM packaging process without extensive testing, and separating these two updates. |
Can you expand on this - I don't see the issue yet.
Well, they are separate workflows. Feel free to start with Docker and test the That said: I am not sure why you feel |
@tcurdt what he was saying is when we changed permission in GitHub it didn't automatically update (ever) with Docker, or something like that. So it... just wasn't working, period, something broken or other. |
Alright. I think it will be easier to fix the tests once the CI is running. Let me give you a quick rundown of the PR.
It's only adding the github actions to the repo. Tests will be run on every push and every PR.
The more interesting part is the CD setup. For this you have to set the following secrets on the repo:
NPM_AUTH_TOKEN
from https://www.npmjs.com/settings/amark/tokensDOCKERHUB_TOKEN
(andDOCKERHUB_USERNAME
) from https://hub.docker.com/settings/securityPAT
from https://github.com/settings/tokensIf there is successful build that was tagged with a prefix of
v
(e.g.v0.2020.1115
) and the version matches with what is inpackage.json
, it will start the publishing process. It will create a source only github release and push the release to npm and the image to dockerhub. We probably need to disabled the existing dockerhub integration first.Once this is running it would probably be good to also add build/release notifications to be published on discord.
Let me know what you think or if you need help.
Would be great to have clearly tagged releases :)