6 - 'onosfw-verify-{stream}'
7 - 'onosfw-daily-{stream}'
8 - 'onosfw-build-{stream}'
10 # only master branch is enabled at the moment to keep no of jobs sane
17 branch: 'stable/{stream}'
18 gs-pathname: '/{stream}'
23 ########################
25 ########################
27 name: 'onosfw-verify-{stream}'
29 disabled: '{obj:disabled}'
36 - 'opnfv-build-ubuntu-defaults'
40 credentials-id: '{ssh-credentials}'
41 refspec: '$GERRIT_REFSPEC'
42 choosing-strategy: 'gerrit'
47 - patchset-created-event:
48 exclude-drafts: 'false'
49 exclude-trivial-rebase: 'false'
50 exclude-no-code-change: 'false'
51 - draft-published-event
52 - comment-added-contains-event:
53 comment-contains-value: 'recheck'
54 - comment-added-contains-event:
55 comment-contains-value: 'reverify'
57 - project-compare-type: 'ANT'
58 project-pattern: '{project}'
60 - branch-compare-type: 'ANT'
61 branch-pattern: '**/{branch}'
64 pattern: 'docs/**|.gitignore'
67 - 'builder-onosfw-helloworld'
70 name: 'onosfw-daily-{stream}'
72 disabled: '{obj:disabled}'
77 - 'opnfv-build-ubuntu-defaults'
81 credentials-id: '{ssh-credentials}'
90 - project: 'onosfw-build-{stream}'
95 name: 'onosfw-build-{stream}'
97 disabled: '{obj:disabled}'
102 - 'opnfv-build-ubuntu-defaults'
105 default: '$GS_BASE{gs-pathname}'
106 description: "Directory where the build artifact will be located upon the completion of the build."
110 credentials-id: '{ssh-credentials}'
115 - 'builder-onosfw-helloworld'
117 ########################
119 ########################
121 name: 'builder-onosfw-build'
129 # log info to console
130 echo "Starting the build of $PROJECT. This could take some time..."
131 echo "--------------------------------------------------------"
134 # create the cache directory if it doesn't exist
135 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
136 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
138 # set OPNFV_ARTIFACT_VERSION
139 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
143 ./ci/build.sh $BUILD_DIRECTORY/
145 # list the build artifacts
146 ls -al $BUILD_DIRECTORY
148 # save information regarding artifact into file
150 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
151 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
152 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
153 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
154 echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/onosfw.iso | cut -d' ' -f1)"
155 echo "OPNFV_BUILD_URL=$BUILD_URL"
156 ) > $BUILD_DIRECTORY/opnfv.properties
158 echo "--------------------------------------------------------"
163 name: 'builder-onosfw-upload-artifact'
171 # log info to console
172 echo "Uploading the $INSTALLER artifact. This could take some time..."
173 echo "--------------------------------------------------------"
176 # source the opnfv.properties to get ARTIFACT_VERSION
177 source $BUILD_DIRECTORY/opnfv.properties
179 # upload artifact and additional files to google storage
180 gsutil cp $BUILD_DIRECTORY/onosfw.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
181 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
182 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
185 echo "--------------------------------------------------------"
187 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
191 name: 'builder-onosfw-helloworld'