Browse Source

Updating Docker Gate use of zuul.newrev

- Zuul updated ansible to 2.7, no longer allows missing variables.
- Using default value when it isn't available.

Based on Aaron Sheffield's PS for Pegleg: https://review.openstack.org/#/c/645631/

Change-Id: I49de55a9d74e2004786845c1e35ba49e53f71df1
Aaron Sheffield 4 weeks ago
parent
commit
62b9bf2a6c
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      tools/gate/playbooks/docker-image-build.yaml

+ 2
- 2
tools/gate/playbooks/docker-image-build.yaml View File

@@ -32,7 +32,7 @@
32 32
       environment:
33 33
         BRANCH: "{{ zuul.branch }}"
34 34
         CHANGE: "{{ zuul.change }}"
35
-        COMMIT: "{{ zuul.newrev }}"
35
+        COMMIT: "{{ zuul.newrev | default('') }}"
36 36
         PATCHSET: "{{ zuul.patchset }}"
37 37
       register: image_tags
38 38
 
@@ -116,7 +116,7 @@
116 116
               DOCKER_REGISTRY: "quay.io"
117 117
               IMAGE_PREFIX: "airshipit"
118 118
               IMAGE_TAG: "{{ item }}"
119
-              COMMIT: "{{ zuul.newrev }}"
119
+              COMMIT: "{{ zuul.newrev | default('') }}"
120 120
               PUSH_IMAGE: "true"
121 121
           with_items: "{{ image_tags.stdout_lines }}"
122 122
 

Loading…
Cancel
Save