Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWes Haggard <Wes.Haggard@microsoft.com>2017-05-31 20:43:58 +0300
committerWes Haggard <Wes.Haggard@microsoft.com>2017-06-20 00:56:22 +0300
commitbbd891fb33544f0768447c999543db15e165af00 (patch)
treec3c93ba77bc7bdc2c11b0c1d0db864bd1c2ce651 /buildpipeline
parent4a9c4c8c1a6e4b2d9f3245a63a67b61eb8c68382 (diff)
Update CI scripts to use pipeline jobs for most
See https://github.com/dotnet/corefx/issues/21135 for details Move most CI jobs from netci.groovy to buildpipeline.groovy Update the names to make them more concise and consistent Setup manual triggers for all supported combinations but only enable default PR triggers for a mix of architecture and configuration flavor to help with resources and reliability. Tizen and Linux arm are the only default triggers that still live in netci.groovy. We should consider moving those at a future point. Removed most CI legs from netci.groovy but kept the netcoreapp legs because they are still used by CoreCLR test scripts. We should move off of those eventually.
Diffstat (limited to 'buildpipeline')
-rw-r--r--buildpipeline/linux.groovy (renamed from buildpipeline/portable-linux.groovy)25
-rw-r--r--buildpipeline/osx.groovy49
-rw-r--r--buildpipeline/pipelinejobs.groovy76
-rw-r--r--buildpipeline/portable-windows.groovy71
-rw-r--r--buildpipeline/windows.groovy107
5 files changed, 212 insertions, 116 deletions
diff --git a/buildpipeline/portable-linux.groovy b/buildpipeline/linux.groovy
index 31581157fa..26414a56be 100644
--- a/buildpipeline/portable-linux.groovy
+++ b/buildpipeline/linux.groovy
@@ -1,9 +1,10 @@
@Library('dotnet-ci') _
// Incoming parameters. Access with "params.<param name>".
-// Config - Build configuration. Note that we don't using 'Configuration' since it's used
-// in the build scripts and this can cause problems.
-// OuterLoop - If true, runs outerloop, if false runs just innerloop
+// 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
def submittedHelixJson = null
@@ -35,14 +36,14 @@ simpleDockerNode('microsoft/dotnet-buildtools-prereqs:rhel7_prereqs_2') {
sh "./sync.sh -p -- /p:ArchGroup=x64"
}
stage ('Build Product') {
- sh "./build.sh -buildArch=x64 -${params.Config}"
+ sh "./build.sh -buildArch=x64 -${params.CGroup}"
}
stage ('Build Tests') {
def additionalArgs = ''
- if (params.OuterLoop) {
+ if (params.TestOuter) {
additionalArgs = '-Outerloop'
}
- sh "./build-tests.sh -buildArch=x64 -${params.Config} -SkipTests ${additionalArgs} -- /p:ArchiveTests=true /p:EnableDumpling=true"
+ sh "./build-tests.sh -buildArch=x64 -${params.CGroup} -SkipTests ${additionalArgs} -- /p:ArchiveTests=true /p:EnableDumpling=true"
}
stage ('Submit To Helix For Testing') {
// Bind the credentials
@@ -63,14 +64,14 @@ simpleDockerNode('microsoft/dotnet-buildtools-prereqs:rhel7_prereqs_2') {
'Ubuntu.1610.Amd64.Open',
'suse.422.amd64.Open',
'fedora.25.amd64.Open',]
- if (params.OuterLoop) {
+ if (params.TestOuter) {
targetHelixQueues += ['Debian.90.Amd64.Open',
'Fedora.26.Amd64.Open',
'SLES.12.Amd64.Open',
'Ubuntu.1704.Amd64.Open',]
- }
+ }
- sh "./Tools/msbuild.sh src/upload-tests.proj /p:ArchGroup=x64 /p:ConfigurationGroup=${params.Config} /p:TestProduct=corefx /p:TimeoutInSeconds=1200 /p:TargetOS=Linux /p:HelixJobType=test/functional/cli/ /p:HelixSource=${helixSource} /p:BuildMoniker=${helixBuild} /p:HelixCreator=${helixCreator} /p:CloudDropAccountName=dotnetbuilddrops /p:CloudResultsAccountName=dotnetjobresults /p:CloudDropAccessToken=\$CloudDropAccessToken /p:CloudResultsAccessToken=\$OutputCloudResultsAccessToken /p:HelixApiEndpoint=https://helix.dot.net/api/2017-04-14/jobs /p:TargetQueues=${targetHelixQueues.join('+')} /p:HelixLogFolder=${WORKSPACE}/${logFolder}/ /p:HelixCorrelationInfoFileName=SubmittedHelixRuns.txt"
+ sh "./Tools/msbuild.sh src/upload-tests.proj /p:ArchGroup=x64 /p:ConfigurationGroup=${params.CGroup} /p:TestProduct=corefx /p:TimeoutInSeconds=1200 /p:TargetOS=Linux /p:HelixJobType=test/functional/cli/ /p:HelixSource=${helixSource} /p:BuildMoniker=${helixBuild} /p:HelixCreator=${helixCreator} /p:CloudDropAccountName=dotnetbuilddrops /p:CloudResultsAccountName=dotnetjobresults /p:CloudDropAccessToken=\$CloudDropAccessToken /p:CloudResultsAccessToken=\$OutputCloudResultsAccessToken /p:HelixApiEndpoint=https://helix.dot.net/api/2017-04-14/jobs /p:TargetQueues=${targetHelixQueues.join('+')} /p:HelixLogFolder=${WORKSPACE}/${logFolder}/ /p:HelixCorrelationInfoFileName=SubmittedHelixRuns.txt"
submittedHelixJson = readJSON file: "${logFolder}/SubmittedHelixRuns.txt"
}
@@ -79,11 +80,11 @@ simpleDockerNode('microsoft/dotnet-buildtools-prereqs:rhel7_prereqs_2') {
stage ('Execute Tests') {
def contextBase
- if (params.OuterLoop) {
- contextBase = "Linux x64 Tests w/outer - ${params.Config}"
+ if (params.TestOuter) {
+ contextBase = "Linux x64 Tests w/outer - ${params.CGroup}"
}
else {
- contextBase = "Linux x64 Tests - ${params.Config}"
+ contextBase = "Linux x64 Tests - ${params.CGroup}"
}
waitForHelixRuns(submittedHelixJson, contextBase)
} \ No newline at end of file
diff --git a/buildpipeline/osx.groovy b/buildpipeline/osx.groovy
new file mode 100644
index 0000000000..72b0275ca7
--- /dev/null
+++ b/buildpipeline/osx.groovy
@@ -0,0 +1,49 @@
+@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.
+// TestOuter - If true, runs outerloop, if false runs just innerloop
+
+def submittedHelixJson = null
+
+simpleNode('OSX10.12','latest') {
+ stage ('Checkout source') {
+ checkout scm
+ }
+
+ def logFolder = getLogFolder()
+
+ stage ('Initialize tools') {
+ try {
+ // Workaround nuget issue https://github.com/NuGet/Home/issues/5085 were we need to set HOME
+ // Init tools
+ sh 'HOME=\$WORKSPACE/tempHome ./init-tools.sh'
+ }
+ catch (err) {
+ // On errors for build tools initializations, it's useful to echo the contents of the file
+ // for easy diagnosis. This could also be copied to the log directory
+ sh 'cat init-tools.log'
+ // Ensure the build result is still propagated.
+ throw err
+ }
+ }
+ stage ('Generate version assets') {
+ // Generate the version assets. Do we need to even do this for non-official builds?
+ sh "./build-managed.sh -- /t:GenerateVersionSourceFile /p:GenerateVersionSourceFile=true"
+ }
+ stage ('Sync') {
+ sh "HOME=\$WORKSPACE/tempHome ./sync.sh -p -- /p:ArchGroup=x64"
+ }
+ stage ('Build Product') {
+ sh "HOME=\$WORKSPACE/tempHome ./build.sh -buildArch=x64 -${params.CGroup}"
+ }
+ stage ('Build Tests') {
+ def additionalArgs = ''
+ if (params.TestOuter) {
+ additionalArgs = '-Outerloop'
+ }
+ sh "HOME=\$WORKSPACE/tempHome ./build-tests.sh -buildArch=x64 -${params.CGroup} ${additionalArgs} -- /p:ArchiveTests=true /p:EnableDumpling=true"
+ }
+} \ No newline at end of file
diff --git a/buildpipeline/pipelinejobs.groovy b/buildpipeline/pipelinejobs.groovy
index 3bd0a3a47d..69778eb356 100644
--- a/buildpipeline/pipelinejobs.groovy
+++ b/buildpipeline/pipelinejobs.groovy
@@ -10,40 +10,50 @@ def project = GithubProject
def branch = GithubBranchName
// **************************
-// Define innerloop testing. These jobs run on every merge and a subset of them run on every PR, the ones
-// that don't run per PR can be requested via a magic phrase.
+// Define innerloop testing. Any configuration in ForPR will run for every PR but all other configurations
+// will have a trigger that can be
// **************************
-def linuxPipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/portable-linux.groovy')
-
-['netcoreapp'].each { targetGroup ->
- ['Debug', 'Release'].each { configurationGroup ->
- ['Linux x64'].each { osName ->
- // Runs the portable-linux.groovy pipeline on the target Helix queues mentioned in the pipeline. Currently:
- // CentOS 7.3, RedHat 7.3, Debian 8.7, Ubuntu 14.04, Ubuntu 16.04, Ubuntu 16.10, openSuSE 42.2 and Fedora 25
-
- // One for just innerloop.
- linuxPipeline.triggerPipelineOnEveryGithubPR("Portable ${osName} ${configurationGroup} Build", ['Config':configurationGroup, 'OuterLoop':false])
- // Add one for outerloop
- linuxPipeline.triggerPipelineOnGithubPRComment("Portable Outerloop ${osName} ${configurationGroup} Build", ['Config':configurationGroup, 'OuterLoop':true])
- }
- }
-}
-
-// Create a pipeline for portable windows
-def windowsPipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/portable-windows.groovy')
-['netcoreapp'].each { targetGroup ->
- ['Debug', 'Release'].each { configurationGroup ->
- ['Windows x64'].each { osName ->
- // Runs the portable-windows.groovy pipeline on the target Helix queues mentioned in the pipeline. Currently:
- // Windows 10, Windows 7, Windows 8.1 and Windows Nano
-
- // One for just innerloop
- windowsPipeline.triggerPipelineOnEveryGithubPR("Portable ${osName} ${configurationGroup} Build", ['Config':configurationGroup, 'OuterLoop':false])
- // Add one for outerloop
- windowsPipeline.triggerPipelineOnGithubPRComment("Portable Outerloop ${osName} ${configurationGroup} Build", ['Config':configurationGroup, 'OuterLoop':true])
- }
- }
-}
+
+def linPipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/linux.groovy')
+def osxPipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/osx.groovy')
+def winPipeline = Pipeline.createPipelineForGithub(this, project, branch, 'buildpipeline/windows.groovy')
+
+def configurations = [
+ ['TGroup':"netcoreapp", 'Pipeline':linPipeline, 'Name':'Linux' ,'ForPR':"Release-x64", 'Arch':['x64']],
+ ['TGroup':"netcoreapp", 'Pipeline':osxPipeline, 'Name':'OSX', 'ForPR':"Debug-x64", 'Arch':['x64']],
+ ['TGroup':"netcoreapp", 'Pipeline':winPipeline, 'Name':'Windows' , 'ForPR':"Debug-x64|Release-x86"],
+ ['TGroup':"netfx", 'Pipeline':winPipeline, 'Name':'NETFX', 'ForPR':"Release-x86"],
+ ['TGroup':"uap", 'Pipeline':winPipeline, 'Name':'UWP CoreCLR', 'ForPR':"Debug-x64"],
+ ['TGroup':"uapaot", 'Pipeline':winPipeline, 'Name':'UWP NETNative', 'ForPR':"Release-x86"],
+ ['TGroup':"all", 'Pipeline':winPipeline, 'Name':'Packaging All Configurations', 'ForPR':"Debug-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)
diff --git a/buildpipeline/portable-windows.groovy b/buildpipeline/portable-windows.groovy
deleted file mode 100644
index e5f222c0f6..0000000000
--- a/buildpipeline/portable-windows.groovy
+++ /dev/null
@@ -1,71 +0,0 @@
-@Library('dotnet-ci') _
-
-// Incoming parameters. Access with "params.<param name>".
-// Config - Build configuration. Note that we don't using 'Configuration' since it's used
-// in the build scripts and this can cause problems.
-// OuterLoop - If true, runs outerloop, if false runs just innerloop
-
-def submittedHelixJson = null
-
-simpleNode('Windows_NT','latest') {
- stage ('Checkout source') {
- retry (10) {
- checkout scm
- }
- }
-
- def logFolder = getLogFolder()
-
- stage ('Clean') {
- bat '.\\clean.cmd -all'
- }
- stage ('Sync') {
- bat '.\\sync.cmd -p -- /p:ArchGroup=x64 /p:RuntimeOS=win10'
- }
- stage ('Generate Version Assets') {
- bat '.\\build-managed.cmd -GenerateVersion'
- }
- stage ('Build Product') {
- bat ".\\build.cmd -buildArch=x64 -${params.Config} -- /p:SignType=real /p:RuntimeOS=win10"
- }
- stage ('Build Tests') {
- def additionalArgs = ''
- if (params.OuterLoop) {
- additionalArgs = '-Outerloop'
- }
- bat ".\\build-tests.cmd -buildArch=x64 -${params.Config} -SkipTests ${additionalArgs} -- /p:RuntimeOS=win10 /p:ArchiveTests=true"
- }
- stage ('Submit To Helix For Testing') {
- // Bind the credentials
- withCredentials([string(credentialsId: 'CloudDropAccessToken', variable: 'CloudDropAccessToken'),
- string(credentialsId: 'OutputCloudResultsAccessToken', variable: 'OutputCloudResultsAccessToken')]) {
- // Ask the CI SDK for a Helix source that makes sense. This ensures that this pipeline works for both PR and non-PR cases
- def helixSource = getHelixSource()
- // Ask the CI SDK for a Build that makes sense. We currently use the hash for the build
- def helixBuild = getCommit()
- // Get the user that should be associated with the submission
- def helixCreator = getUser()
-
- // Target queues
- def targetHelixQueues = ['Windows.10.Amd64.Open',
- 'Windows.10.Nano.Amd64.Open',
- 'Windows.7.Amd64.Open',
- 'Windows.81.Amd64.Open']
-
- bat "\"%VS140COMNTOOLS%\\VsDevCmd.bat\" && msbuild src\\upload-tests.proj /p:ArchGroup=x64 /p:ConfigurationGroup=${params.Config} /p:TestProduct=corefx /p:TimeoutInSeconds=1200 /p:TargetOS=Windows_NT /p:HelixJobType=test/functional/cli/ /p:HelixSource=${helixSource} /p:BuildMoniker=${helixBuild} /p:HelixCreator=${helixCreator} /p:CloudDropAccountName=dotnetbuilddrops /p:CloudResultsAccountName=dotnetjobresults /p:CloudDropAccessToken=%CloudDropAccessToken% /p:CloudResultsAccessToken=%OutputCloudResultsAccessToken% /p:HelixApiEndpoint=https://helix.dot.net/api/2017-04-14/jobs /p:TargetQueues=\"${targetHelixQueues.join(',')}\" /p:HelixLogFolder= /p:HelixLogFolder=${WORKSPACE}\\${logFolder}\\ /p:HelixCorrelationInfoFileName=SubmittedHelixRuns.txt"
-
- submittedHelixJson = readJSON file: "${logFolder}\\SubmittedHelixRuns.txt"
- }
- }
-}
-
-stage ('Execute Tests') {
- def contextBase
- if (params.OuterLoop) {
- contextBase = "Win x64 tests w/outer - ${params.Config}"
- }
- else {
- contextBase = "Win x64 tests - ${params.Config}"
- }
- waitForHelixRuns(submittedHelixJson, contextBase)
-} \ No newline at end of file
diff --git a/buildpipeline/windows.groovy b/buildpipeline/windows.groovy
new file mode 100644
index 0000000000..e562a8e462
--- /dev/null
+++ b/buildpipeline/windows.groovy
@@ -0,0 +1,107 @@
+@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.
+// TGroup - The target framework to build.
+// CGroup - Build configuration.
+// TestOuter - If true, runs outerloop, if false runs just innerloop
+
+def submittedHelixJson = null
+def submitToHelix = (params.TGroup == 'netcoreapp')
+
+simpleNode('Windows_NT','latest') {
+ stage ('Checkout source') {
+ retry (10) {
+ checkout scm
+ }
+ }
+
+ def logFolder = getLogFolder()
+ def framework = ''
+ if (params.TGroup == 'all') {
+ framework = '-allConfigurations'
+ }
+ else {
+ framework = "-framework:${params.TGroup}"
+ }
+ def buildTests = (params.TGroup != 'all')
+
+ stage ('Initialize tools') {
+ try {
+ // Init tools
+ bat '.\\init-tools.cmd'
+ // Temporarily always dump the init-tools.log to try and identify why sometimes it takes really long
+ bat 'type init-tools.log'
+ }
+ catch (err) {
+ // On errors for build tools initializations, it's useful to echo the contents of the file
+ // for easy diagnosis. This could also be copied to the log directory
+ bat 'type init-tools.log'
+ // Ensure the build result is still propagated.
+ throw err
+ }
+ }
+ stage ('Sync') {
+ bat ".\\sync.cmd -p -- /p:ArchGroup=${params.AGroup} /p:RuntimeOS=win10"
+ }
+ stage ('Generate Version Assets') {
+ bat '.\\build-managed.cmd -GenerateVersion'
+ }
+ stage ('Build Product') {
+ bat ".\\build.cmd ${framework} -buildArch=${params.AGroup} -${params.CGroup} -- /p:RuntimeOS=win10"
+ }
+ if (buildTests) {
+ stage ('Build Tests') {
+ def additionalArgs = ''
+ def archiveTests = 'false'
+ if (params.TestOuter) {
+ additionalArgs += ' -Outerloop'
+ }
+ if (submitToHelix) {
+ archiveTests = 'true'
+ }
+ if (submitToHelix || params.TGroup == 'uap' || params.TGroup == 'uapaot') {
+ additionalArgs += ' -SkipTests'
+ }
+ bat ".\\build-tests.cmd ${framework} -buildArch=${params.AGroup} -${params.CGroup}${additionalArgs} -- /p:RuntimeOS=win10 /p:ArchiveTests=${archiveTests}"
+ }
+ }
+ if (submitToHelix) {
+ stage ('Submit To Helix For Testing') {
+ // Bind the credentials
+ withCredentials([string(credentialsId: 'CloudDropAccessToken', variable: 'CloudDropAccessToken'),
+ string(credentialsId: 'OutputCloudResultsAccessToken', variable: 'OutputCloudResultsAccessToken')]) {
+ // Ask the CI SDK for a Helix source that makes sense. This ensures that this pipeline works for both PR and non-PR cases
+ def helixSource = getHelixSource()
+ // Ask the CI SDK for a Build that makes sense. We currently use the hash for the build
+ def helixBuild = getCommit()
+ // Get the user that should be associated with the submission
+ def helixCreator = getUser()
+
+ // Target queues
+ def targetHelixQueues = ['Windows.10.Amd64.Open',
+ 'Windows.10.Nano.Amd64.Open',
+ 'Windows.7.Amd64.Open',
+ 'Windows.81.Amd64.Open']
+
+ bat "\"%VS140COMNTOOLS%\\VsDevCmd.bat\" && msbuild src\\upload-tests.proj /p:ArchGroup=${params.AGroup} /p:ConfigurationGroup=${params.CGroup} /p:TestProduct=corefx /p:TimeoutInSeconds=1200 /p:TargetOS=Windows_NT /p:HelixJobType=test/functional/cli/ /p:HelixSource=${helixSource} /p:BuildMoniker=${helixBuild} /p:HelixCreator=${helixCreator} /p:CloudDropAccountName=dotnetbuilddrops /p:CloudResultsAccountName=dotnetjobresults /p:CloudDropAccessToken=%CloudDropAccessToken% /p:CloudResultsAccessToken=%OutputCloudResultsAccessToken% /p:HelixApiEndpoint=https://helix.dot.net/api/2017-04-14/jobs /p:TargetQueues=\"${targetHelixQueues.join(',')}\" /p:HelixLogFolder= /p:HelixLogFolder=${WORKSPACE}\\${logFolder}\\ /p:HelixCorrelationInfoFileName=SubmittedHelixRuns.txt"
+
+ submittedHelixJson = readJSON file: "${logFolder}\\SubmittedHelixRuns.txt"
+ }
+ }
+ }
+}
+
+if (submitToHelix) {
+ stage ('Execute Tests') {
+ def contextBase
+ if (params.TestOuter) {
+ contextBase = "Win tests w/outer - ${params.AGroup} ${params.CGroup}"
+ }
+ else {
+ contextBase = "Win tests - ${params.AGroup} ${params.CGroup}"
+ }
+ waitForHelixRuns(submittedHelixJson, contextBase)
+ }
+} \ No newline at end of file