- follow HTTP redirect (`curl -L`) where appropiate;
- fix workspace permissions so logs uploading can archive log files
before pushing them to Nexus (by changing the file owner to the
current user/group);
- destroy: do not break on error, in case some resources are missing,
keep trying to cleanup the rest anyway;
Change-Id: I7696b3ce7172b74f5b8977353ad27b70b264933b
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
sudo docker rm -f `sudo docker ps | grep compass | cut -f1 -d' '` || true
-curl -s http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true
+curl -sL http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true
./build.sh
+# Fix permissions so we can archive log files before pushing to Nexus
+sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"
+
exit 0
rm -rf "$COMPASS_WORK_DIR"
rm -rf work
+# Fix permissions so we can archive log files before pushing to Nexus
+sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"
exit 0
#!/bin/bash
-set -e
+
+# Do not exit this script if one of the cleanup steps fails
+set +e
rm -rf compass4nfv
sudo virsh destroy host1
export HOST_USER
./startup.sh
+# Fix permissions so we can archive log files before pushing to Nexus
+sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"
exit 0