6 - lf_cmake_stage: &lf_cmake_stage
10 # Default parameters #
11 ######################
15 build-dir: '$WORKSPACE/target'
18 git-url: '$GIT_URL/$PROJECT'
19 github-url: 'https://github.com'
20 install-prefix: '$BUILD_DIR/output'
22 mvn-global-settings: global-settings
25 submodule-recursive: true
32 project-type: freestyle
36 - lf-infra-properties:
37 build-days-to-keep: '{build-days-to-keep}'
40 - lf-infra-parameters:
44 lftools-version: '{lftools-version}'
45 - lf-cmake-parameters:
46 build-dir: '{build-dir}'
47 cmake-opts: '{cmake-opts}'
48 install-prefix: '{install-prefix}'
49 make-opts: '{make-opts}'
52 default: '{nexus-group-id}'
53 description: 'Project Group ID in Nexus to upload to.'
55 name: STAGING_PROFILE_ID
56 default: '{staging-profile-id}'
57 description: 'Nexus staging profile ID.'
64 Project version to stage release as. There are 2 methods for
67 1) Defined explicitly here.
68 2) Leave this value blank and set /tmp/artifact_version
70 Use method 2 in conjunction with 'pre-build' configuration to
71 generate the artifact_version automatically from files in the
72 project's repository. For example with pre-build script:
75 MAJOR_VERSION="$(grep 'set(OCIO_VERSION_MAJOR' CMakeLists.txt \
76 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
77 MINOR_VERSION="$(grep 'set(OCIO_VERSION_MINOR' CMakeLists.txt \
78 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
79 PATCH_VERSION="$(grep 'set(OCIO_VERSION_PATCH' CMakeLists.txt \
80 | awk '{{print $NF}}' | awk -F')' '{{print $1}}')"
81 echo "${{MAJOR_VERSION}}.${{MINOR_VERSION}}.${{PATCH_VERSION}}" > /tmp/artifact_version
85 build-timeout: '{build-timeout}'
86 jenkins-ssh-credential: '{jenkins-ssh-credential}'
89 - shell: !include-raw-escape: ../shell/lftools-install.sh
90 - lf-provide-maven-settings:
91 global-settings-file: '{mvn-global-settings}'
92 settings-file: '{mvn-settings}'
93 - lf-infra-create-netrc:
95 - shell: '{pre-build}'
96 - shell: !include-raw-escape: ../shell/cmake-build.sh
97 - shell: !include-raw-escape: ../shell/cmake-stage.sh
98 - lf-provide-maven-settings-cleanup
104 name: '{project-name}-cmake-stage-{stream}'
105 id: gerrit-cmake-stage
110 - lf-infra-gerrit-scm:
111 branch: '$GERRIT_BRANCH'
112 jenkins-ssh-credential: '{jenkins-ssh-credential}'
114 refspec: '$GERRIT_REFSPEC'
115 submodule-recursive: '{submodule-recursive}'
116 choosing-strategy: gerrit
120 server-name: '{gerrit-server-name}'
122 - comment-added-contains-event:
123 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(stage-release)$'
125 - project-compare-type: 'ANT'
126 project-pattern: '{project}'
128 - branch-compare-type: 'ANT'
129 branch-pattern: '**/{branch}'
132 name: '{project-name}-cmake-stage-{stream}'
133 id: github-cmake-stage
138 - lf-infra-properties:
139 build-days-to-keep: '{build-days-to-keep}'
141 url: '{github-url}/{github-org}/{project}'
144 - lf-infra-github-scm:
145 url: '{git-clone-url}{github-org}/{project}'
146 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
148 submodule-recursive: '{submodule-recursive}'
149 choosing-strategy: default
150 jenkins-ssh-credential: '{jenkins-ssh-credential}'
153 - github-pull-request:
154 trigger-phrase: '^(stage-release)$'
155 only-trigger-phrase: true
156 status-context: 'CMake Stage'
159 white-list-target-branches:
167 - lf_cmake_verify: &lf_cmake_verify
168 name: lf-cmake-verify
170 ######################
171 # Default parameters #
172 ######################
175 build-days-to-keep: 7
176 build-dir: '$WORKSPACE/target'
179 git-url: '$GIT_URL/$PROJECT'
180 github-url: 'https://github.com'
181 install-prefix: '$BUILD_DIR/output'
185 submodule-recursive: true
187 gerrit_verify_triggers:
188 - patchset-created-event:
190 exclude-trivial-rebase: false
191 exclude-no-code-change: false
192 - draft-published-event
193 - comment-added-contains-event:
194 comment-contains-value: '^Patch Set[ ]+[0-9]+:([ ]+|[\n]+)(recheck|reverify)$'
196 gerrit_trigger_file_paths:
197 - compare-type: REG_EXP
200 # github_included_regions MUST match gerrit_trigger_file_paths
201 github_included_regions:
204 #####################
205 # Job Configuration #
206 #####################
208 project-type: freestyle
212 - lf-infra-properties:
213 build-days-to-keep: '{build-days-to-keep}'
216 - lf-infra-parameters:
220 lftools-version: '{lftools-version}'
221 - lf-cmake-parameters:
222 build-dir: '{build-dir}'
223 cmake-opts: '{cmake-opts}'
224 install-prefix: '{install-prefix}'
225 make-opts: '{make-opts}'
229 build-timeout: '{build-timeout}'
230 jenkins-ssh-credential: '{jenkins-ssh-credential}'
233 - shell: '{pre-build}'
234 - shell: !include-raw-escape: ../shell/cmake-build.sh
240 name: '{project-name}-cmake-verify-{stream}'
241 id: gerrit-cmake-verify
246 - lf-infra-gerrit-scm:
247 branch: '$GERRIT_BRANCH'
248 jenkins-ssh-credential: '{jenkins-ssh-credential}'
250 refspec: '$GERRIT_REFSPEC'
251 submodule-recursive: '{submodule-recursive}'
252 choosing-strategy: gerrit
256 server-name: '{gerrit-server-name}'
257 trigger-on: '{obj:gerrit_verify_triggers}'
259 - project-compare-type: 'ANT'
260 project-pattern: '{project}'
262 - branch-compare-type: 'ANT'
263 branch-pattern: '**/{branch}'
264 file-paths: '{obj:gerrit_trigger_file_paths}'
267 name: '{project-name}-cmake-verify-{stream}'
268 id: github-cmake-verify
273 - lf-infra-properties:
274 build-days-to-keep: '{build-days-to-keep}'
276 url: '{github-url}/{github-org}/{project}'
279 - lf-infra-github-scm:
280 url: '{git-clone-url}{github-org}/{project}'
281 refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
283 submodule-recursive: '{submodule-recursive}'
284 choosing-strategy: default
285 jenkins-ssh-credential: '{jenkins-ssh-credential}'
288 - github-pull-request:
289 trigger-phrase: '^(recheck|reverify)$'
290 only-trigger-phrase: false
291 status-context: 'CMake Verify'
294 included-regions: '{obj:github_included_regions}'
295 white-list-target-branches: