From d13d13ec1061fecd588a7723b7c4610ef4f21188 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Wed, 13 Dec 2017 17:46:58 +0100 Subject: [PATCH 1/2] Enable Alpine CI This enables Alpine CI on demand using the pipelines. --- buildpipeline/alpine.3.6.groovy | 24 ++++++++++++++ buildpipeline/pipelinejobs.groovy | 55 +++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 buildpipeline/alpine.3.6.groovy create mode 100644 buildpipeline/pipelinejobs.groovy diff --git a/buildpipeline/alpine.3.6.groovy b/buildpipeline/alpine.3.6.groovy new file mode 100644 index 000000000000..d82ae726c0f8 --- /dev/null +++ b/buildpipeline/alpine.3.6.groovy @@ -0,0 +1,24 @@ +@Library('dotnet-ci') _ + +// Incoming parameters. Access with "params.". +// Note that the parameters will be set as env variables so we cannot use names that conflict +// with the engineering system parameter names. +// CGroup - Build configuration. +// TestOuter - If true, runs outerloop, if false runs just innerloop + +simpleDockerNode('microsoft/dotnet-buildtools-prereqs:alpine-3.6-3148f11-20171119021156') { + stage ('Checkout source') { + checkoutRepo() + } + + stage ('Initialize tools') { + // Init tools + sh './init-tools.sh' + } + stage ('Sync') { + sh "./sync.sh" + } + stage ('Build Product') { + sh "./build.sh -x64 -${params.CGroup} -skiprestore -stripSymbols -portablebuild=false" + } +} diff --git a/buildpipeline/pipelinejobs.groovy b/buildpipeline/pipelinejobs.groovy new file mode 100644 index 000000000000..fdc433c75b23 --- /dev/null +++ b/buildpipeline/pipelinejobs.groovy @@ -0,0 +1,55 @@ +// Import the utility functionality. + +import jobs.generation.JobReport; +import jobs.generation.Utilities; +import org.dotnet.ci.pipelines.Pipeline + +// The input project name (e.g. dotnet/coreclr) +def project = GithubProject +// The input branch name (e.g. master) +def branch = GithubBranchName + +// ************************** +// Define innerloop testing. Any configuration in ForPR will run for every PR but all other configurations +// will have a trigger that can be +// ************************** + +def alpine36Pipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/alpine.3.6.groovy') + +def configurations = [ + ['TGroup':"netcoreapp", 'Pipeline':alpine36Pipeline, 'Name':'Alpine.3.6' ,'ForPR':"", 'Arch':['x64']], +] + +configurations.each { config -> + ['Debug', 'Release'].each { configurationGroup -> + (config.Arch ?: ['x64', 'x86']).each { archGroup -> + def triggerName = "${config.Name} ${archGroup} ${configurationGroup} Build" + + def pipeline = config.Pipeline + def params = ['TGroup':config.TGroup, + 'CGroup':configurationGroup, + 'AGroup':archGroup, + 'TestOuter': false] + + // Add default PR triggers for particular configurations but manual triggers for all + if (config.ForPR.contains("${configurationGroup}-${archGroup}")) { + pipeline.triggerPipelineOnEveryGithubPR(triggerName, params) + } + else { + pipeline.triggerPipelineOnGithubPRComment(triggerName, params) + } + + // Add trigger for all configurations to run on merge + pipeline.triggerPipelineOnGithubPush(params) + + // Add optional PR trigger for Outerloop test runs + params.TestOuter = true + pipeline.triggerPipelineOnGithubPRComment("Outerloop ${triggerName}", params) +}}} + +JobReport.Report.generateJobReport(out) + +// Make the call to generate the help job +Utilities.createHelperJob(this, project, branch, + "Welcome to the ${project} Repository", // This is prepended to the help message + "Have a nice day!") // This is appended to the help message. You might put known issues here. From 563cc98c58204c7adca4bd255ca610c4658e887f Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Wed, 13 Dec 2017 23:03:57 +0100 Subject: [PATCH 2/2] Enable the Alpine CI test on every PR --- buildpipeline/pipelinejobs.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildpipeline/pipelinejobs.groovy b/buildpipeline/pipelinejobs.groovy index fdc433c75b23..af85f51fe885 100644 --- a/buildpipeline/pipelinejobs.groovy +++ b/buildpipeline/pipelinejobs.groovy @@ -17,7 +17,7 @@ def branch = GithubBranchName def alpine36Pipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/alpine.3.6.groovy') def configurations = [ - ['TGroup':"netcoreapp", 'Pipeline':alpine36Pipeline, 'Name':'Alpine.3.6' ,'ForPR':"", 'Arch':['x64']], + ['TGroup':"netcoreapp", 'Pipeline':alpine36Pipeline, 'Name':'Alpine.3.6' ,'ForPR':"Debug-x64", 'Arch':['x64']], ] configurations.each { config ->