Browse Source

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
master
James E. Blair 2 months ago
parent
commit
9cbb8c0ac6
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      roles/promote-docker-image/tasks/promote-retag-inner.yaml

+ 2
- 2
roles/promote-docker-image/tasks/promote-retag-inner.yaml View File

@@ -4,7 +4,7 @@
4 4
     url: "https://registry.hub.docker.com/v2/{{ image.repository }}/manifests/change_{{ zuul.change }}_{{ image_tag }}"
5 5
     status_code: 200
6 6
     headers:
7
-      Accept: "application/vnd.docker.distribution.manifestv2+json"
7
+      Accept: "application/vnd.docker.distribution.manifest.v2+json"
8 8
       Authorization: "Bearer {{ token.json.token }}"
9 9
     return_content: true
10 10
   register: manifest
@@ -16,7 +16,7 @@
16 16
     status_code: 201
17 17
     body: "{{ manifest.content | string }}"
18 18
     headers:
19
-      Content-Type: "application/vnd.docker.distribution.manifestv2+json"
19
+      Content-Type: "application/vnd.docker.distribution.manifest.v2+json"
20 20
       Authorization: "Bearer {{ token.json.token }}"
21 21
 - name: Delete the current change tag
22 22
   no_log: true

Loading…
Cancel
Save