Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 6cc8720

Browse files
authored
Enable Alpine CI (#15502)
* Enable Alpine CI This enables Alpine CI leg on every PR using the pipelines.
1 parent 89e85cf commit 6cc8720

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

buildpipeline/alpine.3.6.groovy

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@Library('dotnet-ci') _
2+
3+
// Incoming parameters. Access with "params.<param name>".
4+
// Note that the parameters will be set as env variables so we cannot use names that conflict
5+
// with the engineering system parameter names.
6+
// CGroup - Build configuration.
7+
// TestOuter - If true, runs outerloop, if false runs just innerloop
8+
9+
simpleDockerNode('microsoft/dotnet-buildtools-prereqs:alpine-3.6-3148f11-20171119021156') {
10+
stage ('Checkout source') {
11+
checkoutRepo()
12+
}
13+
14+
stage ('Initialize tools') {
15+
// Init tools
16+
sh './init-tools.sh'
17+
}
18+
stage ('Sync') {
19+
sh "./sync.sh"
20+
}
21+
stage ('Build Product') {
22+
sh "./build.sh -x64 -${params.CGroup} -skiprestore -stripSymbols -portablebuild=false"
23+
}
24+
}

buildpipeline/pipelinejobs.groovy

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Import the utility functionality.
2+
3+
import jobs.generation.JobReport;
4+
import jobs.generation.Utilities;
5+
import org.dotnet.ci.pipelines.Pipeline
6+
7+
// The input project name (e.g. dotnet/coreclr)
8+
def project = GithubProject
9+
// The input branch name (e.g. master)
10+
def branch = GithubBranchName
11+
12+
// **************************
13+
// Define innerloop testing. Any configuration in ForPR will run for every PR but all other configurations
14+
// will have a trigger that can be
15+
// **************************
16+
17+
def alpine36Pipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/alpine.3.6.groovy')
18+
19+
def configurations = [
20+
['TGroup':"netcoreapp", 'Pipeline':alpine36Pipeline, 'Name':'Alpine.3.6' ,'ForPR':"Debug-x64", 'Arch':['x64']],
21+
]
22+
23+
configurations.each { config ->
24+
['Debug', 'Release'].each { configurationGroup ->
25+
(config.Arch ?: ['x64', 'x86']).each { archGroup ->
26+
def triggerName = "${config.Name} ${archGroup} ${configurationGroup} Build"
27+
28+
def pipeline = config.Pipeline
29+
def params = ['TGroup':config.TGroup,
30+
'CGroup':configurationGroup,
31+
'AGroup':archGroup,
32+
'TestOuter': false]
33+
34+
// Add default PR triggers for particular configurations but manual triggers for all
35+
if (config.ForPR.contains("${configurationGroup}-${archGroup}")) {
36+
pipeline.triggerPipelineOnEveryGithubPR(triggerName, params)
37+
}
38+
else {
39+
pipeline.triggerPipelineOnGithubPRComment(triggerName, params)
40+
}
41+
42+
// Add trigger for all configurations to run on merge
43+
pipeline.triggerPipelineOnGithubPush(params)
44+
45+
// Add optional PR trigger for Outerloop test runs
46+
params.TestOuter = true
47+
pipeline.triggerPipelineOnGithubPRComment("Outerloop ${triggerName}", params)
48+
}}}
49+
50+
JobReport.Report.generateJobReport(out)
51+
52+
// Make the call to generate the help job
53+
Utilities.createHelperJob(this, project, branch,
54+
"Welcome to the ${project} Repository", // This is prepended to the help message
55+
"Have a nice day!") // This is appended to the help message. You might put known issues here.

0 commit comments

Comments
 (0)