blob: 958bfe3d73027dcff81c9893832987d72160d028 [file] [log] [blame]
- job:
name: gerrit-ci-scripts
description: Gerrit Jenkins Job Builder Scripts
node: server
scm:
- git:
url: https://gerrit.googlesource.com/a/gerrit-ci-scripts
credentials-id: gerrit.googlesource.com
branches:
- '*/remote-bb'
skip-tag: true
triggers:
- pollscm:
cron: 'H/15 * * * *'
builders:
- shell: jenkins-jobs update --delete-old jenkins-internal/.
- job:
name: gerrit-ci-scripts-docker
description: Gerrit Jenkins Job Builder Docker images
node: server
scm:
- git:
url: https://gerrit.googlesource.com/a/gerrit-ci-scripts
credentials-id: gerrit.googlesource.com
branches:
- '*/master'
skip-tag: true
triggers:
- timed: '@midnight'
builders:
- shell: docker system prune -af
- shell: |
export JENKINS_WAR_VER=2.204.1
export JENKINS_WAR_SHA=924d2c9fabfdcacee1bae757337a07d7599eaa35
cd jenkins-docker
make NO_CACHE=true build
- job:
name: gerrit-ci-scripts-manual
description: Manually rebuild gerrit-ci-scripts from a specific Change ID and revision
node: server
parameters:
- string:
name: CHANGE_NUMBER
description: 'Legacy Change ID of patch to build'
- string:
name: CHANGE_REVISION
default: '1'
description: 'Revision number of patch to build'
- string:
name: CHANGE_COMMIT
description: 'Optional SHA-1 hash of patch to build (takes precedence over Change ID)'
- string:
name: JOBS
description: >
One or several whitespace-separated jobs to update.
(All will be built if left blank.)
properties:
- inject:
properties-file: env.properties
script-content: |
if [ "$CHANGE_COMMIT" ]; then
echo "CHANGE_COMMIT=$CHANGE_COMMIT" > env.properties
else
CHANGE_NUMBER_SUFFIX=$(echo $CHANGE_NUMBER | grep -o '..$')
CHANGE_COMMIT=refs/remotes/origin/$CHANGE_NUMBER_SUFFIX/$CHANGE_NUMBER/$CHANGE_REVISION
echo "CHANGE_COMMIT=$CHANGE_COMMIT" > env.properties
fi
override-build-parameters: true
scm:
- git:
url: https://gerrit.googlesource.com/a/gerrit-ci-scripts
credentials-id: gerrit.googlesource.com
refspec: +refs/changes/*:refs/remotes/origin/*
branches:
- '${CHANGE_COMMIT}'
skip-tag: true
builders:
- shell: |
if test -n "${JOBS}"; then
jenkins-jobs update jenkins-internal ${JOBS}
else
jenkins-jobs update --delete-old jenkins-internal
fi
- job:
name: gerrit-ci-scripts-pipeline
description: Multi-branch pipeline to validate Gerrit's Jenkins Job Builder Scripts
project-type: multibranch
node: server
disabled: true
scm:
- gerrit:
url: https://gerrit-review.googlesource.com/a/gerrit-ci-scripts
credentials-id: gerrit.googlesource.com
refspecs:
- '+refs/heads/*:refs/remotes/@{remote}/*'
- '+refs/changes/*:refs/remotes/@{remote}/*'
property-strategies:
all-branches:
- suppress-scm-triggering: false
- pipeline-branch-durability-override: max-survivability
periodic-folder-trigger: 10m