From 628ea5306fd18aa54a1221ea45ec3b4c801a65a8 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 12 Feb 2016 09:11:20 -0800 Subject: [PATCH] Switch to branch specific CI spec This configuration switches CLI to the new branch model. The branch is specified primarily in the repo list on dotnet-ci, then passed along to various utility functions. The configuration itself is read from the specified branch in the repo, and any PR's generated are branch specific. This means that changing the configuration in rel/1.0.0 will only affect the jobs that run against that branch --- netci.groovy | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/netci.groovy b/netci.groovy index 17e150f04..49d474f8a 100644 --- a/netci.groovy +++ b/netci.groovy @@ -6,19 +6,14 @@ import jobs.generation.Utilities; def project = GithubProject +def branch = GithubBranchName def osList = ['Ubuntu', 'OSX', 'Windows_NT', 'CentOS7.1'] -def machineLabelMap = ['Ubuntu':'ubuntu-doc', - 'OSX':'mac', - 'Windows_NT':'windows', - 'CentOS7.1' : 'centos-71'] - def static getBuildJobName(def configuration, def os) { return configuration.toLowerCase() + '_' + os.toLowerCase() } - [true, false].each { isPR -> ['Debug', 'Release'].each { configuration -> osList.each { os -> @@ -28,7 +23,6 @@ def static getBuildJobName(def configuration, def os) { // Calculate job name def jobName = getBuildJobName(configuration, os) def buildCommand = ''; - def postBuildCommand = ''; // Calculate the build command if (os == 'Windows_NT') { @@ -48,26 +42,15 @@ def static getBuildJobName(def configuration, def os) { else { // Shell shell(buildCommand) - - // Post Build Cleanup - publishers { - postBuildScripts { - steps { - shell(postBuildCommand) - } - onlyIfBuildSucceeds(false) - } - } - } } } Utilities.setMachineAffinity(newJob, os, 'latest-or-auto') - Utilities.standardJobSetup(newJob, project, isPR) + Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") Utilities.addXUnitDotNETResults(newJob, '**/*-testResults.xml') if (isPR) { - Utilities.addGithubPRTrigger(newJob, "${os} ${configuration} Build") + Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${configuration} Build") } else { Utilities.addGithubPushTrigger(newJob)