7 echo "Uploading the Apex artifact. This could take some time..."
8 echo "--------------------------------------------------------"
11 # source the opnfv.properties to get ARTIFACT_VERSION
12 source $WORKSPACE/opnfv.properties
14 BUILD_DIRECTORY=${WORKSPACE}/.build
16 # clone releng repository
17 echo "Cloning releng repository..."
18 [ -d releng ] && rm -rf releng
19 git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
20 #this is where we import the siging key
21 if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then
22 source $WORKSPACE/releng/utils/gpg_import_key.sh
26 for artifact in $RPM_LIST $SRPM_LIST; do
27 echo "Signing artifact: ${artifact}"
28 gpg2 -vvv --batch --yes --no-tty \
29 --default-key opnfv-helpdesk@rt.linuxfoundation.org \
30 --passphrase besteffort \
31 --detach-sig $artifact
32 gsutil cp "$artifact".sig gs://$GS_URL/$(basename "$artifact".sig)
33 echo "Upload complete for ${artifact} signature"
38 time gpg2 -vvv --batch --yes --no-tty \
39 --default-key opnfv-helpdesk@rt.linuxfoundation.org \
40 --passphrase besteffort \
41 --detach-sig $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso
43 gsutil cp $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig
44 echo "ISO signature Upload Complete!"
48 # upload artifact and additional files to google storage
49 gsutil cp $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log
50 echo "ISO Upload Complete!"
51 RPM_INSTALL_PATH=$BUILD_DIRECTORY/noarch
52 RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL)
53 VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//')
54 for pkg in common undercloud onos; do
55 RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}"
57 SRPM_INSTALL_PATH=$BUILD_DIRECTORY
58 SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL)
59 VERSION_EXTENSION=$(echo $(basename $OPNFV_SRPM_URL) | sed 's/opnfv-apex-//')
60 for pkg in common undercloud onos; do
61 SRPM_LIST+=" ${SRPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}"
66 #This is where we upload the rpms
67 for artifact in $RPM_LIST $SRPM_LIST; do
68 echo "Uploading artifact: ${artifact}"
69 gsutil cp $artifact gs://$GS_URL/$(basename $artifact) > gsutil.iso.log
70 echo "Upload complete for ${artifact}"
72 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log
73 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log
77 # Uploads snapshot artifact and updated properties file
78 echo "Uploading snapshot artifacts"
79 gsutil cp $WORKSPACE/apex-csit-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log
80 gsutil cp $WORKSPACE/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log
81 echo "Upload complete for Snapshot"
84 if echo $WORKSPACE | grep csit > /dev/null; then
86 elif gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then
87 echo "Signing Key avaliable"
98 echo "--------------------------------------------------------"
100 echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
101 echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"