|
| 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