Apex: fix deploy and test run job to pass empty refspec
[releng.git] / jjb / compass4nfv / compass-download-artifact.sh
1 #!/bin/bash
2 set -o errexit
3 set -o nounset
4 set -o pipefail
5
6 # log info to console
7 echo "Downloading the $INSTALLER_TYPE artifact. This could take some time..."
8 echo "--------------------------------------------------------"
9 echo
10
11 # get the latest.properties file in order to get info regarding latest artifact
12 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
13 curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties
14
15 # check if we got the file
16 [[ -f $BUILD_DIRECTORY/latest.properties ]] || exit 1
17
18 # source the file so we get OPNFV vars
19 source $BUILD_DIRECTORY/latest.properties
20
21 # download the file
22 curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
23
24 # list the file
25 ls -al $BUILD_DIRECTORY/compass.iso
26
27 echo
28 echo "--------------------------------------------------------"
29 echo "Done!"