Feat: Branch cut stable/chlorine stream
[releng/builder.git] / jjb / autorelease / autorelease-branch-lock.yaml
1 ---
2 # Self-service job to lock/unlock a branch for release work or code-freeze
3 # The job also can enable/disable supercommitter rights for any given branch.
4 - job-template:
5     name: "{project-name}-gerrit-branch-lock-{stream}"
6
7     ######################
8     # Default parameters #
9     ######################
10
11     branch: "**"
12     disable-job: false
13     git-url: "$GIT_URL/$GERRIT_PROJECT"
14     submodule-timeout: 10
15     submodule-disable: true
16     gerrit_merge_triggers: ""
17
18     #####################
19     # Job Configuration #
20     #####################
21
22     project-type: freestyle
23     node: "{build-node}"
24     disabled: "{disable-job}"
25
26     properties:
27       - lf-infra-properties:
28           project: "{project}"
29           build-days-to-keep: 1
30
31     parameters:
32       - lf-infra-parameters:
33           project: "{project}"
34           stream: "{stream}"
35           branch: "{branch}"
36       - string:
37           name: GERRIT_BRANCH_NEXT
38           default: ""
39           description: |
40             Gerrit parameter to identify a new Gerrit branch for branch cutting.
41             ex: stable/sulfur, stable/chlorine
42       - bool:
43           name: DRY_RUN
44           default: true
45           description: |
46             If DRY_RUN is enabled the permission changes are not pushed to Gerrit.
47       - choice:
48           name: GERRIT_ACCESS_MODE
49           choices:
50             - branch-cut
51             - code-freeze
52             - supercommitters
53             - release-prep
54             - unlock
55           description: |
56             If BRANCH_CUT is selected then the GERRIT_BRANCH and master is locked for registered users.
57             If CODE_FREEZE is selected then the GERRIT_BRANCH is locked for registered users.
58             If RELEASE_PREP is selected then the GERRIT_BRANCH is locked for registered users and unlocked for RELENG.
59             If SUPERCOMMITTERS is selected then supercommitters rights are granted on the GERRIT_BRANCH.
60             If UNLOCK is selected then the GERRIT_BRANCH is unlocked, anything under the section is removed.
61
62     wrappers:
63       - lf-infra-wrappers:
64           build-timeout: 5
65           jenkins-ssh-credential: "{jenkins-ssh-credential}"
66
67     scm:
68       - lf-infra-gerrit-scm:
69           git-url: "{git-url}"
70           refspec: ""
71           branch: "$GERRIT_BRANCH"
72           submodule-recursive: false
73           submodule-timeout: "{submodule-timeout}"
74           submodule-disable: "{submodule-disable}"
75           choosing-strategy: default
76           jenkins-ssh-credential: "{jenkins-ssh-credential}"
77
78     builders:
79       - shell: !include-raw-escape: autorelease-gerrit-branch-lock.sh
80
81     publishers:
82       - lf-infra-publish
83
84 - project:
85     name: autorelease-branch-lock
86     project: releng/autorelease
87     project-name: autorelease
88     jobs:
89       - "{project-name}-gerrit-branch-lock-{stream}"
90     stream:
91       - argon:
92           branch: "master"
93       - chlorine:
94           branch: "stable/chlorine"
95       - sulfur:
96           branch: "stable/sulfur"
97       - phosphorus:
98           branch: "stable/phosphorus"