summaryrefslogtreecommitdiff
path: root/buildpipeline/pipelinejobs.groovy
blob: 75b26d100d67d5d6dda55546cca3cb141ef01e3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 linmuslPipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/linux-musl.groovy')

def configurations = [
    ['TGroup':"netcoreapp", 'Pipeline':linmuslPipeline, 'Name':'Linux-musl' ,'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 = ['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.