From: Alexandru Avadanii Date: Tue, 25 Feb 2020 09:01:27 +0000 (+0100) Subject: iec: compass: Fix log permissions, curl redirect X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=commitdiff_plain;h=52b76e81ba1eaeacb7ee4c9d7307190568c7269d iec: compass: Fix log permissions, curl redirect - 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 --- diff --git a/jjb/iec/iec-compass-build.sh b/jjb/iec/iec-compass-build.sh index b403230..e604dfc 100755 --- a/jjb/iec/iec-compass-build.sh +++ b/jjb/iec/iec-compass-build.sh @@ -36,8 +36,11 @@ ln -s $COMPASS_WORK_DIR work 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 diff --git a/jjb/iec/iec-compass-deploy.sh b/jjb/iec/iec-compass-deploy.sh index 9db4c0b..443c115 100755 --- a/jjb/iec/iec-compass-deploy.sh +++ b/jjb/iec/iec-compass-deploy.sh @@ -46,4 +46,6 @@ echo "Compass Deploy successful" 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 diff --git a/jjb/iec/iec-compass-destroy.sh b/jjb/iec/iec-compass-destroy.sh index fbd448b..3c1993d 100755 --- a/jjb/iec/iec-compass-destroy.sh +++ b/jjb/iec/iec-compass-destroy.sh @@ -1,5 +1,7 @@ #!/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 diff --git a/jjb/iec/iec-fdn-install.sh b/jjb/iec/iec-fdn-install.sh index 40852df..e1a74fa 100755 --- a/jjb/iec/iec-fdn-install.sh +++ b/jjb/iec/iec-fdn-install.sh @@ -18,5 +18,7 @@ HOST_USER=root 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