5 RPM_LIST=$WORKSPACE/ci/utilities/rpms_list
6 RPM_WORKDIR=$WORKSPACE/rpmbuild
7 RPM_DIR=$RPM_WORKDIR/RPMS/x86_64/
10 # source the opnfv.properties to get ARTIFACT_VERSION
11 source $WORKSPACE/opnfv.properties
13 # Check if all the appropriate RPMs were generated
14 echo "Checking if all the Barometer RPMs were created"
15 echo "-----------------------------------------------"
20 ls $RPM_DIR > list_of_gen_pack
22 echo "Can't access folder $RPM_DIR with rpm packages"
23 echo "Barometer nightly build FAILED"
27 for PACKAGENAME in `cat $RPM_LIST`
29 if ! grep -q $PACKAGENAME list_of_gen_pack
31 echo "$PACKAGENAME is missing"
32 echo "Barometer nightly build FAILED"
37 #remove the file you no longer need.
40 echo "Uploading the barometer RPMs to artifacts.opnfv.org"
41 echo "---------------------------------------------------"
44 gsutil -m cp -r $RPM_DIR/* gs://$OPNFV_ARTIFACT_URL > $WORKSPACE/gsutil.log 2>&1
46 # Check if the RPMs were pushed
47 gsutil ls gs://$OPNFV_ARTIFACT_URL > /dev/null 2>&1
48 if [[ $? -ne 0 ]]; then
49 echo "Problem while uploading barometer RPMs to gs://$OPNFV_ARTIFACT_URL!"
50 echo "Check log $WORKSPACE/gsutil.log on the appropriate build server"
53 # upload property files only if build is successful
54 gsutil cp $WORKSPACE/opnfv.properties gs://$OPNFV_ARTIFACT_URL/opnfv.properties > gsutil.properties.log 2>&1
55 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
59 -h "Cache-Control:private, max-age=0, no-transform" \
60 gs://$OPNFV_ARTIFACT_URL/*.rpm > /dev/null 2>&1
63 -h "Content-Type:text/html" \
64 -h "Cache-Control:private, max-age=0, no-transform" \
65 gs://$GS_URL/latest.properties \
66 gs://$OPNFV_ARTIFACT_URL/opnfv.properties > /dev/null 2>&1
69 echo "--------------------------------------------------------"
71 echo "Artifact is available at $OPNFV_ARTIFACT_URL"
73 #cleanup the RPM repo from the build machine.