Fix periodic CI jobs

Periodic jobs don't have zuul.change defined, since there is no change
being tested. This causes an early failure when referencing zuul.change
to set the image tag for built images. In periodic jobs we'll never need
to build images because there is no dependent kolla change under test.

Change-Id: I6d9d81cf17b7d0d7aaf87cd96418c904c46681f2
This commit is contained in:
Mark Goddard 2019-04-14 11:23:33 +01:00
parent 4efa2012a0
commit 2b7a9dc207
2 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@
kolla_ansible_src_dir: "{{ ansible_env.PWD }}/src/{{ zuul.project.canonical_hostname }}/openstack/kolla-ansible"
kolla_ansible_local_src_dir: "{{ zuul.executor.work_root }}/src/{{ zuul.project.canonical_hostname }}/openstack/kolla-ansible"
need_build_image: false
build_image_tag: "change_{{ zuul.change | default('none') }}"
tasks:
# FIXME: in multi node env, api_interface may be different on each node.
- name: detect api_interface_name variable
@ -141,7 +142,7 @@
BASE_DISTRO: "{{ base_distro }}"
INSTALL_TYPE: "{{ install_type }}"
BUILD_IMAGE: "{{ need_build_image }}"
TAG: "change_{{ zuul.change }}"
TAG: "{{ build_image_tag }}"
KOLLA_SRC_DIR: "{{ ansible_env.HOME }}/src/git.openstack.org/openstack/kolla"
ACTION: "{{ scenario }}"

View File

@ -23,7 +23,7 @@ openstack_service_workers: "1"
# NOTE(Jeffrey4l): use different a docker namespace name in case it pull image from hub.docker.io when deplying
docker_namespace: "lokolla"
docker_registry: "{{ api_interface_address }}:4000"
openstack_release: "change_{{ zuul.change }}"
openstack_release: "{{ build_image_tag }}"
{% else %}
# use docker hub images
docker_namespace: "kolla"