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
This commit is contained in:
Aaron Sheffield 2019-03-22 12:53:01 -05:00
parent 4a9f9d7ab5
commit 144642c490
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@
environment: environment:
BRANCH: "{{ zuul.branch }}" BRANCH: "{{ zuul.branch }}"
CHANGE: "{{ zuul.change }}" CHANGE: "{{ zuul.change }}"
COMMIT: "{{ zuul.newrev }}" COMMIT: "{{ zuul.newrev | default('') }}"
PATCHSET: "{{ zuul.patchset }}" PATCHSET: "{{ zuul.patchset }}"
register: image_tags register: image_tags
@ -83,7 +83,7 @@
DOCKER_REGISTRY: "quay.io" DOCKER_REGISTRY: "quay.io"
IMAGE_PREFIX: "airshipit" IMAGE_PREFIX: "airshipit"
IMAGE_TAG: "{{ item }}" IMAGE_TAG: "{{ item }}"
COMMIT: "{{ zuul.newrev }}" COMMIT: "{{ zuul.newrev | default('') }}"
PUSH_IMAGE: "true" PUSH_IMAGE: "true"
with_items: "{{ image_tags.stdout_lines }}" with_items: "{{ image_tags.stdout_lines }}"