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: Icf23f769ca1c82f20da77f2a0d67b788ca14facb
Aaron Sheffield 4 weeks ago
parent
commit
144642c490
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

@@ -30,7 +30,7 @@
30 30
       environment:
31 31
         BRANCH: "{{ zuul.branch }}"
32 32
         CHANGE: "{{ zuul.change }}"
33
-        COMMIT: "{{ zuul.newrev }}"
33
+        COMMIT: "{{ zuul.newrev | default('') }}"
34 34
         PATCHSET: "{{ zuul.patchset }}"
35 35
       register: image_tags
36 36
 
@@ -83,7 +83,7 @@
83 83
               DOCKER_REGISTRY: "quay.io"
84 84
               IMAGE_PREFIX: "airshipit"
85 85
               IMAGE_TAG: "{{ item }}"
86
-              COMMIT: "{{ zuul.newrev }}"
86
+              COMMIT: "{{ zuul.newrev | default('') }}"
87 87
               PUSH_IMAGE: "true"
88 88
           with_items: "{{ image_tags.stdout_lines }}"
89 89
 

Loading…
Cancel
Save