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
36 project-type: freestyle
38 disabled: '{disable-job}'
41 - lf-infra-properties:
42 build-days-to-keep: '{build-days-to-keep}'
45 - lf-infra-parameters:
49 lftools-version: '{lftools-version}'
50 - lf-cmake-parameters:
51 build-dir: '{build-dir}'
52 cmake-opts: '{cmake-opts}'
53 install-prefix: '{install-prefix}'
54 make-opts: '{make-opts}'
58 build-timeout: '{build-timeout}'
59 jenkins-ssh-credential: '{jenkins-ssh-credential}'
63 - shell: '{pre-build}'
65 # Switch this to the sonar wrapper when JJB 2.0 is available
67 SONAR_HOST_URL=https://sonarcloud.io
68 SONAR_SCANNER_VERSION={sonar-scanner-version}
69 PROJECT_KEY={sonarcloud-project-key}
70 PROJECT_ORGANIZATION={sonarcloud-organization}
71 API_TOKEN={sonarcloud-api-token}
72 - shell: !include-raw-escape: ../shell/cmake-sonar.sh
73 - lf-provide-maven-settings-cleanup
79 name: '{project-name}-cmake-sonar'
80 id: gerrit-cmake-sonar
85 - lf-infra-gerrit-scm:
86 branch: '$GERRIT_BRANCH'
87 jenkins-ssh-credential: '{jenkins-ssh-credential}'
89 refspec: '$GERRIT_REFSPEC'
90 submodule-recursive: '{submodule-recursive}'
91 submodule-timeout: '{submodule-timeout}'
92 choosing-strategy: gerrit
97 server-name: '{gerrit-server-name}'
99 - comment-added-contains-event:
100 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(stage-release)$'
102 - project-compare-type: 'ANT'
103 project-pattern: '{project}'
105 - branch-compare-type: 'ANT'
106 branch-pattern: '**/{branch}'
109 name: '{project-name}-cmake-sonar'
110 id: github-cmake-sonar
115 - lf-infra-properties:
116 build-days-to-keep: '{build-days-to-keep}'
118 url: '{github-url}/{github-org}/{project}'
121 - lf-infra-github-scm:
122 url: '{git-clone-url}{github-org}/{project}'
123 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
125 submodule-recursive: '{submodule-recursive}'
126 submodule-timeout: '{submodule-timeout}'
127 choosing-strategy: default
128 jenkins-ssh-credential: '{jenkins-ssh-credential}'
131 - timed: '{obj:cron}'
138 - lf_cmake_stage: &lf_cmake_stage
141 ######################
142 # Default parameters #
143 ######################
146 build-days-to-keep: 7
147 build-dir: '$WORKSPACE/target'
152 git-url: '$GIT_URL/$PROJECT'
153 github-url: 'https://github.com'
154 install-prefix: '$BUILD_DIR/output'
156 mvn-global-settings: global-settings
159 submodule-recursive: true
160 submodule-timeout: 10
163 #####################
164 # Job Configuration #
165 #####################
167 project-type: freestyle
169 disabled: '{disable-job}'
172 - lf-infra-properties:
173 build-days-to-keep: '{build-days-to-keep}'
176 - lf-infra-parameters:
180 - lf-cmake-parameters:
181 build-dir: '{build-dir}'
182 cmake-opts: '{cmake-opts}'
183 install-prefix: '{install-prefix}'
184 make-opts: '{make-opts}'
187 default: '{nexus-group-id}'
188 description: 'Project Group ID in Nexus to upload to.'
190 name: STAGING_PROFILE_ID
191 default: '{staging-profile-id}'
192 description: 'Nexus staging profile ID.'
199 Project version to stage release as. There are 2 methods for
202 1) Defined explicitly here.
203 2) Leave this value blank and set /tmp/artifact_version
205 Use method 2 in conjunction with 'pre-build' configuration to
206 generate the artifact_version automatically from files in the
207 project's repository. For example with pre-build script:
210 MAJOR_VERSION="$(grep 'set(OCIO_VERSION_MAJOR' CMakeLists.txt \
211 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
212 MINOR_VERSION="$(grep 'set(OCIO_VERSION_MINOR' CMakeLists.txt \
213 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
214 PATCH_VERSION="$(grep 'set(OCIO_VERSION_PATCH' CMakeLists.txt \
215 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
216 echo "${{MAJOR_VERSION}}.${{MINOR_VERSION}}.${{PATCH_VERSION}}" > /tmp/artifact_version
220 build-timeout: '{build-timeout}'
221 jenkins-ssh-credential: '{jenkins-ssh-credential}'
225 - lf-provide-maven-settings:
226 global-settings-file: '{mvn-global-settings}'
227 settings-file: '{mvn-settings}'
228 - lf-infra-create-netrc:
230 - shell: '{pre-build}'
231 - shell: !include-raw-escape: ../shell/cmake-build.sh
232 - shell: !include-raw-escape: ../shell/cmake-stage.sh
233 - lf-provide-maven-settings-cleanup
239 name: '{project-name}-cmake-stage-{stream}'
240 id: gerrit-cmake-stage
245 - lf-infra-gerrit-scm:
246 branch: '$GERRIT_BRANCH'
247 jenkins-ssh-credential: '{jenkins-ssh-credential}'
249 refspec: '$GERRIT_REFSPEC'
250 submodule-recursive: '{submodule-recursive}'
251 submodule-timeout: '{submodule-timeout}'
252 choosing-strategy: gerrit
255 - timed: '{obj:cron}'
257 server-name: '{gerrit-server-name}'
259 - comment-added-contains-event:
260 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(stage-release)$'
262 - project-compare-type: 'ANT'
263 project-pattern: '{project}'
265 - branch-compare-type: 'ANT'
266 branch-pattern: '**/{branch}'
269 name: '{project-name}-cmake-stage-{stream}'
270 id: github-cmake-stage
275 - lf-infra-properties:
276 build-days-to-keep: '{build-days-to-keep}'
278 url: '{github-url}/{github-org}/{project}'
281 - lf-infra-github-scm:
282 url: '{git-clone-url}{github-org}/{project}'
283 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
285 submodule-recursive: '{submodule-recursive}'
286 submodule-timeout: '{submodule-timeout}'
287 choosing-strategy: default
288 jenkins-ssh-credential: '{jenkins-ssh-credential}'
291 - timed: '{obj:cron}'
292 - github-pull-request:
293 trigger-phrase: '^(stage-release)$'
294 only-trigger-phrase: true
295 status-context: 'CMake Stage'
298 white-list-target-branches:
306 - lf_cmake_verify: &lf_cmake_verify
307 name: lf-cmake-verify
309 ######################
310 # Default parameters #
311 ######################
314 build-days-to-keep: 7
315 build-dir: '$WORKSPACE/target'
319 git-url: '$GIT_URL/$PROJECT'
320 github-url: 'https://github.com'
321 install-prefix: '$BUILD_DIR/output'
325 submodule-recursive: true
326 submodule-timeout: 10
328 gerrit_verify_triggers:
329 - patchset-created-event:
331 exclude-trivial-rebase: false
332 exclude-no-code-change: false
333 - draft-published-event
334 - comment-added-contains-event:
335 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
337 gerrit_trigger_file_paths:
338 - compare-type: REG_EXP
341 # github_included_regions MUST match gerrit_trigger_file_paths
342 github_included_regions:
345 #####################
346 # Job Configuration #
347 #####################
349 project-type: freestyle
351 disabled: '{disable-job}'
354 - lf-infra-properties:
355 build-days-to-keep: '{build-days-to-keep}'
358 - lf-infra-parameters:
362 - lf-cmake-parameters:
363 build-dir: '{build-dir}'
364 cmake-opts: '{cmake-opts}'
365 install-prefix: '{install-prefix}'
366 make-opts: '{make-opts}'
370 build-timeout: '{build-timeout}'
371 jenkins-ssh-credential: '{jenkins-ssh-credential}'
374 - shell: '{pre-build}'
375 - shell: !include-raw-escape: ../shell/cmake-build.sh
381 name: '{project-name}-cmake-verify-{stream}'
382 id: gerrit-cmake-verify
387 - lf-infra-gerrit-scm:
388 branch: '$GERRIT_BRANCH'
389 jenkins-ssh-credential: '{jenkins-ssh-credential}'
391 refspec: '$GERRIT_REFSPEC'
392 submodule-recursive: '{submodule-recursive}'
393 submodule-timeout: '{submodule-timeout}'
394 choosing-strategy: gerrit
398 server-name: '{gerrit-server-name}'
399 trigger-on: '{obj:gerrit_verify_triggers}'
401 - project-compare-type: 'ANT'
402 project-pattern: '{project}'
404 - branch-compare-type: 'ANT'
405 branch-pattern: '**/{branch}'
406 file-paths: '{obj:gerrit_trigger_file_paths}'
409 name: '{project-name}-cmake-verify-{stream}'
410 id: github-cmake-verify
415 - lf-infra-properties:
416 build-days-to-keep: '{build-days-to-keep}'
418 url: '{github-url}/{github-org}/{project}'
421 - lf-infra-github-scm:
422 url: '{git-clone-url}{github-org}/{project}'
423 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
425 submodule-recursive: '{submodule-recursive}'
426 submodule-timeout: '{submodule-timeout}'
427 choosing-strategy: default
428 jenkins-ssh-credential: '{jenkins-ssh-credential}'
431 - github-pull-request:
432 trigger-phrase: '^(recheck|reverify)$'
433 only-trigger-phrase: false
434 status-context: 'CMake Verify'
437 included-regions: '{obj:github_included_regions}'
438 white-list-target-branches: