From 5cf9d418c0846f7e0e430b8d5e8ce1b6f7f6fe99 Mon Sep 17 00:00:00 2001 From: Marios Andreou Date: Wed, 19 Jul 2023 18:09:40 +0300 Subject: [PATCH] Use update-promotion-* file and add new override_docker_image_tag var In downstream periodic minor update job we should use update-promotion-testing-hash-* release config file. The file defines all required variables to run rhos job including release related vars. Emit_release should be skipped as it is not not used in downstream job. This change introduces also override_docker_image_tag variable. This variable defines if container images should be overridden during minor update to pull from registry already created container images. Change-Id: I22803fdac815338943cc1c24cf9d87c4ad7f7d98 --- roles/run-test/templates/toci_gate_test.sh.j2 | 8 ++++++++ roles/run-test/templates/toci_quickstart.sh.j2 | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/roles/run-test/templates/toci_gate_test.sh.j2 b/roles/run-test/templates/toci_gate_test.sh.j2 index eed63f55c..f212e105f 100755 --- a/roles/run-test/templates/toci_gate_test.sh.j2 +++ b/roles/run-test/templates/toci_gate_test.sh.j2 @@ -130,8 +130,15 @@ fi PERIODIC=1 QUICKSTART_RELEASE="promotion-testing-hash-${QUICKSTART_RELEASE}" EMIT_RELEASES_EXTRA_ARGS="$EMIT_RELEASES_EXTRA_ARGS --is-periodic" +{% if osp_release is defined %} +if is_featureset minor_update "{{ job_featureset_file }}"; then +# In downstream minor update job we use special, seperate promotion file +QUICKSTART_RELEASE="update-promotion-testing-hash-${STABLE_RELEASE:-master}" +fi +{% endif %} {% endif %} +{% if osp_release is not defined %} if [[ -f "$RELEASES_SCRIPT" ]] && [[ {{ featureset }} =~ 037|047|050|056|065|067|068 ]]; then if [[ -f "$RELEASES_FILE_OUTPUT" ]]; then @@ -147,6 +154,7 @@ if [[ -f "$RELEASES_SCRIPT" ]] && [[ {{ featureset }} =~ 037|047|050|056|065|067 $EMIT_RELEASES_EXTRA_ARGS fi fi +{% endif %} # Import gated tripleo-upgrade in oooq for upgrades/updates jobs if [[ -d $TRIPLEO_ROOT/tripleo-upgrade ]]; then diff --git a/roles/run-test/templates/toci_quickstart.sh.j2 b/roles/run-test/templates/toci_quickstart.sh.j2 index 35f6d6e13..db05287a1 100755 --- a/roles/run-test/templates/toci_quickstart.sh.j2 +++ b/roles/run-test/templates/toci_quickstart.sh.j2 @@ -115,14 +115,22 @@ declare -A PLAYBOOKS_ARGS=( ) # minor_update variable is set to true only in featureset068 -# We need to override container_registry_release to get ip of docker registry and dlrn hash from content provider which provides containers with 'current' tag +# In downstream we do not use content provider and we pull already created images, so we only need to override container images tag with newer one(override_docker_image_tag) +# In upstream we need to override container_registry_release to get ip of docker registry and dlrn hash from content provider which provides containers with 'current' tag # Containers are required to be pulled both to undercloud and overcloud to run minor update on the same branch # Also to trigger update of undercloud and overcloud from correct playbook, overcloud_update and undercloud_update extra-vars are set to false respectively if is_featureset minor_update "{{ job_featureset_file }}"; then +{% if osp_release is defined %} + PLAYBOOKS_ARGS=( + ["multinode-undercloud-upgrade.yml"]="--extra-vars overcloud_update='false' --extra-vars override_docker_image_tag='true' " + ["multinode-overcloud-update.yml"]="--extra-vars undercloud_update='false' --extra-vars override_docker_image_tag='true'" + ) +{% else %} PLAYBOOKS_ARGS=( ["multinode-undercloud-upgrade.yml"]=" --extra-vars container_registry_release='${QUICKSTART_RELEASE}-current' --extra-vars promote_source='current' --extra-vars overcloud_update='false' " ["multinode-overcloud-update.yml"]=" --extra-vars container_registry_release='${QUICKSTART_RELEASE}-current' --extra-vars promote_source='current' --extra-vars undercloud_update='false' " ) +{% endif %} fi mkdir -p $LOCAL_WORKING_DIR