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 <yroblamo@redhat.com>
Change-Id: I3a0e517d64268f2287bb19ca50d2e5f7431ded22
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
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