diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2016-02-23 08:44:34 -0800 |
---|---|---|
committer | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2016-02-23 08:44:34 -0800 |
commit | d9ac4207751ce7f108ecbfca28eeb45ea6aa2138 (patch) | |
tree | fe9ec04f5cf754e25f56a50ef69ca712f5c37e8f /jjb | |
parent | f083ab5969940a46670519224e88b8ec027d1b46 (diff) |
Add nodepool management jobs
Add jobs for doing nodepool management
Change-Id: I9d5b74850f51c7f950ccb3580c1aa7f981786494
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/ci-management/ci-management-jobs.yaml | 59 | ||||
-rw-r--r-- | jjb/ci-management/include-raw-merge-nodepool.sh | 19 | ||||
-rw-r--r-- | jjb/ci-management/include-raw-test-nodepool.sh | 6 |
3 files changed, 84 insertions, 0 deletions
diff --git a/jjb/ci-management/ci-management-jobs.yaml b/jjb/ci-management/ci-management-jobs.yaml index d9d2298a8..06bcb75ad 100644 --- a/jjb/ci-management/ci-management-jobs.yaml +++ b/jjb/ci-management/ci-management-jobs.yaml @@ -5,6 +5,8 @@ - 'ci-management-merge-jjb' - 'ci-management-verify-zuul' - 'ci-management-merge-zuul' + - 'ci-management-verify-nodepool' + - 'ci-management-merge-nodepool' - job-template: name: ci-management-verify-jjb @@ -122,3 +124,60 @@ !include-raw-escape: include-raw-test-zuul.sh - shell: !include-raw-escape: include-raw-merge-zuul.sh + +- job-template: + name: ci-management-verify-nodepool + + project-type: freestyle + node: np + 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-nodepool.sh + +- job-template: + name: ci-management-merge-nodepool + + project-type: freestyle + node: np + + 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-nodepool.sh + - shell: + !include-raw-escape: include-raw-merge-nodepool.sh diff --git a/jjb/ci-management/include-raw-merge-nodepool.sh b/jjb/ci-management/include-raw-merge-nodepool.sh new file mode 100644 index 000000000..661e382e6 --- /dev/null +++ b/jjb/ci-management/include-raw-merge-nodepool.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# vi: sw=4 ts=4 sts=4 et : + +cd "${WORKSPACE}/nodepool" +/usr/bin/diff nodepool.yaml /etc/nodepool/nodepool.yaml +RET=$? +if [ "${RET}" -ne '0' ] +then + echo + echo 'Nodepool layouts differ, updating layout' + echo + /usr/bin/sudo /usr/bin/cp nodepool.yaml /etc/nodepool/nodepool.yaml +else + echo + echo 'No differences in layout, not updating' + echo +fi + diff --git a/jjb/ci-management/include-raw-test-nodepool.sh b/jjb/ci-management/include-raw-test-nodepool.sh new file mode 100644 index 000000000..b4a949d8c --- /dev/null +++ b/jjb/ci-management/include-raw-test-nodepool.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +# activate the nodepool virtual env +source /opt/venv-nodepool/bin/activate + +nodepool -c ${WORKSPACE}/nodepool/nodepool.yaml config-validate |