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
48 use-release-file: true
50 gerrit_verify_triggers:
51 - patchset-created-event:
53 exclude-trivial-rebase: false
54 exclude-no-code-change: false
55 - draft-published-event
56 - comment-added-contains-event:
57 # yamllint disable-line rule:line-length
58 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
60 github_included_regions:
61 - '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
67 disabled: "{disable-job}"
70 - lf-infra-parameters:
72 branch: "$GERRIT_BRANCH"
73 stream: "$GERRIT_BRANCH"
74 - lf-build-with-parameters-maven-release:
75 use-release-file: "{use-release-file}"
80 condition-kind: regex-match
81 regex: "^.*-docker-.*"
84 - lf-provide-maven-settings:
85 global-settings-file: "global-settings"
86 settings-file: "{mvn-settings}"
87 - shell: !include-raw-escape: ../shell/docker-login.sh
88 - lf-provide-maven-settings-cleanup
89 - config-file-provider:
91 - file-id: sigul-config
92 variable: SIGUL_CONFIG
93 - file-id: sigul-password
94 variable: SIGUL_PASSWORD
97 - file-id: signing-pubkey
98 variable: SIGNING_PUBKEY
99 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
100 - shell: !include-raw-escape: ../shell/sigul-install.sh
104 name: "{project-name}-release-verify-{stream}"
105 id: gerrit-release-verify
106 <<: *lf_release_common
107 # yamllint disable-line rule:key-duplicates
108 <<: *lf_release_verify
112 build-timeout: "{build-timeout}"
113 jenkins-ssh-credential: "{jenkins-ssh-credential}"
116 - lf-infra-gerrit-scm:
118 refspec: "$GERRIT_REFSPEC"
119 branch: "$GERRIT_BRANCH"
120 submodule-disable: true
121 submodule-recursive: false
122 submodule-timeout: 10
123 choosing-strategy: gerrit
124 jenkins-ssh-credential: "{jenkins-ssh-credential}"
128 server-name: "{gerrit-server-name}"
129 trigger-on: "{obj:gerrit_verify_triggers}"
131 - project-compare-type: "ANT"
132 project-pattern: "{project}"
134 - branch-compare-type: "ANT"
135 branch-pattern: "**/{branch}"
137 - compare-type: REG_EXP
138 pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
140 successful: "{gerrit-skip-vote}"
141 failed: "{gerrit-skip-vote}"
142 unstable: "{gerrit-skip-vote}"
143 notbuilt: "{gerrit-skip-vote}"
146 name: "{project-name}-release-verify-{stream}"
147 id: github-release-verify
148 <<: *lf_release_common
149 # yamllint disable-line rule:key-duplicates
150 <<: *lf_release_verify
153 - lf-infra-properties:
154 build-days-to-keep: "{build-days-to-keep}"
156 url: "{github-url}/{github-org}/{project}"
160 build-timeout: "{build-timeout}"
161 jenkins-ssh-credential: "{jenkins-ssh-credential}"
164 - lf-infra-github-scm:
165 url: "{git-clone-url}{github-org}/{project}"
166 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
168 submodule-recursive: "{submodule-recursive}"
169 submodule-timeout: "{submodule-timeout}"
170 submodule-disable: "{submodule-disable}"
171 choosing-strategy: default
172 jenkins-ssh-credential: "{jenkins-ssh-credential}"
175 - github-pull-request:
176 trigger-phrase: ^(recheck|reverify)$
177 only-trigger-phrase: false
178 status-context: "Github Release Verify"
181 white-list-target-branches:
183 included-regions: "{obj:github_included_regions}"
189 - _lf_release_merge: &lf_release_merge
190 name: lf-release-merge
192 ######################
193 # Default parameters #
194 ######################
196 build-days-to-keep: 7
198 cosign-password-id: cosign-password
199 cosign-private-key-id: cosign-private-key
201 git-url: "$GIT_URL/$PROJECT"
203 use-release-file: true
205 gerrit_merge_triggers:
206 - change-merged-event
207 - comment-added-contains-event:
208 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
210 github_included_regions:
211 - '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
213 #####################
214 # Job Configuration #
215 #####################
217 disabled: "{disable-job}"
220 - lf-infra-parameters:
222 branch: "$GERRIT_BRANCH"
223 stream: "$GERRIT_BRANCH"
224 - lf-build-with-parameters-maven-release:
225 use-release-file: "{use-release-file}"
230 Tag Gerrit repo after release.
235 If DRY_RUN is enabled artifacts are not published.
240 condition-kind: regex-match
241 regex: "^.*-docker-.*"
242 label: "{build-node}"
244 - lf-provide-maven-settings:
245 global-settings-file: "global-settings"
246 settings-file: "{mvn-settings}"
247 - shell: !include-raw-escape: ../shell/docker-login.sh
248 - lf-provide-maven-settings-cleanup
249 - config-file-provider:
251 - file-id: sigul-config
252 variable: SIGUL_CONFIG
253 - file-id: sigul-password
254 variable: SIGUL_PASSWORD
257 - file-id: signing-pubkey
258 variable: SIGNING_PUBKEY
259 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
260 - shell: !include-raw-escape: ../shell/sigul-install.sh
264 name: "{project-name}-release-merge-{stream}"
265 id: gerrit-release-merge
266 <<: *lf_release_common
267 # yamllint disable-line rule:key-duplicates
268 <<: *lf_release_merge
272 build-timeout: "{build-timeout}"
273 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
274 - credentials-binding:
276 credential-id: "{cosign-private-key-id}"
277 variable: COSIGN_PRIVATE_KEY
279 credential-id: "{cosign-password-id}"
280 variable: COSIGN_PASSWORD
283 - lf-infra-gerrit-scm:
284 jenkins-ssh-credential: "{jenkins-ssh-credential}"
286 refspec: "$GERRIT_REFSPEC"
287 branch: "$GERRIT_BRANCH"
288 submodule-disable: true
289 submodule-recursive: false
290 submodule-timeout: 10
291 # release merge jobs build from commit not tip
292 choosing-strategy: gerrit
296 server-name: "{gerrit-server-name}"
297 trigger-on: "{obj:gerrit_merge_triggers}"
299 - project-compare-type: "ANT"
300 project-pattern: "{project}"
302 - branch-compare-type: "ANT"
303 branch-pattern: "**/{branch}"
305 - compare-type: REG_EXP
306 pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
309 name: "{project-name}-release-merge-{stream}"
310 id: github-release-merge
311 <<: *lf_release_common
312 # yamllint disable-line rule:key-duplicates
313 <<: *lf_release_merge
316 - lf-infra-properties:
317 build-days-to-keep: "{build-days-to-keep}"
319 url: "{github-url}/{github-org}/{project}"
323 build-timeout: "{build-timeout}"
324 jenkins-ssh-credential: "{jenkins-ssh-credential}"
325 - credentials-binding:
327 credential-id: "{cosign-private-key-id}"
328 variable: COSIGN_PRIVATE_KEY
330 credential-id: "{cosign-password-id}"
331 variable: COSIGN_PASSWORD
334 - lf-infra-github-scm:
335 url: "{git-clone-url}{github-org}/{project}"
336 refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
338 submodule-recursive: "{submodule-recursive}"
339 submodule-timeout: "{submodule-timeout}"
340 submodule-disable: "{submodule-disable}"
341 choosing-strategy: default
342 jenkins-ssh-credential: "{jenkins-ssh-credential}"
345 - github-pull-request:
346 trigger-phrase: "^remerge$"
347 only-trigger-phrase: true
348 status-context: "Github Release Merge"
351 white-list-target-branches:
353 included-regions: "{obj:github_included_regions}"
359 - _lf_pypi_verify_wrappers: &lf_pypi_verify_wrappers
360 name: lf-pypi-verify-wrappers
364 build-timeout: "{build-timeout}"
365 jenkins-ssh-credential: "{jenkins-ssh-credential}"
367 - _lf_pypi_release_wrappers: &lf_pypi_release_wrappers
368 name: lf-pypi-release-wrappers
372 build-timeout: "{build-timeout}"
373 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
375 - _lf_pypi_release: &lf_pypi_release
376 name: lf-pypi-release
378 ######################
379 # Default parameters #
380 ######################
382 branch: master # for github
383 build-days-to-keep: 7
386 gerrit-skip-vote: false
387 git-url: "$GIT_URL/$PROJECT"
388 github-url: "https://github.com"
390 pypi-stage-index: https://test.pypi.org/simple
391 submodule-disable: true
392 submodule-recursive: false
393 submodule-timeout: 10
394 use-release-file: true
396 # define once and use twice; jobs MUST NOT override
397 gerrit_release_trigger_file_paths:
398 - compare-type: REG_EXP
399 pattern: '(releases\/pypi.*\.yaml|\.releases\/pypi.*\.yaml)'
401 # yamllint disable-line rule:line-length
402 # github_release_included_regions MUST match gerrit_release_trigger_file_paths
403 github_release_included_regions:
404 - 'releases\/pypi.*\.yaml'
405 - '.releases\/pypi.*\.yaml'
408 - lf-infra-parameters:
410 branch: "$GERRIT_BRANCH"
411 stream: "$GERRIT_BRANCH"
412 # accept all entries defined in the release-yaml file
414 name: DISTRIBUTION_TYPE
416 description: "The Jenkins release job distribution type."
420 description: "The partial path of logs from the PyPI merge job."
424 description: "Tag to push to git repo; optional, defaults to VERSION."
428 description: "The PyPI project name."
432 description: "The Python compatibility version, example: 3.6"
436 description: "The module version, example: 1.0.0"
437 # special parameters for manual use of the Jenkins job
439 name: USE_RELEASE_FILE
441 description: "Set to False (unchecked) to build with parameters"
446 Tag Gerrit repo after release.
450 description: "Set to True (checked) to skip uploading artifacts"
454 - config-file-provider:
456 - file-id: sigul-config
457 variable: SIGUL_CONFIG
458 - file-id: sigul-password
459 variable: SIGUL_PASSWORD
462 - file-id: signing-pubkey
463 variable: SIGNING_PUBKEY
465 target: "$HOME/.pypirc"
466 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
467 - shell: !include-raw-escape: ../shell/sigul-install.sh
469 properties-content: |
470 PYPI_INDEX={pypi-stage-index}
471 REPOSITORY={pypi-repo}
472 - shell: !include-raw-escape: ../shell/release-job.sh
475 name: "{project-name}-pypi-release-merge"
476 id: gerrit-pypi-release-merge
477 <<: *lf_release_common
478 <<: *lf_pypi_release_wrappers
482 - lf-infra-gerrit-scm:
483 jenkins-ssh-credential: "{jenkins-ssh-credential}"
485 refspec: "$GERRIT_REFSPEC"
486 branch: "$GERRIT_BRANCH"
487 submodule-recursive: "{submodule-recursive}"
488 submodule-timeout: "{submodule-timeout}"
489 submodule-disable: "{submodule-disable}"
490 # release merge jobs build from commit not tip
491 choosing-strategy: gerrit
495 server-name: "{gerrit-server-name}"
497 - change-merged-event
498 - comment-added-contains-event:
499 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
501 - project-compare-type: "ANT"
502 project-pattern: "{project}"
504 - branch-compare-type: ANT
505 branch-pattern: "**/{branch}"
506 file-paths: "{obj:gerrit_release_trigger_file_paths}"
509 name: "{project-name}-pypi-release-merge"
510 id: github-pypi-release-merge
511 <<: *lf_release_common
512 <<: *lf_pypi_release_wrappers
517 url: "{github-url}/{github-org}/{project}"
520 - lf-infra-github-scm:
521 url: "{git-clone-url}{github-org}/{project}"
523 branch: "refs/heads/{branch}"
524 submodule-recursive: "{submodule-recursive}"
525 submodule-timeout: "{submodule-timeout}"
526 submodule-disable: "{submodule-disable}"
527 choosing-strategy: default
528 jenkins-ssh-credential: "{jenkins-ssh-credential}"
531 - github-pull-request:
532 trigger-phrase: "^(remerge)$"
533 only-trigger-phrase: false
534 status-context: "PyPI Release Merge"
537 white-list-target-branches:
539 included-regions: "{obj:github_release_included_regions}"
542 name: "{project-name}-pypi-release-verify"
543 id: gerrit-pypi-release-verify
544 <<: *lf_release_common
545 <<: *lf_pypi_verify_wrappers
549 - lf-infra-gerrit-scm:
550 jenkins-ssh-credential: "{jenkins-ssh-credential}"
552 refspec: "$GERRIT_REFSPEC"
553 branch: "$GERRIT_BRANCH"
554 submodule-recursive: "{submodule-recursive}"
555 submodule-timeout: "{submodule-timeout}"
556 submodule-disable: "{submodule-disable}"
557 choosing-strategy: gerrit
561 server-name: "{gerrit-server-name}"
563 - patchset-created-event:
565 exclude-trivial-rebase: false
566 exclude-no-code-change: false
567 - draft-published-event
568 - comment-added-contains-event:
569 # yamllint disable-line rule:line-length
570 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
572 - project-compare-type: "ANT"
573 project-pattern: "{project}"
575 - branch-compare-type: ANT
576 branch-pattern: "**/{branch}"
577 file-paths: "{obj:gerrit_release_trigger_file_paths}"
580 name: "{project-name}-pypi-release-verify"
581 id: github-pypi-release-verify
582 <<: *lf_release_common
583 <<: *lf_pypi_verify_wrappers
588 url: "{github-url}/{github-org}/{project}"
591 - lf-infra-github-scm:
592 url: "{git-clone-url}{github-org}/{project}"
594 branch: "refs/heads/{branch}"
595 submodule-recursive: "{submodule-recursive}"
596 submodule-timeout: "{submodule-timeout}"
597 submodule-disable: "{submodule-disable}"
598 choosing-strategy: default
599 jenkins-ssh-credential: "{jenkins-ssh-credential}"
602 - github-pull-request:
603 trigger-phrase: "^(recheck|reverify)$"
604 only-trigger-phrase: false
605 status-context: "PyPI Release Verify"
608 white-list-target-branches:
610 included-regions: "{obj:github_release_included_regions}"
612 ########################
613 # PackageCloud RELEASE #
614 ########################
616 - _lf_packagecloud_release_common: &lf_packagecloud_release_common
617 name: lf-packagecloud-release-common
619 ######################
620 # Default parameters #
621 ######################
623 build-days-to-keep: 7
626 git-url: "$GIT_URL/$PROJECT"
627 gerrit-skip-vote: false
628 use-release-file: true
632 #####################
633 # Job Configuration #
634 #####################
636 disabled: "{disable-job}"
639 - lf-infra-parameters:
641 branch: "$GERRIT_BRANCH"
642 stream: "$GERRIT_BRANCH"
644 name: DISTRIBUTION_TYPE
645 default: "packagecloud"
646 description: "The Jenkins release job distribution type."
651 Tag Gerrit repo after release.
656 If DRY_RUN is enabled artifacts are not promoted.
658 name: USE_RELEASE_FILE
659 default: "{use-release-file}"
660 description: "Set to False for job built with parameters"
664 - config-file-provider:
666 - file-id: sigul-config
667 variable: SIGUL_CONFIG
668 - file-id: sigul-password
669 variable: SIGUL_PASSWORD
672 - file-id: signing-pubkey
673 variable: SIGNING_PUBKEY
674 - file-id: "packagecloud_api"
675 target: "$HOME/packagecloud_api"
676 - file-id: packagecloud-account
677 variable: ACCOUNT_NAME_FILE
678 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
679 - shell: !include-raw-escape: ../shell/sigul-install.sh
683 name: "{project-name}-packagecloud-release-verify"
684 id: gerrit-packagecloud-release-verify
685 <<: *lf_release_common
686 <<: *lf_packagecloud_release_common
690 build-timeout: "{build-timeout}"
691 jenkins-ssh-credential: "{jenkins-ssh-credential}"
694 - lf-infra-gerrit-scm:
696 refspec: "$GERRIT_REFSPEC"
697 branch: "$GERRIT_BRANCH"
698 submodule-disable: true
699 submodule-recursive: false
700 submodule-timeout: 10
701 choosing-strategy: gerrit
702 jenkins-ssh-credential: "{jenkins-ssh-credential}"
706 server-name: "{gerrit-server-name}"
708 - patchset-created-event:
710 exclude-trivial-rebase: false
711 exclude-no-code-change: false
712 - draft-published-event
713 - comment-added-contains-event:
714 # yamllint disable-line rule:line-length
715 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
717 - project-compare-type: "ANT"
718 project-pattern: "{project}"
720 - branch-compare-type: "ANT"
721 branch-pattern: "**/{branch}"
723 - compare-type: REG_EXP
724 pattern: '(releases\/packagecloud.*\.yaml|\.releases\/packagecloud.*\.yaml)'
726 successful: "{gerrit-skip-vote}"
727 failed: "{gerrit-skip-vote}"
728 unstable: "{gerrit-skip-vote}"
729 notbuilt: "{gerrit-skip-vote}"
732 name: "{project-name}-packagecloud-release-merge"
733 id: gerrit-packagecloud-release-merge
734 <<: *lf_release_common
735 <<: *lf_packagecloud_release_common
739 build-timeout: "{build-timeout}"
740 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
743 - lf-infra-gerrit-scm:
744 jenkins-ssh-credential: "{jenkins-ssh-credential}"
746 refspec: "$GERRIT_REFSPEC"
747 branch: "$GERRIT_BRANCH"
748 submodule-disable: true
749 submodule-recursive: false
750 submodule-timeout: 10
751 # release merge jobs build from commit not tip
752 choosing-strategy: gerrit
756 server-name: "{gerrit-server-name}"
758 - change-merged-event
759 - comment-added-contains-event:
760 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
762 - project-compare-type: "ANT"
763 project-pattern: "{project}"
765 - branch-compare-type: "ANT"
766 branch-pattern: "**/{branch}"
768 - compare-type: REG_EXP
769 pattern: '(releases\/packagecloud.*\.yaml|\.releases\/packagecloud.*\.yaml)'