From b2fddf30fd291d40ed8c36bd0594230f594e4d55 Mon Sep 17 00:00:00 2001 From: "Anderson, Craig (ca846m)" Date: Tue, 6 Apr 2021 08:36:45 -0700 Subject: [PATCH] Change zuul workdir to match image-builder jezogwza@gmail.com requested a change from "config" to "manifests", and this change makes zuul params reflective of this. Allow proper operation of "find" with symlinks. Change-Id: I1a20a1d6e2d8af2bd5212b654c7e0a1279a9c625 --- .zuul.yaml | 2 +- image-builder/Makefile | 6 ++++-- playbooks/airship-images-build.yaml | 2 +- playbooks/airship-images-publish.yaml | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 20b3c02..5e48030 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -21,7 +21,7 @@ https: "" noproxy: "" makefile_chdir: "{{ zuul.project.src_dir }}" - image_config_dir: config + image_config_dir: manifests image_prefix: airshipit image_label: org.airshipit.build=community image_tag: latest diff --git a/image-builder/Makefile b/image-builder/Makefile index 30bfa3a..7998a3f 100644 --- a/image-builder/Makefile +++ b/image-builder/Makefile @@ -112,7 +112,8 @@ ifeq ($(IMAGE_TYPE), iso) sudo -E tools/cut_image.sh $(IMAGE_TYPE) $(WORKDIR)/iso $(IMAGE) "$(PROXY)" "$(NO_PROXY)" else # Assemble all images based on configs defined in each subdirectory - iterDirs=`find $(QCOW_BUNDLE) -maxdepth 1 -mindepth 1 -type d -exec basename {} \;` + # Trailing / allows proper function with symlinks + iterDirs="$(find $(QCOW_BUNDLE)/ -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)" for subdir in $$iterDirs; do # QCOW configs export osconfig_params="$(QCOW_BUNDLE)/$$subdir/osconfig-vars.yaml" @@ -135,7 +136,8 @@ ifneq ($(QCOW_BUNDLE_DIRS), ) bundleDirs="$(QCOW_BUNDLE_DIRS)" else # Assemble all images based on configs defined in each $(IMAGE_TYPE)* subdirectory - bundleDirs=`find $(WORKDIR) -maxdepth 1 -mindepth 1 -name "qcow-bundle*" -type d -exec basename {} \;` + # Trailing / allows proper function with symlinks + bundleDirs="$(find $(WORKDIR)/ -maxdepth 1 -mindepth 1 -name "qcow-bundle*" -type d -exec basename {} \;)" endif for bundledir in $$bundleDirs; do export QCOW_BUNDLE="$(WORKDIR)/$$bundledir" diff --git a/playbooks/airship-images-build.yaml b/playbooks/airship-images-build.yaml index 0963973..d2f3a2d 100644 --- a/playbooks/airship-images-build.yaml +++ b/playbooks/airship-images-build.yaml @@ -54,5 +54,5 @@ PROXY: "{{ proxy.http }}" QCOW_CONF_DIRS: "{{ qcow_conf_dirs | default('') }}" USE_PROXY: "{{ proxy.enabled | lower }}" - WORKDIR: "{{ image_config_dir | default('config') }}" + WORKDIR: "{{ image_config_dir | default('manifests') }}" become: True diff --git a/playbooks/airship-images-publish.yaml b/playbooks/airship-images-publish.yaml index e2f9ec5..a9eca0c 100644 --- a/playbooks/airship-images-publish.yaml +++ b/playbooks/airship-images-publish.yaml @@ -60,5 +60,5 @@ PROXY: "{{ proxy.http }}" QCOW_CONF_DIRS: "{{ qcow_conf_dirs | default('') }}" USE_PROXY: "{{ proxy.enabled | lower }}" - WORKDIR: "{{ image_config_dir | default('config') }}" + WORKDIR: "{{ image_config_dir | default('manifests') }}" become: True