From ee7246cef477eb29ba674e83c3b2c0838f3cc0b4 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 18 Jun 2013 17:13:06 -0700 Subject: [PATCH] have the DSL setup the branch deploy job --- jenkins/jobs.groovy | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/jenkins/jobs.groovy b/jenkins/jobs.groovy index 28e58fc676..4c3ffd5d73 100644 --- a/jenkins/jobs.groovy +++ b/jenkins/jobs.groovy @@ -11,7 +11,9 @@ def hifiJob(String targetName, Boolean deploy) { logRotator(7, -1, -1, -1) scm { - git(GIT_REPO_URL) + git(GIT_REPO_URL, 'master') { node -> + node / includedRegions << "${targetName}/.*\nlibraries/.*" + } } configure { project -> @@ -29,10 +31,6 @@ def hifiJob(String targetName, Boolean deploy) { } } - project / 'scm' << { - includedRegions "${targetName}/.*\nlibraries/.*" - } - project / 'triggers' << 'com.cloudbees.jenkins.GitHubPushTrigger' { spec '' } @@ -104,8 +102,30 @@ def deployTargets = [ 'voxel-server' ] +/* setup all of the deploys jobs that use the above template */ + deployTargets.each { hifiJob(it, true) } -hifiJob('interface', false) \ No newline at end of file +/* setup the interface job, doesn't deploy */ + +hifiJob('interface', false) + +/* setup the parametrized-build job for builds from jenkins */ + +parametrizedJob = hifiJob('$TARGET', true) +parametrizedJob.with { + name 'hifi-branch-deploy' + parameters { + stringParam('GITHUB_USER', '', "Specifies the name of the GitHub user that we're building from.") + stringParam('GIT_BRANCH', '', "Specifies the specific branch to build and deploy.") + stringParam('HOSTNAME', 'devel.highfidelity.io', "Specifies the hostname to deploy against.") + stringParam('TARGET', '', "What server to build specifically") + } + scm { + git('git@github.com:/$GITHUB_USER/hifi.git', '$GIT_BRANCH') { node -> + node / 'wipeOutWorkspace' << true + } + } +} \ No newline at end of file