7 Commits

Author SHA1 Message Date
Jean-Philippe Evrard
9bc813daa7 Dockerhub now returns 200 for DELETEs
We need to adapt to this, else the promote pipeline fails.

Change-Id: Ie617efc8b9a7fefb565c67c796d42c87a1ee998f
2019-06-20 10:20:40 +00: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
9cbb8c0ac6 Fix docker image retag
The missing "." from the content-type headers was causing us
to downgrade image manifests from v1 to to v2 when promoting them.
That can cause problems since many tools no longer support v1
manifests.

Notably, the docker registry is one of them.

Change-Id: I35a5d29933669b80b49578587ebe6db8e13e62ad
2019-03-01 15:55:24 -08:00
James E. Blair
885f02e217 Handle multiple docker images with the same repository
So that users can specify two docker image builds for the same
repository, but with different tags, ensure that the temporary
change_ tag attached to the image also includes the final tag
name.

This allows this configuration to work:

docker_images:
  - repository: foo/image
    context: opensuse
    tags:
      - opensuse-latest
  - repository: foo/image
    context: ubuntu
    tags:
      - ubuntu-latest

Change-Id: I917dcf8a74fc864ea06dc70bdb3e212dc170eb48
2019-02-27 11:08:44 -08: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