-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add .gitlab-ci.yml #9
Conversation
jgmize
commented
Dec 16, 2019
•
edited
Loading
edited
- Move release notes Jenkins jobs to Gitlab mozmeao/infra#1152
- Run git push conditionally within update_docker.sh
- https://gitlab.com/mozmeao/release-notes/-/jobs/381130486
- after merge:
- disable Jenkins job
- kubectl apply -f k8s/cron.yaml
Run git push conditionally within update_docker.sh
My only hesitation is that, if I'm reading this right, the fastest schedule that can be run on gitlab.com is once per hour, due to this setting. We currently run the update every 5 or 15 min I believe. This will mostly be fine, but it means we may have to manually kick off an update or two on release days. Moving nucleus to directly commit to git will also fix this, so I hope to accelerate that work, but for now this could be an issue. |
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.
See my comment. I think we need to do something to ensure it's pushing to the right git repo.
update_docker.sh
Outdated
if [[ "$1" == "commit" ]]; then | ||
if git status --porcelain | grep -E "\.json$"; then | ||
git add ./releases/ | ||
git commit -m "Update release data" | ||
git rev-parse HEAD > "$UPDATE_FILE" | ||
git push |
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.
to which repo will this push? I think with this setup that would be Gitlab? We'll probably need to do something like git push git@github.com/mozilla/release-notes.git
.gitlab-ci.yml
Outdated
@@ -0,0 +1,8 @@ | |||
update: | |||
only: | |||
- master |
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.
I don't think we want this to run on commits to master since this job commits to master.
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.
good catch! removing now.
We could potentially quickly add triggering the Gitlab pipeline via a nucleus post-save signal, or even cron running somewhere, and use https://docs.gitlab.com/ee/ci/yaml/README.html#onlyexcept-basic |
Thanks for the excellent feedback and suggestions, @pmac! I've applied your suggested changes and |