From: Yolanda Robla Date: Thu, 17 Oct 2019 10:41:39 +0000 (+0200) Subject: Parameterize the name of the blueprint X-Git-Tag: akraino_r2~17 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=f5734452fbf913fb2d0b0a6c56f3cdbd5c1d6879;p=kni%2Finstaller.git Parameterize the name of the blueprint Now we don't have a single blueprint, but two. So we cannot have the name of the blueprint hardcoded anymore. By looking at the env vars provided by jenkins, we can reuse the GIT_CHECKOUT_DIR env var instead, that will contain the name of the blueprint. Signed-off-by: Yolanda Robla Change-Id: I3a0e517d64268f2287bb19ca50d2e5f7431ded22 --- diff --git a/ci/kni_deploy_aws.sh b/ci/kni_deploy_aws.sh index 3a9a867..775f1d8 100755 --- a/ci/kni_deploy_aws.sh +++ b/ci/kni_deploy_aws.sh @@ -35,9 +35,9 @@ mkdir $HOME/.kni || true cp $WORKSPACE/akraino-secrets/coreos-pull-secret $HOME/.kni/pull-secret.json || true # replace site path with a local ref to the cloned blueprint -BLUEPRINT_PATH="${WORKSPACE}/blueprint-pae/" +BLUEPRINT_PATH="${WORKSPACE}/${GIT_CHECKOUT_DIR}/" KUSTOMIZATION_FILE=${BLUEPRINT_PATH}/sites/${SITE_NAME}/00_install-config/kustomization.yaml -sed -i "s#- git::https://gerrit.akraino.org/r/kni/blueprint-pae.git/#- file://${BLUEPRINT_PATH}#g" ${KUSTOMIZATION_FILE} +sed -i "s#- git::https://gerrit.akraino.org/r/kni/${GIT_CHECKOUT_DIR}.git/#- file://${BLUEPRINT_PATH}#g" ${KUSTOMIZATION_FILE} # start the workflow sudo rm -rf /$HOME/.kni/${SITE_NAME}/final_manifests || true diff --git a/ci/kni_deploy_libvirt.sh b/ci/kni_deploy_libvirt.sh index f83c39d..2f47a8f 100755 --- a/ci/kni_deploy_libvirt.sh +++ b/ci/kni_deploy_libvirt.sh @@ -42,9 +42,9 @@ cp $WORKSPACE/akraino-secrets/coreos-pull-secret $HOME/.kni/pull-secret.json || cp $HOME/.ssh/id_rsa.pub $HOME/.kni/id_rsa.pub || true # replace site path with a local ref to the cloned blueprint -BLUEPRINT_PATH="${WORKSPACE}/blueprint-pae/" +BLUEPRINT_PATH="${WORKSPACE}/${GIT_CHECKOUT_DIR}/" KUSTOMIZATION_FILE=${BLUEPRINT_PATH}/sites/${SITE_NAME}/00_install-config/kustomization.yaml -sed -i "s#- git::https://gerrit.akraino.org/r/kni/blueprint-pae.git/#- file://${BLUEPRINT_PATH}#g" ${KUSTOMIZATION_FILE} +sed -i "s#- git::https://gerrit.akraino.org/r/kni/${GIT_CHECKOUT_DIR}.git/#- file://${BLUEPRINT_PATH}#g" ${KUSTOMIZATION_FILE} # start the workflow sudo rm -rf /$HOME/.kni/${SITE_NAME}/final_manifests || true