From aaeedd1fac0a4988adb876d731cfe034b12c5048 Mon Sep 17 00:00:00 2001 From: Sreejith Punnapuzha Date: Wed, 17 Mar 2021 16:35:55 -0500 Subject: [PATCH] Add target path configuration to airshipctl config As part of set-manifest, currently the default directory is getting added to targetPath field in airshipctl config. This commit adds option for user to set the target path via environment variable. Signed-off-by: Sreejith Punnapuzha Change-Id: Ie88e12059663fca75572d081630746233dbd365c --- tools/deployment/22_test_configs.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/deployment/22_test_configs.sh b/tools/deployment/22_test_configs.sh index bfb58e274..04ac81601 100755 --- a/tools/deployment/22_test_configs.sh +++ b/tools/deployment/22_test_configs.sh @@ -19,6 +19,7 @@ set -xe export AIRSHIP_SITE_NAME=${AIRSHIP_SITE_NAME:-"test-site"} export AIRSHIP_CONFIG_METADATA_PATH=${AIRSHIP_CONFIG_METADATA_PATH:-"treasuremap/manifests/site/$AIRSHIP_SITE_NAME/metadata.yaml"} +export AIRSHIP_CONFIG_MANIFEST_DIRECTORY=${AIRSHIP_CONFIG_MANIFEST_DIRECTORY:-"/tmp/treasuremap"} # Primary repo options export AIRSHIP_CONFIG_PHASE_REPO_URL=${AIRSHIP_CONFIG_PHASE_REPO_URL:-"${TREASUREMAP_PROJECT}"} @@ -36,12 +37,14 @@ export AIRSHIPCTL_REF=${AIRSHIPCTL_REF:-"$(git rev-parse HEAD)"} airshipctl config set-manifest treasuremap_ci \ --repo airshipctl \ --url "${AIRSHIPCTL_REPO_URL}" \ - --commithash "${AIRSHIPCTL_REF}" + --commithash "${AIRSHIPCTL_REF}" \ + --target-path "${AIRSHIP_CONFIG_MANIFEST_DIRECTORY}" airshipctl config set-manifest treasuremap_ci \ --repo primary \ --url "${AIRSHIP_CONFIG_PHASE_REPO_URL}" \ - --commithash "${TREASUREMAP_REF}" + --commithash "${TREASUREMAP_REF}" \ + --target-path "${AIRSHIP_CONFIG_MANIFEST_DIRECTORY}" airshipctl config set-context ephemeral-cluster --manifest treasuremap_ci airshipctl config set-context target-cluster --manifest treasuremap_ci