6 - lf_cmake_stage: &lf_cmake_stage
10 # Default parameters #
11 ######################
15 build-dir: '$WORKSPACE/target'
19 git-url: '$GIT_URL/$PROJECT'
20 github-url: 'https://github.com'
21 install-prefix: '$BUILD_DIR/output'
23 mvn-global-settings: global-settings
26 submodule-recursive: true
33 project-type: freestyle
37 - lf-infra-properties:
38 build-days-to-keep: '{build-days-to-keep}'
41 - lf-infra-parameters:
45 lftools-version: '{lftools-version}'
46 - lf-cmake-parameters:
47 build-dir: '{build-dir}'
48 cmake-opts: '{cmake-opts}'
49 install-prefix: '{install-prefix}'
50 make-opts: '{make-opts}'
53 default: '{nexus-group-id}'
54 description: 'Project Group ID in Nexus to upload to.'
56 name: STAGING_PROFILE_ID
57 default: '{staging-profile-id}'
58 description: 'Nexus staging profile ID.'
65 Project version to stage release as. There are 2 methods for
68 1) Defined explicitly here.
69 2) Leave this value blank and set /tmp/artifact_version
71 Use method 2 in conjunction with 'pre-build' configuration to
72 generate the artifact_version automatically from files in the
73 project's repository. For example with pre-build script:
76 MAJOR_VERSION="$(grep 'set(OCIO_VERSION_MAJOR' CMakeLists.txt \
77 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
78 MINOR_VERSION="$(grep 'set(OCIO_VERSION_MINOR' CMakeLists.txt \
79 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
80 PATCH_VERSION="$(grep 'set(OCIO_VERSION_PATCH' CMakeLists.txt \
81 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
82 echo "${{MAJOR_VERSION}}.${{MINOR_VERSION}}.${{PATCH_VERSION}}" > /tmp/artifact_version
86 build-timeout: '{build-timeout}'
87 jenkins-ssh-credential: '{jenkins-ssh-credential}'
90 - shell: !include-raw-escape: ../shell/lftools-install.sh
91 - lf-provide-maven-settings:
92 global-settings-file: '{mvn-global-settings}'
93 settings-file: '{mvn-settings}'
94 - lf-infra-create-netrc:
96 - shell: '{pre-build}'
97 - shell: !include-raw-escape: ../shell/cmake-build.sh
98 - shell: !include-raw-escape: ../shell/cmake-stage.sh
99 - lf-provide-maven-settings-cleanup
105 name: '{project-name}-cmake-stage-{stream}'
106 id: gerrit-cmake-stage
111 - lf-infra-gerrit-scm:
112 branch: '$GERRIT_BRANCH'
113 jenkins-ssh-credential: '{jenkins-ssh-credential}'
115 refspec: '$GERRIT_REFSPEC'
116 submodule-recursive: '{submodule-recursive}'
117 choosing-strategy: gerrit
120 - timed: '{obj:cron}'
122 server-name: '{gerrit-server-name}'
124 - comment-added-contains-event:
125 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(stage-release)$'
127 - project-compare-type: 'ANT'
128 project-pattern: '{project}'
130 - branch-compare-type: 'ANT'
131 branch-pattern: '**/{branch}'
134 name: '{project-name}-cmake-stage-{stream}'
135 id: github-cmake-stage
140 - lf-infra-properties:
141 build-days-to-keep: '{build-days-to-keep}'
143 url: '{github-url}/{github-org}/{project}'
146 - lf-infra-github-scm:
147 url: '{git-clone-url}{github-org}/{project}'
148 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
150 submodule-recursive: '{submodule-recursive}'
151 choosing-strategy: default
152 jenkins-ssh-credential: '{jenkins-ssh-credential}'
155 - timed: '{obj:cron}'
156 - github-pull-request:
157 trigger-phrase: '^(stage-release)$'
158 only-trigger-phrase: true
159 status-context: 'CMake Stage'
162 white-list-target-branches:
170 - lf_cmake_verify: &lf_cmake_verify
171 name: lf-cmake-verify
173 ######################
174 # Default parameters #
175 ######################
178 build-days-to-keep: 7
179 build-dir: '$WORKSPACE/target'
182 git-url: '$GIT_URL/$PROJECT'
183 github-url: 'https://github.com'
184 install-prefix: '$BUILD_DIR/output'
188 submodule-recursive: true
190 gerrit_verify_triggers:
191 - patchset-created-event:
193 exclude-trivial-rebase: false
194 exclude-no-code-change: false
195 - draft-published-event
196 - comment-added-contains-event:
197 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
199 gerrit_trigger_file_paths:
200 - compare-type: REG_EXP
203 # github_included_regions MUST match gerrit_trigger_file_paths
204 github_included_regions:
207 #####################
208 # Job Configuration #
209 #####################
211 project-type: freestyle
215 - lf-infra-properties:
216 build-days-to-keep: '{build-days-to-keep}'
219 - lf-infra-parameters:
223 lftools-version: '{lftools-version}'
224 - lf-cmake-parameters:
225 build-dir: '{build-dir}'
226 cmake-opts: '{cmake-opts}'
227 install-prefix: '{install-prefix}'
228 make-opts: '{make-opts}'
232 build-timeout: '{build-timeout}'
233 jenkins-ssh-credential: '{jenkins-ssh-credential}'
236 - shell: '{pre-build}'
237 - shell: !include-raw-escape: ../shell/cmake-build.sh
243 name: '{project-name}-cmake-verify-{stream}'
244 id: gerrit-cmake-verify
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 choosing-strategy: gerrit
259 server-name: '{gerrit-server-name}'
260 trigger-on: '{obj:gerrit_verify_triggers}'
262 - project-compare-type: 'ANT'
263 project-pattern: '{project}'
265 - branch-compare-type: 'ANT'
266 branch-pattern: '**/{branch}'
267 file-paths: '{obj:gerrit_trigger_file_paths}'
270 name: '{project-name}-cmake-verify-{stream}'
271 id: github-cmake-verify
276 - lf-infra-properties:
277 build-days-to-keep: '{build-days-to-keep}'
279 url: '{github-url}/{github-org}/{project}'
282 - lf-infra-github-scm:
283 url: '{git-clone-url}{github-org}/{project}'
284 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
286 submodule-recursive: '{submodule-recursive}'
287 choosing-strategy: default
288 jenkins-ssh-credential: '{jenkins-ssh-credential}'
291 - github-pull-request:
292 trigger-phrase: '^(recheck|reverify)$'
293 only-trigger-phrase: false
294 status-context: 'CMake Verify'
297 included-regions: '{obj:github_included_regions}'
298 white-list-target-branches: