4 - 'apex-verify-{stream}'
5 - 'apex-merge-{stream}'
6 - 'apex-daily-{stream}'
8 # stream: branch with - in place of / (eg. stable-arno)
9 # branch: branch (eg. stable/arno)
20 name: 'apex-verify-{stream}'
24 project-type: freestyle
29 artifactDaysToKeep: -1
34 gs-pathname: '{gs-pathname}'
42 default: ssh://gerrit.opnfv.org:29418/$PROJECT
43 description: "Used for overriding the GIT URL coming from parameters macro."
47 credentials-id: '{ssh-credentials}'
48 refspec: '$GERRIT_REFSPEC'
49 choosing-strategy: 'gerrit'
52 - ssh-agent-credentials:
53 user: '{ssh-credentials}'
58 - patchset-created-event:
59 exclude-drafts: 'false'
60 exclude-trivial-rebase: 'false'
61 exclude-no-code-change: 'false'
62 - draft-published-event
63 - comment-added-contains-event:
64 comment-contains-value: 'recheck'
65 - comment-added-contains-event:
66 comment-contains-value: 'reverify'
68 - project-compare-type: 'ANT'
69 project-pattern: 'apex'
71 - branch-compare-type: 'ANT'
72 branch-pattern: '**/master'
79 - 'apex-workspace-cleanup'
82 name: 'apex-merge-{stream}'
84 # builder-merge job to run JJB update
86 # This job's purpose is to update all the JJB
90 project-type: freestyle
95 artifactDaysToKeep: -1
100 gs-pathname: '{gs-pathname}'
108 default: ssh://gerrit.opnfv.org:29418/$PROJECT
109 description: "Used for overriding the GIT URL coming from parameters macro."
112 - gerrit-trigger-scm:
113 credentials-id: '{ssh-credentials}'
115 choosing-strategy: 'default'
118 - ssh-agent-credentials:
119 user: '{ssh-credentials}'
124 - change-merged-event
125 - comment-added-contains-event:
126 comment-contains-value: 'remerge'
128 - project-compare-type: 'ANT'
129 project-pattern: 'apex'
131 - branch-compare-type: 'ANT'
132 branch-pattern: '**/master'
133 forbidden-file-paths:
139 - 'apex-workspace-cleanup'
142 name: 'apex-daily-{stream}'
144 # Job template for daily builders
146 # Required Variables:
147 # stream: branch with - in place of / (eg. stable)
148 # branch: branch (eg. stable)
153 project-type: freestyle
156 daysToKeep: '{build-days-to-keep}'
157 numToKeep: '{build-num-to-keep}'
158 artifactDaysToKeep: '{build-artifact-days-to-keep}'
159 artifactNumToKeep: '{build-artifact-num-to-keep}'
165 gs-pathname: '{gs-pathname}'
170 credentials-id: '{ssh-credentials}'
175 - ssh-agent-credentials:
176 user: '{ssh-credentials}'
183 - 'apex-upload-artifact'
184 - 'apex-workspace-cleanup'
186 ########################
188 ########################
193 name: BUILD_DIRECTORY
194 default: $WORKSPACE/build_output
195 description: "Directory where the build artifact will be located upon the completion of the build."
197 name: CACHE_DIRECTORY
198 default: $HOME/opnfv/cache/{gs-pathname}
199 description: "Directory where the cache to be used during the build is located."
202 default: https://gerrit.opnfv.org/gerrit/$PROJECT
203 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
206 default: artifacts.opnfv.org/$PROJECT/{gs-pathname}
207 description: "URL to Google Storage."
211 description: "Build Flags"
213 ########################
215 ########################
224 # log info to console
225 echo "Starting the build of Apex using OpenStack Master packages. This will take some time..."
226 echo "---------------------------------------------------------------------------------------"
228 # create the cache directory if it doesn't exist
229 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
230 # set OPNFV_ARTIFACT_VERSION
231 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
234 ./build.sh $FLAGS -v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
235 # list the contents of BUILD_OUTPUT directory
236 ls -al $BUILD_DIRECTORY
237 # save information regarding artifact into file
239 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
240 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
241 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
242 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
243 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
244 echo "OPNFV_BUILD_URL=$BUILD_URL"
245 ) > $WORKSPACE/opnfv.properties
247 echo "--------------------------------------------------------"
250 name: 'apex-workspace-cleanup'
258 # delete everything that is in $WORKSPACE
259 /bin/rm -rf $WORKSPACE
262 name: 'apex-upload-artifact'
270 # log info to console
271 echo "Uploading the Apex artifact. This could take some time..."
272 echo "--------------------------------------------------------"
275 # source the opnfv.properties to get ARTIFACT_VERSION
276 source $WORKSPACE/opnfv.properties
278 # upload artifact and additional files to google storage
279 gsutil cp $BUILD_DIRECTORY/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
280 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
281 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
284 echo "--------------------------------------------------------"
286 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
289 #######################
291 ########################
295 - timed: '0 11 * * *'