--- # Self-service job to lock/unlock a branch for release work or code-freeze # The job also can enable/disable supercommitter rights for any given branch. - job-template: name: "{project-name}-gerrit-branch-lock-{stream}" ###################### # Default parameters # ###################### branch: "**" disable-job: false git-url: "$GIT_URL/$GERRIT_PROJECT" submodule-timeout: 10 submodule-disable: true gerrit_merge_triggers: "" ##################### # Job Configuration # ##################### project-type: freestyle node: "{build-node}" disabled: "{disable-job}" properties: - lf-infra-properties: project: "{project}" build-days-to-keep: 1 parameters: - lf-infra-parameters: project: "{project}" stream: "{stream}" branch: "{branch}" - string: name: GERRIT_BRANCH_NEXT default: "" description: | Gerrit parameter to identify a new Gerrit branch for branch cutting. ex: stable/potassium, stable/argon - bool: name: DRY_RUN default: true description: | If DRY_RUN is enabled the permission changes are not pushed to Gerrit. - choice: name: GERRIT_ACCESS_MODE choices: - branch-cut - code-freeze - supercommitters - release-prep - unlock description: | If BRANCH_CUT is selected then the GERRIT_BRANCH and master is locked for registered users. If CODE_FREEZE is selected then the GERRIT_BRANCH is locked for registered users. If RELEASE_PREP is selected then the GERRIT_BRANCH is locked for registered users and unlocked for RELENG. If SUPERCOMMITTERS is selected then supercommitters rights are granted on the GERRIT_BRANCH. If UNLOCK is selected then the GERRIT_BRANCH is unlocked, anything under the section is removed. wrappers: - lf-infra-wrappers: build-timeout: 5 jenkins-ssh-credential: "{jenkins-ssh-credential}" scm: - lf-infra-gerrit-scm: git-url: "{git-url}" refspec: "" branch: "$GERRIT_BRANCH" submodule-recursive: false submodule-timeout: "{submodule-timeout}" submodule-disable: "{submodule-disable}" choosing-strategy: default jenkins-ssh-credential: "{jenkins-ssh-credential}" builders: - shell: !include-raw-escape: autorelease-gerrit-branch-lock.sh publishers: - lf-infra-publish - project: name: autorelease-branch-lock project: releng/autorelease project-name: autorelease jobs: - "{project-name}-gerrit-branch-lock-{stream}" stream: - scandium: branch: "master" - calcium: branch: "stable/calcium" - potassium: branch: "stable/potassium" - argon: branch: "stable/argon"