-
-
Notifications
You must be signed in to change notification settings - Fork 326
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
feat: add runners_pull_policies to support multiple pull policies #544
Conversation
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.
PR looks good, but test results in runner is not started. Rebased the PR also against develop. Nu clue what the issue is right now. Not more time to dig in further. Got the following error:
Failed to restart gitlab-runner.service: Unit not found.
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.
Just went over the PR again, made some small suggestion which fixed the non starting agent.
- used
allowed_pull_policies
- set default for old pull_policy to empty, so by default new one is used.
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.
Accepted my suggestions, tested and all good. Thanks for your contribution
🎉 This PR is included in version 5.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
First of all, thanks a lot for all the hard work on this module that makes our lives much easier! I'm wondering about this change and the above suggestions. It's quite nice that we can now specify allowed pull policies, but if I read the docs correctly this slightly changes the behaviour of the modified directives and now prevents us from specifying a "default" pull policy for runners. Setting Wouldn't it be better to have two different directives, actually? |
Thank you @npalm for reviewing and fixing the PR. I like that you added
I agree with @cinacio that using If it's OK, I can create two PRs: one to restore the default behaviour of |
I think I was a bit in a hurry to got all the too long open PRs merged. Thank you for pointing this out. Please go ahead make two PRs. That would be very welcome! |
Also see #511 |
Description
Support multiple Docker pull policies. The pull_policy parameter allows to specify a list of pull policies. The policies in the list will be attempted in order from left to right until a pull attempt is successful, or the list is exhausted.
https://docs.gitlab.com/runner/executors/docker.html#how-pull-policies-work
Migrations required
NO - A deprecation notice was added to description. In a future release the variable runners_pull_policy could be removed in favor of runners_pull_policies.
Verification
I have verified the examples (https://github.com/gmeligio/terraform-aws-gitlab-runner/actions/runs/3040828783):