-
Notifications
You must be signed in to change notification settings - Fork 14
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
chore(ci): Use Github Actions and Semantic Release #78
Conversation
Skipping CI for Draft Pull Request. |
Why do we not wanna use our own tools? if you feel there is something lacking from the tools can you share them with me, please? I understand it could be a personnel choice. |
Why to create own tools when something like AICoE-CI is lacking in many ways and while it may be useful for certain Python flows, it needs to be either heavily extended or modified to support other usecases - like Node.js. This PR allows us:
I think the semantic release and GitHub Actions ecosystems are very well made and polished and easy to use. No need to recreate it in AICoE-CI if we can just pick it up and use it. These are just some initial thoughts from top of my head why I wanted to use this here and why I chose to use the same set of tools before for slack-first and other projects of mine. |
Thank you for the elaborate explanation. This is good to know 👍 |
0e7c8ec
to
22095fb
Compare
Signed-off-by: Tomas Coufal <[email protected]>
@mimotej @harshad16 PTAL |
Looks great! And I agree with stated above AICOE-CI is mainly focused on Python workflows and it would need changes to properly support Node.js, so it is better to use other tools :) . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
thanks 💯
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: harshad16 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Resolves #70
Complementary CI part to #77
Supported workflows (all demos linked below include an additional
drop me
commit - I needed to point my fork to my personal quay account)Pull request
On a new pull request attempt to test (via
npm test
) and build the controller (s2i build, using.s2ibase
file content for builder image) and peribolos (from Dockerfile)Links:
tumido#15
https://github.com/tumido/peribolos-as-a-service/actions/runs/2260924150
Push
On each push to
main
run a similar check as for pull request with addition of pushing both containers to quay. Images are labeled aslatest
as well as by commit hash.Links:
tumido@0439360
https://github.com/tumido/peribolos-as-a-service/actions/runs/2260912052
Release
Triggered from issue template labeled as
kind/release
. At first it checks if the issue author has write permission to the repo to establish if it's maintainer who triggered it. Then it does the same checks as for PR (test + build both). If successful it uses semantic release to identify if release is needed. If so, it generate changelog (updateCHANGELOG.md
), bumppackage.json
andpackage-lock.json
versions and update image pointers in stage to the future release. Then it pushes the changes tomain
and creates a tag matching the new version. After that it checkouts the new tag and builds (using the same strategies as in above mentioned workflows) and pushed both container images to quay. Pushed images are labeled by the tag and commit hash. All progress is reported in the release issue in a comment. If whole release was successful, issue is closed.Links:
https://github.com/tumido/peribolos-as-a-service/issues/16
https://github.com/tumido/peribolos-as-a-service/actions/runs/2260978488
tumido@d7a9366
Promote stage images to prod
Triggered from issue template labeled as
kind/promote
. At first it checks if the issue author has write permission to the repo to establish if it's maintainer who triggered it. If so, it usesyq
to get images list fromstage/kustomization.yaml
and inject it intoprod/kustomization.yaml
. Then it proceeds to create a PR from it, linking back to the original issue. All progress is reported in the release issue in a comment.Links:
https://github.com/tumido/peribolos-as-a-service/issues/17
https://github.com/tumido/peribolos-as-a-service/actions/runs/2261016095
tumido#18
Shortcommings
Only gap in the whole process is promotion of the new release to stage, where there might be a 1-2 min window between the images being available on quay, while the updated staging manifests are already in the repo - which kinda make sense, since we should not have images public before the revision is even tracked in VCS...
Future work
latest
+ releases.