blob: c903071bc090182cfcddde54ac3b5a83f95a55d7 [file] [log] [blame]
- job:
name: gerrit-ci-scripts
description: Gerrit Jenkins Job Builder Scripts
node: master
scm:
- git:
url: https://gerrit.googlesource.com/gerrit-ci-scripts
branches:
- '*/master'
skip-tag: true
triggers:
- pollscm:
cron: 'H/15 * * * *'
builders:
- shell: jenkins-jobs update --delete-old jenkins/.
- job:
name: gerrit-ci-scripts-docker
description: Gerrit Jenkins Job Builder Docker images
node: master
scm:
- git:
url: https://gerrit.googlesource.com/gerrit-ci-scripts
branches:
- '*/master'
skip-tag: true
triggers:
- timed: "@midnight"
builders:
- shell: docker system prune -af
- shell: |
export JENKINS_WAR_VER=2.60.3
export JENKINS_WAR_SHA=e62d9ed7eb3d29b08719e639c959cd328776ba50
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: master
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 '..$')
echo "CHANGE_COMMIT=refs/remotes/origin/$CHANGE_NUMBER_SUFFIX/$CHANGE_NUMBER/$CHANGE_REVISION" > env.properties
fi
override-build-parameters: true
scm:
- git:
url: https://gerrit.googlesource.com/gerrit-ci-scripts
refspec: +refs/changes/*:refs/remotes/origin/*
branches:
- '${CHANGE_COMMIT}'
skip-tag: true
builders:
- shell: |
if test -n "${JOBS}"; then
jenkins-jobs update jenkins ${JOBS}
else
jenkins-jobs update --delete-old jenkins
fi