From: Yolanda Robla Date: Tue, 3 Mar 2020 12:51:31 +0000 (+0100) Subject: Remove whole site folder before deploying X-Git-Tag: akraino_r3~15^2 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=81dcdb780ce7be841f36f2cb76fa40bcd77b6a59;p=kni%2Finstaller.git Remove whole site folder before deploying In some jobs the $HOME/.kni/$SITE_NAME folder was not being cleaned, just the final_manifests one. This was causing existing requirements to be reused, instead of picking the new ones. Remove all the times to avoid problems when new requirements need to be pulled. Signed-off-by: Yolanda Robla Change-Id: I9206846aa78f507d455f65a1c7bc71331c0c5d22 --- diff --git a/ci/kni_deploy_aws.sh b/ci/kni_deploy_aws.sh index 775f1d8..07a7d70 100755 --- a/ci/kni_deploy_aws.sh +++ b/ci/kni_deploy_aws.sh @@ -40,7 +40,7 @@ KUSTOMIZATION_FILE=${BLUEPRINT_PATH}/sites/${SITE_NAME}/00_install-config/kustom 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 +sudo rm -rf /$HOME/.kni/${SITE_NAME} || true ./knictl fetch_requirements file://${BLUEPRINT_PATH}/sites/${SITE_NAME} 2>&1 | tee ${WORKSPACE}/aws_requirements.log ./knictl prepare_manifests ${SITE_NAME} 2>&1 | tee ${WORKSPACE}/aws_manifests.log diff --git a/ci/kni_deploy_baremetal.sh b/ci/kni_deploy_baremetal.sh index 8ed0903..ad7544e 100755 --- a/ci/kni_deploy_baremetal.sh +++ b/ci/kni_deploy_baremetal.sh @@ -25,7 +25,7 @@ wget https://raw.githubusercontent.com/openshift/installer/master/scripts/mainte chmod a+x ./virsh-cleanup.sh sudo -E bash -c "yes Y | ./virsh-cleanup.sh" -rm -rf $HOME/.kni/$SITE_NAME +rm -rf $HOME/.kni/$SITE_NAME || true pushd $HOME/go/src/gerrit.akraino.org/kni/installer ./knictl fetch_requirements file://${WORKSPACE}/$SITE_NAME ./knictl prepare_manifests $SITE_NAME diff --git a/ci/kni_deploy_gcp.sh b/ci/kni_deploy_gcp.sh index c70d42f..ac93c31 100755 --- a/ci/kni_deploy_gcp.sh +++ b/ci/kni_deploy_gcp.sh @@ -40,7 +40,7 @@ KUSTOMIZATION_FILE=${BLUEPRINT_PATH}/sites/${SITE_NAME}/00_install-config/kustom 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 +sudo rm -rf /$HOME/.kni/${SITE_NAME} || true ./knictl fetch_requirements file://${BLUEPRINT_PATH}/sites/${SITE_NAME} 2>&1 | tee ${WORKSPACE}/gcp_requirements.log ./knictl prepare_manifests ${SITE_NAME} 2>&1 | tee ${WORKSPACE}/gcp_manifests.log diff --git a/ci/kni_deploy_libvirt.sh b/ci/kni_deploy_libvirt.sh index 4062e86..8950b6e 100755 --- a/ci/kni_deploy_libvirt.sh +++ b/ci/kni_deploy_libvirt.sh @@ -38,7 +38,6 @@ sudo -E bash -c "yes Y | ./virsh-cleanup.sh" # add the right credentials to kni mkdir $HOME/.kni || true -cp $WORKSPACE/akraino-secrets/coreos-pull-secret $HOME/.kni/pull-secret.json || true cp $HOME/.ssh/id_rsa.pub $HOME/.kni/id_rsa.pub || true # replace site path with a local ref to the cloned blueprint @@ -47,7 +46,7 @@ KUSTOMIZATION_FILE=${BLUEPRINT_PATH}/sites/${SITE_NAME}/00_install-config/kustom 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 +sudo rm -rf /$HOME/.kni/${SITE_NAME} || true ./knictl fetch_requirements file://${BLUEPRINT_PATH}/sites/${SITE_NAME} 2>&1 | tee ${WORKSPACE}/libvirt_requirements.log ./knictl prepare_manifests ${SITE_NAME} 2>&1 | tee ${WORKSPACE}/libvirt_manifests.log