aboutsummaryrefslogtreecommitdiff
path: root/rpb-openembedded/publishers.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rpb-openembedded/publishers.sh')
-rwxr-xr-xrpb-openembedded/publishers.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/rpb-openembedded/publishers.sh b/rpb-openembedded/publishers.sh
index ae0f6035a0..ba9df1e935 100755
--- a/rpb-openembedded/publishers.sh
+++ b/rpb-openembedded/publishers.sh
@@ -1,17 +1,18 @@
#!/bin/bash
+set -ex
+
if [ -f ${WORKSPACE}/BUILD-INFO.txt ];then
BUILD_INFO="--build-info ${WORKSPACE}/BUILD-INFO.txt"
else
BUILD_INFO=""
fi
-if [ -z "${DEPLOY_DIR_IMAGE}" ] || [ -z "${PUB_DEST}" ] || [ -z "${PUBLISH_SERVER}" ]
+if [ -z "${DEPLOY_DIR_IMAGE}" ] || [ -z "${PUB_DEST}" ]
then
echo "== missing publishing variables =="
echo "DEPLOY_DIR_IMAGE = ${DEPLOY_DIR_IMAGE}"
echo "PUB_DEST = ${PUB_DEST}"
- echo "PUBLISH_SERVER = ${PUBLISH_SERVER}"
exit 1
fi
@@ -19,9 +20,8 @@ fi
test -d ${HOME}/bin || mkdir ${HOME}/bin
wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
time python3 ${HOME}/bin/linaro-cp.py \
- --server ${PUBLISH_SERVER} \
- ${BUILD_INFO} \
- ${DEPLOY_DIR_IMAGE}/ ${PUB_DEST}
+ ${BUILD_INFO} \
+ ${DEPLOY_DIR_IMAGE}/ ${PUB_DEST}
# Some (most?) of our OE jobs publish images in a $DISTRO subfolder, so we need
# to strip the folder when we create the 'latest' link
@@ -30,12 +30,11 @@ time python3 ${HOME}/bin/linaro-cp.py \
# Warning. Bashism here. But we use bash, so.. use Bash regexp to catch if PUB_DEST
# ends with BUILD_NUMBER or not, and we catch trailing '/' just in case it's there
+
if [[ "$PUB_DEST" =~ ^.*/${BUILD_NUMBER}/?$ ]]; then
time python3 ${HOME}/bin/linaro-cp.py \
- --server ${PUBLISH_SERVER} \
- --make-link ${PUB_DEST}
+ --make-link ${PUB_DEST}
else
time python3 ${HOME}/bin/linaro-cp.py \
- --server ${PUBLISH_SERVER} \
- --make-link $(dirname ${PUB_DEST})
+ --make-link $(dirname ${PUB_DEST})
fi