Commit Graph

6 Commits

Author SHA1 Message Date
Albin Vass d0e2016592 Add loop var policy to ansible-lint
This adds a custom ansible-lint rule at .rules/ZuulJobsNamespaceLoopVar.py
that enforces the loop var policy described at:
https://zuul-ci.org/docs/zuul-jobs/policy.html#ansible-loops-in-roles

It also updates existing roles to follow the policy.

Change-Id: I92b2ff56a1c2702542fc07b316f1809087a4c92f
2020-04-29 17:20:59 +02:00
Clark Boylan 4ed66807a0 Use unique loop vars to avoid conflicts
We have to be careful about avoiding outer loop loop_var conflicts in
ansible. Because the zuul-jobs roles are meant to be reconsumed
elsewhere we should not use 'item' loopvars and instead set them to
something a bit more unique.

We use a zj_ prefix to try and be unique to this repo and document this
convention.

Change-Id: I20b9327a914890e9eafcb2b36dc8c23fb472bc8f
2020-02-04 12:23:36 -08:00
James E. Blair 61a76f95f0 Add retries to promote-docker-image
This should make this step more robust to remote failures.

Change-Id: I3f3d643ac5285027bda909ac6d55d8959a4b4f79
2019-03-20 09:02:18 -07:00
James E. Blair 3e3f836435 docker: add ability to restrict repository names
This allows us to construct a job which allows users to pass in a
secret (via pass-to-parent) which includes not only the user/pass,
but also a restriction for what docker image repositories may be
accessed using that user/pass.  This allows an operator to create
one credential, and then use that credential in multiple secrets
for multiple projects, each with a distinct restriction on where
images may be uploaded.

Change-Id: I7a3cf97a16d34c76df8601990954e1f2b0e498f5
2019-01-18 09:43:11 -08:00
James E. Blair 1c827e4761 docker: prefix role vars
These probably should have been prefixed to start with.  The roles
are brand new, not publicised, and likely not widely used.  I think
we can merge this without announcement or deprecation.

Change-Id: I7825ef6fee1325b6d4fcc179032652eb5530d016
2019-01-17 11:28:37 -08:00
James E. Blair 8640466183 Add docker image promotion roles
This adds three roles which can be used to build a docker image
promotion system.

Change-Id: Iefd9278cdb90bbbaab93a4d23c055e9289fde5ba
2019-01-15 14:03:00 -08:00