Remove whole site folder before deploying 73/2273/1
authorYolanda Robla <yroblamo@redhat.com>
Tue, 3 Mar 2020 12:51:31 +0000 (13:51 +0100)
committerYolanda Robla <yroblamo@redhat.com>
Tue, 3 Mar 2020 12:53:00 +0000 (13:53 +0100)
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 <yroblamo@redhat.com>
Change-Id: I9206846aa78f507d455f65a1c7bc71331c0c5d22

ci/kni_deploy_aws.sh
ci/kni_deploy_baremetal.sh
ci/kni_deploy_gcp.sh
ci/kni_deploy_libvirt.sh

index 775f1d8..07a7d70 100755 (executable)
@@ -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
 
index 8ed0903..ad7544e 100755 (executable)
@@ -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
index c70d42f..ac93c31 100755 (executable)
@@ -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
 
index 4062e86..8950b6e 100755 (executable)
@@ -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