6 - lf_cmake_sonar: &lf_cmake_sonar
10 # Default parameters #
11 ######################
15 build-dir: '$WORKSPACE/target'
20 git-url: '$GIT_URL/$PROJECT'
21 github-url: 'https://github.com'
22 install-prefix: '$BUILD_DIR/output'
25 sonar-scanner-version: 3.3.0.1492
26 sonarcloud-api-token: ''
27 sonarcloud-organization: ''
28 sonarcloud-project-key: ''
29 submodule-recursive: true
31 submodule-disable: false
37 project-type: freestyle
39 disabled: '{disable-job}'
42 - lf-infra-properties:
43 build-days-to-keep: '{build-days-to-keep}'
46 - lf-infra-parameters:
50 lftools-version: '{lftools-version}'
51 - lf-cmake-parameters:
52 build-dir: '{build-dir}'
53 cmake-opts: '{cmake-opts}'
54 install-prefix: '{install-prefix}'
55 make-opts: '{make-opts}'
59 build-timeout: '{build-timeout}'
60 jenkins-ssh-credential: '{jenkins-ssh-credential}'
64 - shell: '{pre-build}'
66 # Switch this to the sonar wrapper when JJB 2.0 is available
68 SONAR_HOST_URL=https://sonarcloud.io
69 SONAR_SCANNER_VERSION={sonar-scanner-version}
70 PROJECT_KEY={sonarcloud-project-key}
71 PROJECT_ORGANIZATION={sonarcloud-organization}
72 API_TOKEN={sonarcloud-api-token}
73 - shell: !include-raw-escape: ../shell/cmake-sonar.sh
74 - lf-provide-maven-settings-cleanup
80 name: '{project-name}-cmake-sonar'
81 id: gerrit-cmake-sonar
86 - lf-infra-gerrit-scm:
87 branch: '$GERRIT_BRANCH'
88 jenkins-ssh-credential: '{jenkins-ssh-credential}'
90 refspec: '$GERRIT_REFSPEC'
91 submodule-recursive: '{submodule-recursive}'
92 submodule-timeout: '{submodule-timeout}'
93 submodule-disable: '{submodule-disable}'
94 choosing-strategy: gerrit
99 server-name: '{gerrit-server-name}'
101 - comment-added-contains-event:
102 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(stage-release)$'
104 - project-compare-type: 'ANT'
105 project-pattern: '{project}'
107 - branch-compare-type: 'ANT'
108 branch-pattern: '**/{branch}'
111 name: '{project-name}-cmake-sonar'
112 id: github-cmake-sonar
117 - lf-infra-properties:
118 build-days-to-keep: '{build-days-to-keep}'
120 url: '{github-url}/{github-org}/{project}'
123 - lf-infra-github-scm:
124 url: '{git-clone-url}{github-org}/{project}'
125 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
127 submodule-recursive: '{submodule-recursive}'
128 submodule-timeout: '{submodule-timeout}'
129 submodule-disable: '{submodule-disable}'
130 choosing-strategy: default
131 jenkins-ssh-credential: '{jenkins-ssh-credential}'
134 - timed: '{obj:cron}'
141 - lf_cmake_stage: &lf_cmake_stage
144 ######################
145 # Default parameters #
146 ######################
149 build-days-to-keep: 7
150 build-dir: '$WORKSPACE/target'
155 git-url: '$GIT_URL/$PROJECT'
156 github-url: 'https://github.com'
157 install-prefix: '$BUILD_DIR/output'
159 mvn-global-settings: global-settings
162 submodule-recursive: true
163 submodule-timeout: 10
164 submodule-disable: false
167 #####################
168 # Job Configuration #
169 #####################
171 project-type: freestyle
173 disabled: '{disable-job}'
176 - lf-infra-properties:
177 build-days-to-keep: '{build-days-to-keep}'
180 - lf-infra-parameters:
184 - lf-cmake-parameters:
185 build-dir: '{build-dir}'
186 cmake-opts: '{cmake-opts}'
187 install-prefix: '{install-prefix}'
188 make-opts: '{make-opts}'
191 default: '{nexus-group-id}'
192 description: 'Project Group ID in Nexus to upload to.'
194 name: STAGING_PROFILE_ID
195 default: '{staging-profile-id}'
196 description: 'Nexus staging profile ID.'
203 Project version to stage release as. There are 2 methods for
206 1) Defined explicitly here.
207 2) Leave this value blank and set /tmp/artifact_version
209 Use method 2 in conjunction with 'pre-build' configuration to
210 generate the artifact_version automatically from files in the
211 project's repository. For example with pre-build script:
214 MAJOR_VERSION="$(grep 'set(OCIO_VERSION_MAJOR' CMakeLists.txt \
215 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
216 MINOR_VERSION="$(grep 'set(OCIO_VERSION_MINOR' CMakeLists.txt \
217 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
218 PATCH_VERSION="$(grep 'set(OCIO_VERSION_PATCH' CMakeLists.txt \
219 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
220 echo "${{MAJOR_VERSION}}.${{MINOR_VERSION}}.${{PATCH_VERSION}}" > /tmp/artifact_version
224 build-timeout: '{build-timeout}'
225 jenkins-ssh-credential: '{jenkins-ssh-credential}'
229 - lf-provide-maven-settings:
230 global-settings-file: '{mvn-global-settings}'
231 settings-file: '{mvn-settings}'
232 - lf-infra-create-netrc:
234 - shell: '{pre-build}'
235 - shell: !include-raw-escape: ../shell/cmake-build.sh
236 - shell: !include-raw-escape: ../shell/cmake-stage.sh
237 - lf-provide-maven-settings-cleanup
243 name: '{project-name}-cmake-stage-{stream}'
244 id: gerrit-cmake-stage
249 - lf-infra-gerrit-scm:
250 branch: '$GERRIT_BRANCH'
251 jenkins-ssh-credential: '{jenkins-ssh-credential}'
253 refspec: '$GERRIT_REFSPEC'
254 submodule-recursive: '{submodule-recursive}'
255 submodule-timeout: '{submodule-timeout}'
256 submodule-disable: '{submodule-disable}'
257 choosing-strategy: gerrit
260 - timed: '{obj:cron}'
262 server-name: '{gerrit-server-name}'
264 - comment-added-contains-event:
265 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(stage-release)$'
267 - project-compare-type: 'ANT'
268 project-pattern: '{project}'
270 - branch-compare-type: 'ANT'
271 branch-pattern: '**/{branch}'
274 name: '{project-name}-cmake-stage-{stream}'
275 id: github-cmake-stage
280 - lf-infra-properties:
281 build-days-to-keep: '{build-days-to-keep}'
283 url: '{github-url}/{github-org}/{project}'
286 - lf-infra-github-scm:
287 url: '{git-clone-url}{github-org}/{project}'
288 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
290 submodule-recursive: '{submodule-recursive}'
291 submodule-timeout: '{submodule-timeout}'
292 submodule-disable: '{submodule-disable}'
293 choosing-strategy: default
294 jenkins-ssh-credential: '{jenkins-ssh-credential}'
297 - timed: '{obj:cron}'
298 - github-pull-request:
299 trigger-phrase: '^(stage-release)$'
300 only-trigger-phrase: true
301 status-context: 'CMake Stage'
304 white-list-target-branches:
312 - lf_cmake_verify: &lf_cmake_verify
313 name: lf-cmake-verify
315 ######################
316 # Default parameters #
317 ######################
320 build-days-to-keep: 7
321 build-dir: '$WORKSPACE/target'
325 git-url: '$GIT_URL/$PROJECT'
326 github-url: 'https://github.com'
327 install-prefix: '$BUILD_DIR/output'
331 submodule-recursive: true
332 submodule-timeout: 10
333 submodule-disable: false
335 gerrit_verify_triggers:
336 - patchset-created-event:
338 exclude-trivial-rebase: false
339 exclude-no-code-change: false
340 - draft-published-event
341 - comment-added-contains-event:
342 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
344 gerrit_trigger_file_paths:
345 - compare-type: REG_EXP
348 # github_included_regions MUST match gerrit_trigger_file_paths
349 github_included_regions:
352 #####################
353 # Job Configuration #
354 #####################
356 project-type: freestyle
358 disabled: '{disable-job}'
361 - lf-infra-properties:
362 build-days-to-keep: '{build-days-to-keep}'
365 - lf-infra-parameters:
369 - lf-cmake-parameters:
370 build-dir: '{build-dir}'
371 cmake-opts: '{cmake-opts}'
372 install-prefix: '{install-prefix}'
373 make-opts: '{make-opts}'
377 build-timeout: '{build-timeout}'
378 jenkins-ssh-credential: '{jenkins-ssh-credential}'
381 - shell: '{pre-build}'
382 - shell: !include-raw-escape: ../shell/cmake-build.sh
388 name: '{project-name}-cmake-verify-{stream}'
389 id: gerrit-cmake-verify
394 - lf-infra-gerrit-scm:
395 branch: '$GERRIT_BRANCH'
396 jenkins-ssh-credential: '{jenkins-ssh-credential}'
398 refspec: '$GERRIT_REFSPEC'
399 submodule-recursive: '{submodule-recursive}'
400 submodule-timeout: '{submodule-timeout}'
401 submodule-disable: '{submodule-disable}'
402 choosing-strategy: gerrit
406 server-name: '{gerrit-server-name}'
407 trigger-on: '{obj:gerrit_verify_triggers}'
409 - project-compare-type: 'ANT'
410 project-pattern: '{project}'
412 - branch-compare-type: 'ANT'
413 branch-pattern: '**/{branch}'
414 file-paths: '{obj:gerrit_trigger_file_paths}'
417 name: '{project-name}-cmake-verify-{stream}'
418 id: github-cmake-verify
423 - lf-infra-properties:
424 build-days-to-keep: '{build-days-to-keep}'
426 url: '{github-url}/{github-org}/{project}'
429 - lf-infra-github-scm:
430 url: '{git-clone-url}{github-org}/{project}'
431 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
433 submodule-recursive: '{submodule-recursive}'
434 submodule-timeout: '{submodule-timeout}'
435 submodule-disable: '{submodule-disable}'
436 choosing-strategy: default
437 jenkins-ssh-credential: '{jenkins-ssh-credential}'
440 - github-pull-request:
441 trigger-phrase: '^(recheck|reverify)$'
442 only-trigger-phrase: false
443 status-context: 'CMake Verify'
446 included-regions: '{obj:github_included_regions}'
447 white-list-target-branches: