forked from dotnet/corefx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dotnet#20508 from weshaggard/UpdateCI
Clean out portable from CI scripts and add OSX
- Loading branch information
Showing
6 changed files
with
223 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
} | ||
} |
Oops, something went wrong.