Allow to run role passed from variable

Change-Id: Icf47ee108dcfcb9792f83d16a5d6bdbcd70eb22f
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
This commit is contained in:
Andrii Ostapenko 2021-02-28 17:25:53 -06:00
parent a7708d75f8
commit aa3e83ab72
No known key found for this signature in database
GPG Key ID: F3E83668DBB223B3
2 changed files with 10 additions and 2 deletions

View File

@ -32,6 +32,10 @@
pip:
name: docker
executable: pip3
- name: Execute custom role
include_role:
name: "{{ pre_build_role }}"
when: pre_build_role is defined
- name: Publish images
block:
- make:
@ -43,7 +47,7 @@
DOCKER_REGISTRY: "{{ docker_registry }}"
GCP_SDK: "{{ gcp_sdk }}"
IMAGE_PREFIX: "{{ image_prefix | default('airshipit') }}"
IMAGE_TAG: "{{ image_tag | default(zuul.image_tag) | default('latest') }}"
IMAGE_TAG: "{{ image_tag | default('latest') }}"
LABEL: "{{ image_label | default('org.airshipit.build=community') }}"
NO_PROXY: "{{ proxy.noproxy }}"
PUSH_IMAGE: "false"

View File

@ -32,6 +32,10 @@
pip:
name: docker
executable: pip3
- name: Execute custom role
include_role:
name: "{{ pre_build_role }}"
when: pre_build_role is defined
- name: Publish images
block:
- docker_login:
@ -47,7 +51,7 @@
DOCKER_REGISTRY: "{{ docker_registry }}"
GCP_SDK: "{{ gcp_sdk }}"
IMAGE_PREFIX: "{{ image_prefix | default('airshipit') }}"
IMAGE_TAG: "{{ image_tag | default(zuul.image_tag) | default('latest') }}"
IMAGE_TAG: "{{ image_tag | default('latest') }}"
LABEL: "{{ image_label | default('org.airshipit.build=community') }}"
NO_PROXY: "{{ proxy.noproxy }}"
PUSH_IMAGE: "true"