From b0283da50dadc52379a45c19c665d061e52d9c38 Mon Sep 17 00:00:00 2001 From: Gregory Giguashvili Date: Tue, 14 Nov 2023 10:21:23 +0200 Subject: [PATCH] Reorganize test image blueprints to maximally build in layer1 --- test/bin/build_images.sh | 26 +++++++-- test/bin/ci_phase_iso_build.sh | 41 +++++++------- test/bin/manage_build_cache.sh | 53 +++++++++++++++---- .../group1/rhel93.image-installer | 0 .../group1/rhel93.toml | 0 ...-microshift-previous-minor.image-installer | 0 .../rhel92-microshift-previous-minor.toml | 0 .../{group2 => group1}/rhel93-crel.toml | 0 .../{group2 => group1}/rhel93-source.toml | 0 9 files changed, 85 insertions(+), 35 deletions(-) rename test/image-blueprints/{layer3-periodic => layer1-base}/group1/rhel93.image-installer (100%) rename test/image-blueprints/{layer3-periodic => layer1-base}/group1/rhel93.toml (100%) rename test/image-blueprints/{layer2-presubmit/group1 => layer1-base/group2}/rhel92-microshift-previous-minor.image-installer (100%) rename test/image-blueprints/{layer2-presubmit/group1 => layer1-base/group2}/rhel92-microshift-previous-minor.toml (100%) rename test/image-blueprints/layer3-periodic/{group2 => group1}/rhel93-crel.toml (100%) rename test/image-blueprints/layer3-periodic/{group2 => group1}/rhel93-source.toml (100%) diff --git a/test/bin/build_images.sh b/test/bin/build_images.sh index 6aec576a06d..d5a64d76f04 100755 --- a/test/bin/build_images.sh +++ b/test/bin/build_images.sh @@ -113,7 +113,14 @@ get_image_parent() { base=$(basename "${blueprint_filename}" .toml) if [[ "${base}" =~ '-' ]]; then base="${base//-*/}" - get_blueprint_name "${IMAGEDIR}/blueprints/${base}.toml" + + local name + name=$(find "${TESTDIR}/image-blueprints" -name "${base}.toml") + if [ -n "${name}" ] ; then + get_blueprint_name "${name}" + else + echo "" + fi else echo "" fi @@ -251,6 +258,11 @@ do_group() { record_junit "${groupdir}" "${blueprint}" "depsolve" "FAILED" fi + if ${COMPOSER_DRY_RUN} ; then + echo "Skipping the composer start operation" + continue + fi + parent_args="" parent=$(get_image_parent "${template}") if [ -n "${parent}" ]; then @@ -271,7 +283,7 @@ do_group() { buildid_list="${buildid_list} ${buildid}" done - if ${BUILD_INSTALLER}; then + if ${BUILD_INSTALLER} && ! ${COMPOSER_DRY_RUN}; then for image_installer in "${groupdir}"/*.image-installer; do blueprint=$("${GOMPLATE}" --file "${image_installer}") echo "Building image-installer from ${blueprint}" @@ -382,7 +394,7 @@ usage() { fi cat - <