1 # SPDX-License-Identifier: Apache-2.0
2 ##############################################################################
3 # Copyright (c) 2019 The Linux Foundation and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
14 - lf_release_common: &lf_release_common
15 name: lf-release-common
21 project-type: freestyle
25 - lf-infra-properties:
35 - lf_release_verify: &lf_release_verify
36 name: lf-release-verify
38 ######################
39 # Default parameters #
40 ######################
45 git-url: "$GIT_URL/$PROJECT"
46 gerrit-skip-vote: false
47 use-release-file: true
49 gerrit_verify_triggers:
50 - patchset-created-event:
52 exclude-trivial-rebase: false
53 exclude-no-code-change: false
54 - draft-published-event
55 - comment-added-contains-event:
56 # yamllint disable-line rule:line-length
57 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
63 disabled: "{disable-job}"
66 - lf-infra-parameters:
68 branch: "$GERRIT_BRANCH"
69 stream: "$GERRIT_BRANCH"
70 - lf-build-with-parameters-maven-release:
71 use-release-file: "{use-release-file}"
76 condition-kind: regex-match
77 regex: "^.*-docker-.*"
80 - lf-provide-maven-settings:
81 global-settings-file: "global-settings"
82 settings-file: "{mvn-settings}"
83 - shell: !include-raw-escape: ../shell/docker-login.sh
84 - lf-provide-maven-settings-cleanup
85 - config-file-provider:
87 - file-id: sigul-config
88 variable: SIGUL_CONFIG
89 - file-id: sigul-password
90 variable: SIGUL_PASSWORD
93 - file-id: signing-pubkey
94 variable: SIGNING_PUBKEY
95 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
96 - shell: !include-raw-escape: ../shell/sigul-install.sh
100 name: "{project-name}-release-verify"
101 id: gerrit-release-verify
102 <<: *lf_release_common
103 # yamllint disable-line rule:key-duplicates
104 <<: *lf_release_verify
108 build-timeout: "{build-timeout}"
109 jenkins-ssh-credential: "{jenkins-ssh-credential}"
112 - lf-infra-gerrit-scm:
114 refspec: "$GERRIT_REFSPEC"
115 branch: "$GERRIT_BRANCH"
116 submodule-disable: true
117 submodule-recursive: false
118 submodule-timeout: 10
119 choosing-strategy: gerrit
120 jenkins-ssh-credential: "{jenkins-ssh-credential}"
124 server-name: "{gerrit-server-name}"
125 trigger-on: "{obj:gerrit_verify_triggers}"
127 - project-compare-type: "ANT"
128 project-pattern: "{project}"
130 - branch-compare-type: "ANT"
133 - compare-type: REG_EXP
134 pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
136 successful: "{gerrit-skip-vote}"
137 failed: "{gerrit-skip-vote}"
138 unstable: "{gerrit-skip-vote}"
139 notbuilt: "{gerrit-skip-vote}"
145 - lf_release_merge: &lf_release_merge
146 name: lf-release-merge
148 ######################
149 # Default parameters #
150 ######################
152 build-days-to-keep: 7
155 git-url: "$GIT_URL/$PROJECT"
156 use-release-file: true
158 gerrit_merge_triggers:
159 - change-merged-event
160 - comment-added-contains-event:
161 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
163 #####################
164 # Job Configuration #
165 #####################
167 disabled: "{disable-job}"
170 - lf-infra-parameters:
172 branch: "$GERRIT_BRANCH"
173 stream: "$GERRIT_BRANCH"
174 - lf-build-with-parameters-maven-release:
175 use-release-file: "{use-release-file}"
180 If DRY_RUN is enabled artifacts are not published.
185 condition-kind: regex-match
186 regex: "^.*-docker-.*"
187 label: "{build-node}"
189 - lf-provide-maven-settings:
190 global-settings-file: "global-settings"
191 settings-file: "{mvn-settings}"
192 - shell: !include-raw-escape: ../shell/docker-login.sh
193 - lf-provide-maven-settings-cleanup
194 - config-file-provider:
196 - file-id: sigul-config
197 variable: SIGUL_CONFIG
198 - file-id: sigul-password
199 variable: SIGUL_PASSWORD
202 - file-id: signing-pubkey
203 variable: SIGNING_PUBKEY
204 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
205 - shell: !include-raw-escape: ../shell/sigul-install.sh
209 name: "{project-name}-release-merge"
210 id: gerrit-release-merge
211 <<: *lf_release_common
212 # yamllint disable-line rule:key-duplicates
213 <<: *lf_release_merge
217 build-timeout: "{build-timeout}"
218 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
221 - lf-infra-gerrit-scm:
222 jenkins-ssh-credential: "{jenkins-ssh-credential}"
224 refspec: "$GERRIT_REFSPEC"
225 branch: "$GERRIT_BRANCH"
226 submodule-disable: true
227 submodule-recursive: false
228 submodule-timeout: 10
229 choosing-strategy: default
233 server-name: "{gerrit-server-name}"
234 trigger-on: "{obj:gerrit_merge_triggers}"
236 - project-compare-type: "ANT"
237 project-pattern: "{project}"
239 - branch-compare-type: "ANT"
242 - compare-type: REG_EXP
243 pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
249 - lf_pypi_verify_wrappers: &lf_pypi_verify_wrappers
250 name: lf-pypi-verify-wrappers
254 build-timeout: "{build-timeout}"
255 jenkins-ssh-credential: "{jenkins-ssh-credential}"
257 - lf_pypi_release_wrappers: &lf_pypi_release_wrappers
258 name: lf-pypi-release-wrappers
262 build-timeout: "{build-timeout}"
263 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
265 - lf_pypi_release: &lf_pypi_release
266 name: lf-pypi-release
268 ######################
269 # Default parameters #
270 ######################
272 branch: master # for github
273 build-days-to-keep: 7
276 gerrit-skip-vote: false
277 git-url: "$GIT_URL/$PROJECT"
278 github-url: "https://github.com"
280 pypi-stage-index: https://test.pypi.org/simple
281 submodule-disable: true
282 submodule-recursive: false
283 submodule-timeout: 10
284 use-release-file: true
286 # define once and use twice; jobs MUST NOT override
287 gerrit_release_trigger_file_paths:
288 - compare-type: REG_EXP
289 pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
291 # yamllint disable-line rule:line-length
292 # github_release_included_regions MUST match gerrit_release_trigger_file_paths
293 github_release_included_regions:
294 - 'releases\/.*\.yaml'
295 - '.releases\/.*\.yaml'
298 - lf-infra-parameters:
300 branch: "$GERRIT_BRANCH"
301 stream: "$GERRIT_BRANCH"
302 # accept all entries defined in the release-yaml file
304 name: DISTRIBUTION_TYPE
306 description: "The Jenkins release job distribution type."
310 description: "The partial path of logs from the PyPI merge job."
314 description: "The PyPI project name."
318 description: "The Python compatibility version, example: 3.6"
322 description: "The module version, example: 1.0.0"
323 # special parameters for manual use of the Jenkins job
325 name: USE_RELEASE_FILE
327 description: "Set to False (unchecked) to build with parameters"
331 description: "Set to True (checked) to skip uploading artifacts"
335 - config-file-provider:
337 - file-id: sigul-config
338 variable: SIGUL_CONFIG
339 - file-id: sigul-password
340 variable: SIGUL_PASSWORD
343 - file-id: signing-pubkey
344 variable: SIGNING_PUBKEY
346 target: "$HOME/.pypirc"
347 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
348 - shell: !include-raw-escape: ../shell/sigul-install.sh
350 properties-content: |
351 PYPI_INDEX={pypi-stage-index}
352 REPOSITORY={pypi-repo}
353 - shell: !include-raw-escape: ../shell/release-job.sh
356 name: "{project-name}-pypi-release-merge"
357 id: gerrit-pypi-release-merge
358 <<: *lf_release_common
359 <<: *lf_pypi_release_wrappers
363 - lf-infra-gerrit-scm:
364 jenkins-ssh-credential: "{jenkins-ssh-credential}"
366 refspec: "$GERRIT_REFSPEC"
367 branch: "$GERRIT_BRANCH"
368 submodule-recursive: "{submodule-recursive}"
369 submodule-timeout: "{submodule-timeout}"
370 submodule-disable: "{submodule-disable}"
371 choosing-strategy: gerrit
375 server-name: "{gerrit-server-name}"
377 - change-merged-event
378 - comment-added-contains-event:
379 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
381 - project-compare-type: "ANT"
382 project-pattern: "{project}"
384 - branch-compare-type: ANT
386 file-paths: "{obj:gerrit_release_trigger_file_paths}"
389 name: "{project-name}-pypi-release-merge"
390 id: github-pypi-release-merge
391 <<: *lf_release_common
392 <<: *lf_pypi_release_wrappers
397 url: "{github-url}/{github-org}/{project}"
400 - lf-infra-github-scm:
401 url: "{git-clone-url}{github-org}/{project}"
403 branch: "refs/heads/{branch}"
404 submodule-recursive: "{submodule-recursive}"
405 submodule-timeout: "{submodule-timeout}"
406 submodule-disable: "{submodule-disable}"
407 choosing-strategy: default
408 jenkins-ssh-credential: "{jenkins-ssh-credential}"
411 - github-pull-request:
412 trigger-phrase: "^(remerge)$"
413 only-trigger-phrase: false
414 status-context: "PyPI Release Merge"
417 white-list-target-branches:
419 included-regions: "{obj:github_release_included_regions}"
422 name: "{project-name}-pypi-release-verify"
423 id: gerrit-pypi-release-verify
424 <<: *lf_release_common
425 <<: *lf_pypi_verify_wrappers
429 - lf-infra-gerrit-scm:
430 jenkins-ssh-credential: "{jenkins-ssh-credential}"
432 refspec: "$GERRIT_REFSPEC"
433 branch: "$GERRIT_BRANCH"
434 submodule-recursive: "{submodule-recursive}"
435 submodule-timeout: "{submodule-timeout}"
436 submodule-disable: "{submodule-disable}"
437 choosing-strategy: gerrit
441 server-name: "{gerrit-server-name}"
443 - patchset-created-event:
445 exclude-trivial-rebase: false
446 exclude-no-code-change: false
447 - draft-published-event
448 - comment-added-contains-event:
449 # yamllint disable-line rule:line-length
450 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
452 - project-compare-type: "ANT"
453 project-pattern: "{project}"
455 - branch-compare-type: ANT
457 file-paths: "{obj:gerrit_release_trigger_file_paths}"
460 name: "{project-name}-pypi-release-verify"
461 id: github-pypi-release-verify
462 <<: *lf_release_common
463 <<: *lf_pypi_verify_wrappers
468 url: "{github-url}/{github-org}/{project}"
471 - lf-infra-github-scm:
472 url: "{git-clone-url}{github-org}/{project}"
474 branch: "refs/heads/{branch}"
475 submodule-recursive: "{submodule-recursive}"
476 submodule-timeout: "{submodule-timeout}"
477 submodule-disable: "{submodule-disable}"
478 choosing-strategy: default
479 jenkins-ssh-credential: "{jenkins-ssh-credential}"
482 - github-pull-request:
483 trigger-phrase: "^(recheck|reverify)$"
484 only-trigger-phrase: false
485 status-context: "PyPI Release Verify"
488 white-list-target-branches:
490 included-regions: "{obj:github_release_included_regions}"
492 ###############################
493 # PackageCloud RELEASE VERIFY #
494 ###############################
496 - lf_packagecloud_verify: &lf_packagecloud_verify
497 name: lf-packagecloud-verify
499 ######################
500 # Default parameters #
501 ######################
503 build-days-to-keep: 7
506 git-url: "$GIT_URL/$PROJECT"
507 gerrit-skip-vote: false
508 use-release-file: true
510 gerrit_verify_triggers:
511 - patchset-created-event:
513 exclude-trivial-rebase: false
514 exclude-no-code-change: false
515 - draft-published-event
516 - comment-added-contains-event:
517 # yamllint disable-line rule:line-length
518 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
520 #####################
521 # Job Configuration #
522 #####################
524 disabled: "{disable-job}"
527 - lf-infra-parameters:
529 branch: "$GERRIT_BRANCH"
530 stream: "$GERRIT_BRANCH"
531 - lf-build-with-parameters-maven-release:
532 use-release-file: "{use-release-file}"
536 - config-file-provider:
538 - file-id: "packagecloud_api"
539 target: "$HOME/packagecloud_api"
543 name: "{project-name}-packagecloud-verify"
544 id: gerrit-packagecloud-verify
545 <<: *lf_release_common
546 # yamllint disable-line rule:key-duplicates
547 <<: *lf_packagecloud_verify
551 build-timeout: "{build-timeout}"
552 jenkins-ssh-credential: "{jenkins-ssh-credential}"
555 - lf-infra-gerrit-scm:
557 refspec: "$GERRIT_REFSPEC"
558 branch: "$GERRIT_BRANCH"
559 submodule-disable: true
560 submodule-recursive: false
561 submodule-timeout: 10
562 choosing-strategy: gerrit
563 jenkins-ssh-credential: "{jenkins-ssh-credential}"
567 server-name: "{gerrit-server-name}"
568 trigger-on: "{obj:gerrit_verify_triggers}"
570 - project-compare-type: "ANT"
571 project-pattern: "{project}"
573 - branch-compare-type: "ANT"
576 - compare-type: REG_EXP
577 pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
579 successful: "{gerrit-skip-vote}"
580 failed: "{gerrit-skip-vote}"
581 unstable: "{gerrit-skip-vote}"
582 notbuilt: "{gerrit-skip-vote}"
584 ##############################
585 # PackageCloud RELEASE MERGE #
586 ##############################
588 - lf_packagecloud_merge: &lf_packagecloud_merge
589 name: lf-packagecloud-merge
591 ######################
592 # Default parameters #
593 ######################
595 build-days-to-keep: 7
598 git-url: "$GIT_URL/$PROJECT"
599 use-release-file: true
601 gerrit_merge_triggers:
602 - change-merged-event
603 - comment-added-contains-event:
604 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
606 #####################
607 # Job Configuration #
608 #####################
610 disabled: "{disable-job}"
613 - lf-infra-parameters:
615 branch: "$GERRIT_BRANCH"
616 stream: "$GERRIT_BRANCH"
617 - lf-build-with-parameters-maven-release:
618 use-release-file: "{use-release-file}"
623 If DRY_RUN is enabled artifacts are not published.
627 - config-file-provider:
629 - file-id: "packagecloud_api"
630 target: "$HOME/packagecloud_api"
634 name: "{project-name}-packagecloud-merge"
635 id: gerrit-packagecloud-merge
636 <<: *lf_release_common
637 # yamllint disable-line rule:key-duplicates
638 <<: *lf_packagecloud_merge
642 build-timeout: "{build-timeout}"
643 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
646 - lf-infra-gerrit-scm:
647 jenkins-ssh-credential: "{jenkins-ssh-credential}"
649 refspec: "$GERRIT_REFSPEC"
650 branch: "$GERRIT_BRANCH"
651 submodule-disable: true
652 submodule-recursive: false
653 submodule-timeout: 10
654 choosing-strategy: default
658 server-name: "{gerrit-server-name}"
659 trigger-on: "{obj:gerrit_merge_triggers}"
661 - project-compare-type: "ANT"
662 project-pattern: "{project}"
664 - branch-compare-type: "ANT"
667 - compare-type: REG_EXP
668 pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'