From 3b7093573e6ea813ac00831fe4baab8ca244b45c Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Tue, 19 Jul 2016 14:20:20 -0700 Subject: [PATCH] Add 'builder-sandbox' job to Releng Any changes slated for the 'sandbox' branch of this repo will be published to https://sandbox.opnfv.org, with the exception of the releng-ci jobs themselves. This will provide visibility to changes slated for Jenkins and allow for easier understanding of how JJB works for new users. - Step [2/2] in publishing jobs to the Jenkins sandbox JIRA: RELENG-91 Change-Id: I94c28081b1d96e5eae76a4f1f11dcf5cb9b6cf35 Signed-off-by: Trevor Bramwell --- jjb/releng/releng-ci-jobs.yml | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index 60551f5bb..f346c1c5f 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -2,6 +2,7 @@ name: builder-jobs jobs: - 'builder-verify-jjb' + - 'builder-sandbox' - 'builder-merge' - 'artifacts-api' @@ -100,6 +101,55 @@ git pull jenkins-jobs update --delete-old jjb/ +- job-template: + name: 'builder-sandbox' + + # Upload all jjb jobs to sandbox instance, excluding jobs jjb + # builder jobs + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: 'master' + + scm: + - gerrit-trigger-scm: + credentials-id: '{ssh-credentials}' + refspec: '' + choosing-strategy: 'default' + + triggers: + - gerrit: + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: 'releng' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/sandbox' + file-paths: + - compare-type: ANT + pattern: jjb/** + - compare-type: ANT + pattern: utils/** + + builders: + - shell: + !include-raw: verify-releng.sh + - shell: | + #!/bin/bash + source /opt/virtualenv/jenkins-job-builder/bin/activate + cd /opt/jenkins-ci/releng + git pull + cp /etc/jenkins_jobs/jenkins_jobs.ini jenkins_sandbox.ini + sed -i 's/url=.*/url=https:\/\/sandbox.opnfv.org\//g' jenkins_sandbox.ini + jenkins-jobs --conf jenkins_sandbox.ini update -r -x jjb/releng --delete-old jjb + rm -f jenkins_sandbox.ini + - job-template: name: 'artifacts-api' -- 2.16.6