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 # check if we built something
15 if [ -f $WORKSPACE/.noupload ]; then
16 echo "Nothing new to upload. Exiting."
17 /bin/rm -f $WORKSPACE/.noupload
23 echo "Uploading the $INSTALLER_TYPE artifact. This could take some time..."
26 # source the opnfv.properties to get ARTIFACT_VERSION
27 source $WORKSPACE/opnfv.properties
29 # upload artifact and additional files to google storage
30 gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \
31 gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
32 gsutil cp $WORKSPACE/opnfv.properties \
33 gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
34 if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
35 gsutil cp $WORKSPACE/opnfv.properties \
36 gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
37 elif [[ "$JOB_NAME" =~ "merge" ]]; then
38 echo "Uploaded Fuel ISO for a merged change"
42 -h "Content-Type:text/html" \
43 -h "Cache-Control:private, max-age=0, no-transform" \
44 gs://$GS_URL/*.properties > /dev/null 2>&1
47 -h "Cache-Control:private, max-age=0, no-transform" \
48 gs://$GS_URL/*.iso > /dev/null 2>&1
52 echo "--------------------------------------------------------"
54 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
56 echo "--------------------------------------------------------"