From 0dc1bb97b79aa878d2ed00c33641e46df31e626b Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Tue, 2 Aug 2016 11:02:29 -0700 Subject: [PATCH 1/4] Added netci for jenkins --- netci.groovy | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 netci.groovy diff --git a/netci.groovy b/netci.groovy new file mode 100644 index 000000000000..d4afb942b8a0 --- /dev/null +++ b/netci.groovy @@ -0,0 +1,33 @@ +import jobs.generation.Utilities +import jobs.generation.InternalUtilities + +def project = GithubProject +def branch = GithubBranchName + +// Generate a PR/nonPR job for debug (test only), which just does testing. +[true, false].each { isPR -> + ['Debug', 'Release'].each { config -> + def lowerCaseConfig = config.toLowerCase() + + def newJobName = InternalUtilities.getFullJobName(project, "windows_$lowerCaseConfig", isPR) + + def newJob = job(newJobName) { + steps { + batchFile("build.cmd /$lowerCaseConfig") + } + } + + // TODO: For when we actually have unit tests in this repo + // Utilities.addXUnitDotNETResults(myJob, '**/xUnitResults/*.xml') + + Utilities.setMachineAffinity(newJob, 'Windows_NT') + InternalUtilities.standardJobSetup(newJob, project, isPR, "*/${branch}") + Utilities.addHtmlPublisher(newJob, "TestResults", "Unit Test Results", "index.html") + + if (isPR) { + Utilities.addGithubPRTriggerForBranch(newJob, branch, "Windows $config") + } else { + Utilities.addGithubPushTrigger(newJob) + } + } +} \ No newline at end of file From 1e867c8aaa3e5eb111147e7d77d0426b2a78c2cb Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 3 Aug 2016 10:06:16 -0700 Subject: [PATCH 2/4] Addressed PR feedback --- netci.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netci.groovy b/netci.groovy index d4afb942b8a0..4e7718ad16d5 100644 --- a/netci.groovy +++ b/netci.groovy @@ -13,14 +13,14 @@ def branch = GithubBranchName def newJob = job(newJobName) { steps { - batchFile("build.cmd /$lowerCaseConfig") + batchFile("build.cmd -Configuration $config") } } // TODO: For when we actually have unit tests in this repo // Utilities.addXUnitDotNETResults(myJob, '**/xUnitResults/*.xml') - Utilities.setMachineAffinity(newJob, 'Windows_NT') + Utilities.setMachineAffinity(newJob, 'Windows_NT', 'latest-or-auto-internal') InternalUtilities.standardJobSetup(newJob, project, isPR, "*/${branch}") Utilities.addHtmlPublisher(newJob, "TestResults", "Unit Test Results", "index.html") From 0de41182d865bb586ae067bea7e23e5b636eaa2c Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 3 Aug 2016 11:35:20 -0700 Subject: [PATCH 3/4] Removed non-pr jobs --- netci.groovy | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/netci.groovy b/netci.groovy index 4e7718ad16d5..07717669e903 100644 --- a/netci.groovy +++ b/netci.groovy @@ -5,29 +5,23 @@ def project = GithubProject def branch = GithubBranchName // Generate a PR/nonPR job for debug (test only), which just does testing. -[true, false].each { isPR -> - ['Debug', 'Release'].each { config -> - def lowerCaseConfig = config.toLowerCase() +['Debug', 'Release'].each { config -> + def lowerCaseConfig = config.toLowerCase() - def newJobName = InternalUtilities.getFullJobName(project, "windows_$lowerCaseConfig", isPR) + def newJobName = InternalUtilities.getFullJobName(project, "windows_$lowerCaseConfig", true /* isPR */) - def newJob = job(newJobName) { - steps { - batchFile("build.cmd -Configuration $config") - } + def newJob = job(newJobName) { + steps { + batchFile("build.cmd -Configuration $config") } + } - // TODO: For when we actually have unit tests in this repo - // Utilities.addXUnitDotNETResults(myJob, '**/xUnitResults/*.xml') + // TODO: For when we actually have unit tests in this repo + // Utilities.addXUnitDotNETResults(myJob, '**/xUnitResults/*.xml') - Utilities.setMachineAffinity(newJob, 'Windows_NT', 'latest-or-auto-internal') - InternalUtilities.standardJobSetup(newJob, project, isPR, "*/${branch}") - Utilities.addHtmlPublisher(newJob, "TestResults", "Unit Test Results", "index.html") + Utilities.setMachineAffinity(newJob, 'Windows_NT', 'latest-or-auto-internal') + InternalUtilities.standardJobSetup(newJob, project, true /* isPR */, "*/${branch}") + Utilities.addHtmlPublisher(newJob, "TestResults", "Unit Test Results", "index.html") - if (isPR) { - Utilities.addGithubPRTriggerForBranch(newJob, branch, "Windows $config") - } else { - Utilities.addGithubPushTrigger(newJob) - } - } + Utilities.addGithubPRTriggerForBranch(newJob, branch, "Windows $config") } \ No newline at end of file From 304615e9a51d5ff63605c359e00cdf50de7e876c Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 3 Aug 2016 12:33:58 -0700 Subject: [PATCH 4/4] Updated Jenkins comment --- netci.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netci.groovy b/netci.groovy index 07717669e903..f81c15b1ccd9 100644 --- a/netci.groovy +++ b/netci.groovy @@ -4,7 +4,7 @@ import jobs.generation.InternalUtilities def project = GithubProject def branch = GithubBranchName -// Generate a PR/nonPR job for debug (test only), which just does testing. +// Generate a PR job for debug (test only), which just does testing. ['Debug', 'Release'].each { config -> def lowerCaseConfig = config.toLowerCase()