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 Tag Gerrit repo after release.
185 If DRY_RUN is enabled artifacts are not published.
190 condition-kind: regex-match
191 regex: "^.*-docker-.*"
192 label: "{build-node}"
194 - lf-provide-maven-settings:
195 global-settings-file: "global-settings"
196 settings-file: "{mvn-settings}"
197 - shell: !include-raw-escape: ../shell/docker-login.sh
198 - lf-provide-maven-settings-cleanup
199 - config-file-provider:
201 - file-id: sigul-config
202 variable: SIGUL_CONFIG
203 - file-id: sigul-password
204 variable: SIGUL_PASSWORD
207 - file-id: signing-pubkey
208 variable: SIGNING_PUBKEY
209 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
210 - shell: !include-raw-escape: ../shell/sigul-install.sh
214 name: "{project-name}-release-merge"
215 id: gerrit-release-merge
216 <<: *lf_release_common
217 # yamllint disable-line rule:key-duplicates
218 <<: *lf_release_merge
222 build-timeout: "{build-timeout}"
223 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
226 - lf-infra-gerrit-scm:
227 jenkins-ssh-credential: "{jenkins-ssh-credential}"
229 refspec: "$GERRIT_REFSPEC"
230 branch: "$GERRIT_BRANCH"
231 submodule-disable: true
232 submodule-recursive: false
233 submodule-timeout: 10
234 # release merge jobs build from commit not tip
235 choosing-strategy: gerrit
239 server-name: "{gerrit-server-name}"
240 trigger-on: "{obj:gerrit_merge_triggers}"
242 - project-compare-type: "ANT"
243 project-pattern: "{project}"
245 - branch-compare-type: "ANT"
248 - compare-type: REG_EXP
249 pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'
255 - lf_pypi_verify_wrappers: &lf_pypi_verify_wrappers
256 name: lf-pypi-verify-wrappers
260 build-timeout: "{build-timeout}"
261 jenkins-ssh-credential: "{jenkins-ssh-credential}"
263 - lf_pypi_release_wrappers: &lf_pypi_release_wrappers
264 name: lf-pypi-release-wrappers
268 build-timeout: "{build-timeout}"
269 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
271 - lf_pypi_release: &lf_pypi_release
272 name: lf-pypi-release
274 ######################
275 # Default parameters #
276 ######################
278 branch: master # for github
279 build-days-to-keep: 7
282 gerrit-skip-vote: false
283 git-url: "$GIT_URL/$PROJECT"
284 github-url: "https://github.com"
286 pypi-stage-index: https://test.pypi.org/simple
287 submodule-disable: true
288 submodule-recursive: false
289 submodule-timeout: 10
290 use-release-file: true
292 # define once and use twice; jobs MUST NOT override
293 gerrit_release_trigger_file_paths:
294 - compare-type: REG_EXP
295 pattern: '(releases\/pypi.*\.yaml|\.releases\/pypi.*\.yaml)'
297 # yamllint disable-line rule:line-length
298 # github_release_included_regions MUST match gerrit_release_trigger_file_paths
299 github_release_included_regions:
300 - 'releases\/pypi.*\.yaml'
301 - '.releases\/pypi.*\.yaml'
304 - lf-infra-parameters:
306 branch: "$GERRIT_BRANCH"
307 stream: "$GERRIT_BRANCH"
308 # accept all entries defined in the release-yaml file
310 name: DISTRIBUTION_TYPE
312 description: "The Jenkins release job distribution type."
316 description: "The partial path of logs from the PyPI merge job."
320 description: "Tag to push to git repo; optional, defaults to VERSION."
324 description: "The PyPI project name."
328 description: "The Python compatibility version, example: 3.6"
332 description: "The module version, example: 1.0.0"
333 # special parameters for manual use of the Jenkins job
335 name: USE_RELEASE_FILE
337 description: "Set to False (unchecked) to build with parameters"
342 Tag Gerrit repo after release.
346 description: "Set to True (checked) to skip uploading artifacts"
350 - config-file-provider:
352 - file-id: sigul-config
353 variable: SIGUL_CONFIG
354 - file-id: sigul-password
355 variable: SIGUL_PASSWORD
358 - file-id: signing-pubkey
359 variable: SIGNING_PUBKEY
361 target: "$HOME/.pypirc"
362 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
363 - shell: !include-raw-escape: ../shell/sigul-install.sh
365 properties-content: |
366 PYPI_INDEX={pypi-stage-index}
367 REPOSITORY={pypi-repo}
368 - shell: !include-raw-escape: ../shell/release-job.sh
371 name: "{project-name}-pypi-release-merge"
372 id: gerrit-pypi-release-merge
373 <<: *lf_release_common
374 <<: *lf_pypi_release_wrappers
378 - lf-infra-gerrit-scm:
379 jenkins-ssh-credential: "{jenkins-ssh-credential}"
381 refspec: "$GERRIT_REFSPEC"
382 branch: "$GERRIT_BRANCH"
383 submodule-recursive: "{submodule-recursive}"
384 submodule-timeout: "{submodule-timeout}"
385 submodule-disable: "{submodule-disable}"
386 # release merge jobs build from commit not tip
387 choosing-strategy: gerrit
391 server-name: "{gerrit-server-name}"
393 - change-merged-event
394 - comment-added-contains-event:
395 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
397 - project-compare-type: "ANT"
398 project-pattern: "{project}"
400 - branch-compare-type: ANT
402 file-paths: "{obj:gerrit_release_trigger_file_paths}"
405 name: "{project-name}-pypi-release-merge"
406 id: github-pypi-release-merge
407 <<: *lf_release_common
408 <<: *lf_pypi_release_wrappers
413 url: "{github-url}/{github-org}/{project}"
416 - lf-infra-github-scm:
417 url: "{git-clone-url}{github-org}/{project}"
419 branch: "refs/heads/{branch}"
420 submodule-recursive: "{submodule-recursive}"
421 submodule-timeout: "{submodule-timeout}"
422 submodule-disable: "{submodule-disable}"
423 choosing-strategy: default
424 jenkins-ssh-credential: "{jenkins-ssh-credential}"
427 - github-pull-request:
428 trigger-phrase: "^(remerge)$"
429 only-trigger-phrase: false
430 status-context: "PyPI Release Merge"
433 white-list-target-branches:
435 included-regions: "{obj:github_release_included_regions}"
438 name: "{project-name}-pypi-release-verify"
439 id: gerrit-pypi-release-verify
440 <<: *lf_release_common
441 <<: *lf_pypi_verify_wrappers
445 - lf-infra-gerrit-scm:
446 jenkins-ssh-credential: "{jenkins-ssh-credential}"
448 refspec: "$GERRIT_REFSPEC"
449 branch: "$GERRIT_BRANCH"
450 submodule-recursive: "{submodule-recursive}"
451 submodule-timeout: "{submodule-timeout}"
452 submodule-disable: "{submodule-disable}"
453 choosing-strategy: gerrit
457 server-name: "{gerrit-server-name}"
459 - patchset-created-event:
461 exclude-trivial-rebase: false
462 exclude-no-code-change: false
463 - draft-published-event
464 - comment-added-contains-event:
465 # yamllint disable-line rule:line-length
466 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
468 - project-compare-type: "ANT"
469 project-pattern: "{project}"
471 - branch-compare-type: ANT
473 file-paths: "{obj:gerrit_release_trigger_file_paths}"
476 name: "{project-name}-pypi-release-verify"
477 id: github-pypi-release-verify
478 <<: *lf_release_common
479 <<: *lf_pypi_verify_wrappers
484 url: "{github-url}/{github-org}/{project}"
487 - lf-infra-github-scm:
488 url: "{git-clone-url}{github-org}/{project}"
490 branch: "refs/heads/{branch}"
491 submodule-recursive: "{submodule-recursive}"
492 submodule-timeout: "{submodule-timeout}"
493 submodule-disable: "{submodule-disable}"
494 choosing-strategy: default
495 jenkins-ssh-credential: "{jenkins-ssh-credential}"
498 - github-pull-request:
499 trigger-phrase: "^(recheck|reverify)$"
500 only-trigger-phrase: false
501 status-context: "PyPI Release Verify"
504 white-list-target-branches:
506 included-regions: "{obj:github_release_included_regions}"
508 ########################
509 # PackageCloud RELEASE #
510 ########################
512 - lf_packagecloud_release_common: &lf_packagecloud_release_common
513 name: lf-packagecloud-release-common
515 ######################
516 # Default parameters #
517 ######################
519 build-days-to-keep: 7
522 git-url: "$GIT_URL/$PROJECT"
523 gerrit-skip-vote: false
524 use-release-file: true
525 account-name: "{account-name}"
526 source-repo: "{source-repo}"
528 #####################
529 # Job Configuration #
530 #####################
532 disabled: "{disable-job}"
535 - lf-infra-parameters:
537 branch: "$GERRIT_BRANCH"
538 stream: "$GERRIT_BRANCH"
540 name: DISTRIBUTION_TYPE
541 default: "packagecloud"
542 description: "The Jenkins release job distribution type."
547 Tag Gerrit repo after release.
552 If DRY_RUN is enabled artifacts are not promoted.
554 name: USE_RELEASE_FILE
555 default: "{use-release-file}"
556 description: "Set to False for job built with parameters"
560 - config-file-provider:
562 - file-id: sigul-config
563 variable: SIGUL_CONFIG
564 - file-id: sigul-password
565 variable: SIGUL_PASSWORD
568 - file-id: signing-pubkey
569 variable: SIGNING_PUBKEY
570 - file-id: "packagecloud_api"
571 target: "$HOME/packagecloud_api"
572 - file-id: packagecloud-account
573 variable: ACCOUNT_NAME_FILE
574 - shell: !include-raw-escape: ../shell/sigul-configuration.sh
575 - shell: !include-raw-escape: ../shell/sigul-install.sh
579 name: "{project-name}-packagecloud-release-verify"
580 id: gerrit-packagecloud-release-verify
581 <<: *lf_release_common
582 <<: *lf_packagecloud_release_common
586 build-timeout: "{build-timeout}"
587 jenkins-ssh-credential: "{jenkins-ssh-credential}"
590 - lf-infra-gerrit-scm:
592 refspec: "$GERRIT_REFSPEC"
593 branch: "$GERRIT_BRANCH"
594 submodule-disable: true
595 submodule-recursive: false
596 submodule-timeout: 10
597 choosing-strategy: gerrit
598 jenkins-ssh-credential: "{jenkins-ssh-credential}"
602 server-name: "{gerrit-server-name}"
604 - patchset-created-event:
606 exclude-trivial-rebase: false
607 exclude-no-code-change: false
608 - draft-published-event
609 - comment-added-contains-event:
610 # yamllint disable-line rule:line-length
611 comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
613 - project-compare-type: "ANT"
614 project-pattern: "{project}"
616 - branch-compare-type: "ANT"
619 - compare-type: REG_EXP
620 pattern: '(releases\/packagecloud.*\.yaml|\.releases\/packagecloud.*\.yaml)'
622 successful: "{gerrit-skip-vote}"
623 failed: "{gerrit-skip-vote}"
624 unstable: "{gerrit-skip-vote}"
625 notbuilt: "{gerrit-skip-vote}"
628 name: "{project-name}-packagecloud-release-merge"
629 id: gerrit-packagecloud-release-merge
630 <<: *lf_release_common
631 <<: *lf_packagecloud_release_common
635 build-timeout: "{build-timeout}"
636 jenkins-ssh-credential: "{jenkins-ssh-release-credential}"
639 - lf-infra-gerrit-scm:
640 jenkins-ssh-credential: "{jenkins-ssh-credential}"
642 refspec: "$GERRIT_REFSPEC"
643 branch: "$GERRIT_BRANCH"
644 submodule-disable: true
645 submodule-recursive: false
646 submodule-timeout: 10
647 # release merge jobs build from commit not tip
648 choosing-strategy: gerrit
652 server-name: "{gerrit-server-name}"
654 - change-merged-event
655 - comment-added-contains-event:
656 comment-contains-value: '^Patch Set\s+\d+:\s+remerge\s*$'
658 - project-compare-type: "ANT"
659 project-pattern: "{project}"
661 - branch-compare-type: "ANT"
664 - compare-type: REG_EXP
665 pattern: '(releases\/packagecloud.*\.yaml|\.releases\/packagecloud.*\.yaml)'