5 RPM_WORKDIR=$WORKSPACE/rpmbuild
6 RPM_DIR=$RPM_WORKDIR/RPMS/x86_64/
9 # source the opnfv.properties to get ARTIFACT_VERSION
10 source $WORKSPACE/opnfv.properties
12 # upload property files
13 gsutil cp $WORKSPACE/opnfv.properties gs://$OPNFV_ARTIFACT_URL/opnfv.properties > gsutil.properties.log 2>&1
14 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
16 echo "Uploading the barometer RPMs to artifacts.opnfv.org"
17 echo "---------------------------------------------------"
20 gsutil -m cp -r $RPM_DIR/* gs://$OPNFV_ARTIFACT_URL > $WORKSPACE/gsutil.log 2>&1
22 # Check if the RPMs were pushed
23 gsutil ls gs://$OPNFV_ARTIFACT_URL > /dev/null 2>&1
24 if [[ $? -ne 0 ]]; then
25 echo "Problem while uploading barometer RPMs to gs://$OPNFV_ARTIFACT_URL!"
26 echo "Check log $WORKSPACE/gsutil.log on the appropriate build server"
31 -h "Cache-Control:private, max-age=0, no-transform" \
32 gs://$OPNFV_ARTIFACT_URL/*.rpm > /dev/null 2>&1
35 -h "Content-Type:text/html" \
36 -h "Cache-Control:private, max-age=0, no-transform" \
37 gs://$GS_URL/latest.properties \
38 gs://$OPNFV_ARTIFACT_URL/opnfv.properties > /dev/null 2>&1
41 echo "--------------------------------------------------------"
43 echo "Artifact is available at $OPNFV_ARTIFACT_URL"
45 #cleanup the RPM repo from the build machine.