Feat: Branch cut for stable/sulfur 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       - bool:
37           name: DRY_RUN
38           default: true
39           description: |
40             If DRY_RUN is enabled the permission changes are not pushed to Gerrit.
41       - choice:
42           name: GERRIT_ACCESS_MODE
43           choices:
44             - code-freeze
45             - supercommitters
46             - release-prep
47             - unlock
48           description: |
49             If CODE_FREEZE is selected then the GERRIT_BRANCH is locked for registered users.
50             If RELEASE_PREP is selected then the GERRIT_BRANCH is locked for registered users and unlocked for RELENG.
51             If SUPERCOMMITTERS is selected then supercommitters rights are granted on the GERRIT_BRANCH.
52             If UNLOCK is selected then the GERRIT_BRANCH is unlocked, anything under the section is removed.
53
54     wrappers:
55       - lf-infra-wrappers:
56           build-timeout: 5
57           jenkins-ssh-credential: "{jenkins-ssh-credential}"
58
59     scm:
60       - lf-infra-gerrit-scm:
61           git-url: "{git-url}"
62           refspec: ""
63           branch: "$GERRIT_BRANCH"
64           submodule-recursive: false
65           submodule-timeout: "{submodule-timeout}"
66           submodule-disable: "{submodule-disable}"
67           choosing-strategy: default
68           jenkins-ssh-credential: "{jenkins-ssh-credential}"
69
70     builders:
71       - shell: !include-raw-escape: autorelease-gerrit-branch-lock.sh
72
73     publishers:
74       - lf-infra-publish
75
76 - project:
77     name: autorelease-branch-lock
78     project: releng/autorelease
79     project-name: autorelease
80     jobs:
81       - "{project-name}-gerrit-branch-lock-{stream}"
82     stream:
83       - chlorine:
84           branch: "master"
85       - sulfur:
86           branch: "stable/sulfur"
87       - phosphorus:
88           branch: "stable/phosphorus"
89       - silicon:
90           branch: "stable/silicon"