Skip to content
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

Merged
merged 6 commits into from
Dec 17, 2019
Merged

Add .gitlab-ci.yml #9

merged 6 commits into from
Dec 17, 2019

Conversation

jgmize
Copy link
Contributor

@jgmize jgmize commented Dec 16, 2019

Run git push conditionally within update_docker.sh
@jgmize jgmize requested a review from pmac December 16, 2019 20:24
@jgmize jgmize self-assigned this Dec 16, 2019
@pmac
Copy link
Member

pmac commented Dec 16, 2019

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.

Copy link
Member

@pmac pmac left a 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
Copy link
Member

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
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! removing now.

@pmac
Copy link
Member

pmac commented Dec 16, 2019

We could potentially quickly add triggering the Gitlab pipeline via a nucleus post-save signal, or even cron running somewhere, and use only: triggers in the config:

https://docs.gitlab.com/ee/ci/yaml/README.html#onlyexcept-basic

@jgmize
Copy link
Contributor Author

jgmize commented Dec 17, 2019

Thanks for the excellent feedback and suggestions, @pmac! I've applied your suggested changes and k8s/cron.yaml from 7f053a4 in iowa-a and it is triggering the pipelines in the gitlab branch. Once this is merged I'll apply the change in b02b5db so that it triggers the pipelines in the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants