Enable CI leg for Alpine Linux (dotnet/core-setup#3525)
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 14 Dec 2017 16:10:19 +0000 (17:10 +0100)
committerGitHub <noreply@github.com>
Thu, 14 Dec 2017 16:10:19 +0000 (17:10 +0100)
* Enable CI leg for Alpine Linux

* Remove unused arguments and triggers

* Enable the Alpine CI leg on each PR

Commit migrated from https://github.com/dotnet/core-setup/commit/f616e746d6b853797b6be28974377a2ea245a2d7

src/installer/buildpipeline/alpine.3.6.groovy [new file with mode: 0644]
src/installer/buildpipeline/pipelinejobs.groovy [new file with mode: 0644]

diff --git a/src/installer/buildpipeline/alpine.3.6.groovy b/src/installer/buildpipeline/alpine.3.6.groovy
new file mode 100644 (file)
index 0000000..69eda0b
--- /dev/null
@@ -0,0 +1,16 @@
+@Library('dotnet-ci') _
+
+// Incoming parameters.  Access with "params.<param name>".
+// 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.
+
+simpleDockerNode('microsoft/dotnet-buildtools-prereqs:alpine-3.6-3148f11-20171119021156') {
+    stage ('Checkout source') {
+        checkoutRepo()
+    }
+
+    stage ('Build Product') {
+        sh "./build.sh -ConfigurationGroup=${params.CGroup} -TargetArchitecture=${params.AGroup} -PortableBuild=false -strip-symbols -SkipTests=false -- /p:OutputRid=alpine.3.6-${params.AGroup}"
+    }
+}
diff --git a/src/installer/buildpipeline/pipelinejobs.groovy b/src/installer/buildpipeline/pipelinejobs.groovy
new file mode 100644 (file)
index 0000000..689c339
--- /dev/null
@@ -0,0 +1,49 @@
+// 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/core-setup)
+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 = [
+    ['Pipeline':alpine36Pipeline, 'Name':'Alpine.3.6' ,'ForPR':"Debug-x64", '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 = ['CGroup':configurationGroup,
+                  'AGroup':archGroup]
+
+    // 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)
+}}}
+
+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.