2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2016 Ericsson AB and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
14 if [[ "$JOB_NAME" =~ "merge" ]]; then
15 echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties"
16 # get the properties file for the Fuel ISO built for a merged change
17 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties
19 # get the latest.properties file in order to get info regarding latest artifact
20 echo "Downloading http://$GS_URL/latest.properties"
21 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
24 # check if we got the file
25 [[ -f latest.properties ]] || exit 1
27 # source the file so we get artifact metadata
28 source latest.properties
30 # echo the info about artifact that is used during the deployment
31 OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/}
32 echo "Using $OPNFV_ARTIFACT for deployment"
34 # check if we already have the ISO to avoid redownload
35 # disabled for the timebeing - needs adjustments
36 #ISO_STORE=$HOME/opnfv/iso_store/fuel
37 #if [[ -f "$ISO_STORE/$OPNFV_ARTIFACT" ]]; then
38 # echo "ISO already exists. Skipping the download"
39 # ln -s $ISO_STORE/$OPNFV_ARTIFACT $WORKSPACE/opnfv.iso
40 # ls -al $WORKSPACE/opnfv.iso
45 echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL"
46 echo "This could take some time..."
47 echo "--------------------------------------------------------"
51 curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
54 ls -al $WORKSPACE/opnfv.iso
57 echo "--------------------------------------------------------"