diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2016-02-22 11:43:14 -0800 |
---|---|---|
committer | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2016-02-22 11:46:56 -0800 |
commit | 85adc7bc2ba0669f552da830bba07cd029a666a4 (patch) | |
tree | 3dfd5e1fdcc88e5d1a0bbc70b8022f909a93e2f8 /jjb | |
parent | 2b0e2f99c893948655a5c7e41b6190fae8a7c0dd (diff) |
Add new verify / merge jobs for zuul
We need jobs to be able to manage zuul layout changes. This brings those
jobs in
Change-Id: If6397b0d7f52edc7f2668a2351c35e637ef92888
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/ci-management/ci-management-jobs.yaml | 60 | ||||
-rw-r--r-- | jjb/ci-management/include-raw-merge-zuul.sh | 16 | ||||
-rw-r--r-- | jjb/ci-management/include-raw-test-zuul.sh | 17 |
3 files changed, 92 insertions, 1 deletions
diff --git a/jjb/ci-management/ci-management-jobs.yaml b/jjb/ci-management/ci-management-jobs.yaml index fb5de572b..d9d2298a8 100644 --- a/jjb/ci-management/ci-management-jobs.yaml +++ b/jjb/ci-management/ci-management-jobs.yaml @@ -3,6 +3,8 @@ jobs: - 'ci-management-verify-jjb' - 'ci-management-merge-jjb' + - 'ci-management-verify-zuul' + - 'ci-management-merge-zuul' - job-template: name: ci-management-verify-jjb @@ -62,5 +64,61 @@ builders: - shell: - !include-raw-escape include-raw-jjb-update.sh + !include-raw-escape: include-raw-jjb-update.sh +- job-template: + name: ci-management-verify-zuul + + project-type: freestyle + node: jjb + concurrent: true + + logrotate: + daysToKeep: 30 + numToKeep: 10 + artifactDaysToKeep: -1 + artifactNumToKeep: 5 + + scm: + - zuul-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '$ZUUL_REF' + commit: '$ZUUL_COMMIT' + + wrappers: + - ssh-agent-credentials: + users: + - '{ssh-credentials}' + + builders: + - shell: + !include-raw-escape: include-raw-test-zuul.sh + +- job-template: + name: ci-management-merge-zuul + + project-type: freestyle + node: jjb + + logrotate: + daysToKeep: 30 + numToKeep: 40 + artifactDaysToKeep: -1 + artifactNumToKeep: 5 + + scm: + - zuul-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + commit: 'origin/$ZUUL_BRANCH' + + wrappers: + - ssh-agent-credentials: + users: + - '{ssh-credentials}' + + builders: + - shell: + !include-raw-escape: include-raw-test-zuul.sh + - shell: + !include-raw-escape: include-raw-merge-zuul.sh diff --git a/jjb/ci-management/include-raw-merge-zuul.sh b/jjb/ci-management/include-raw-merge-zuul.sh new file mode 100644 index 000000000..57456f6b9 --- /dev/null +++ b/jjb/ci-management/include-raw-merge-zuul.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# vi: sw=4 ts=4 sts=4 et : + +cd "${WORKSPACE}/zuul" +/usr/bin/diff layout.yaml /etc/zuul/layout.yaml +RET=$? +if [ "${RET}" -ne '0' ] +then + echo + echo 'Zuul layouts differ, updating layout and reloading zuul' + echo + /usr/bin/sudo /usr/bin/cp layout.yaml /etc/zuul/layout.yaml + /usr/bin/sudo /usr/bin/systemctl reload zuul +fi + diff --git a/jjb/ci-management/include-raw-test-zuul.sh b/jjb/ci-management/include-raw-test-zuul.sh new file mode 100644 index 000000000..24e0a8f8f --- /dev/null +++ b/jjb/ci-management/include-raw-test-zuul.sh @@ -0,0 +1,17 @@ +#!/bin/bash -e + +# activate the zuul virtual env on system that has tox installed +source /opt/venv-zuul/bin/activate + +rm -rf .test +mkdir .test +cd .test + +# track the upstream zuul HEAD, this may be honestly a little risky +# but the validations shouldn't fail often due to upstream changes +git clone https://github.com/openstack-infra/zuul --depth 1 +cd zuul + +# calling tox will actually build out a new virtualenv and use that +# which is honestly a little silly... but whatever +tox -e validate-layout $WORKSPACE/zuul/layout.yaml |