From: Tomáš Rylek Date: Wed, 11 Sep 2019 18:21:41 +0000 (-0700) Subject: Only check out the GIT repo twice and reuse for the entire pipeline (dotnet/coreclr... X-Git-Tag: submit/tizen/20210909.063632~11030^2~626 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c5e5838ba9db9ac8bde786a6bf4dee1d21aca14;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Only check out the GIT repo twice and reuse for the entire pipeline (dotnet/coreclr#26480) The purpose of this change is to increase the throughput and reliability of CoreCLR CI pipelines by only performing one GIT checkout for Windows and Unix, zip them up and reuse for all subsequent phases / jobs in the pipeline. Thanks Tomas Commit migrated from https://github.com/dotnet/coreclr/commit/17a53cb063b5e63fc1cc832ec36cf8a520111124 --- diff --git a/eng/build-job.yml b/eng/build-job.yml index 9e3529b..fca90f8 100644 --- a/eng/build-job.yml +++ b/eng/build-job.yml @@ -8,6 +8,7 @@ parameters: timeoutInMinutes: '' signBinaries: false publishToBlobFeed: false + stagedBuild: false ### Product build jobs: @@ -19,6 +20,7 @@ jobs: osSubgroup: ${{ parameters.osSubgroup }} helixType: 'build/product/' enableMicrobuild: true + stagedBuild: ${{ parameters.stagedBuild }} # Compute job name from template parameters name: ${{ format('build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} diff --git a/eng/build-test-job.yml b/eng/build-test-job.yml index f00aa41..a5d8a41 100644 --- a/eng/build-test-job.yml +++ b/eng/build-test-job.yml @@ -11,7 +11,7 @@ parameters: corefxTests: false displayNameArgs: '' condition: true - ignoreDependencyOnBuildJobs: false + stagedBuild: false ### Test build job @@ -27,6 +27,7 @@ jobs: osSubgroup: ${{ parameters.osSubgroup }} readyToRun: ${{ parameters.readyToRun }} corefxTests: ${{ parameters.corefxTests }} + stagedBuild: ${{ parameters.stagedBuild }} # Test jobs should continue on error for internal builds ${{ if eq(variables['System.TeamProject'], 'internal') }}: @@ -94,7 +95,7 @@ jobs: condition: and(succeeded(), ${{ parameters.condition }}) # Test job depends on the corresponding build job - ${{ if ne(parameters.ignoreDependencyOnBuildJobs, true) }}: + ${{ if ne(parameters.stagedBuild, true) }}: dependsOn: ${{ format('build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }} # Run all steps in the container. diff --git a/eng/checkout-job.yml b/eng/checkout-job.yml new file mode 100644 index 0000000..6d0dffc --- /dev/null +++ b/eng/checkout-job.yml @@ -0,0 +1,64 @@ +### Check out job pulls down the GIT repository and packs its contents +### into an Azure artifact for reuse by the subsequent build and test execution phases. +### We're using two separate jobs for Windows and all other platforms due to the need +### to use different compression formats (Windows doesn't support tar.gz and the Linux +### and OSX build clients don't have 7-zip installed) and simplify other details such +### as line endings. +jobs: +- job: 'checkout_windows' + displayName: 'Checkout (Windows)' + + pool: + # Public Windows Build Pool + ${{ if eq(variables['System.TeamProject'], 'public') }}: + vmImage: 'windows-latest' + + # Private Windows Build Pool + ${{ if ne(variables['System.TeamProject'], 'public') }}: + name: NetCoreInternal-Pool + queue: BuildPool.Windows.10.Amd64.VS2017 + + steps: + - checkout: self + clean: true + fetchDepth: 1 + + ### Zip up downloaded repo and publish to Helix + - template: /eng/upload-artifact-step.yml + parameters: + displayName: 'GIT repository (Windows)' + rootFolder: $(Build.SourcesDirectory) + includeRootFolder: false + archiveFile: $(Build.StagingDirectory)/repo_windows.zip + archiveType: 'zip' + tarCompression: '' + artifactName: repo_windows + +- job: 'checkout_unix' + displayName: 'Checkout (Unix)' + + pool: + # Public Linux Build Pool + ${{ if eq(variables['System.TeamProject'], 'public') }}: + vmImage: 'ubuntu-latest' + + # Private Linux Build Pool + ${{ if ne(variables['System.TeamProject'], 'public') }}: + name: NetCoreInternal-Pool + queue: BuildPool.Ubuntu.1604.Amd64 + + steps: + - checkout: self + clean: true + fetchDepth: 1 + + ### Zip up downloaded repo and publish to Helix + - template: /eng/upload-artifact-step.yml + parameters: + displayName: 'GIT repository (Unix)' + rootFolder: $(Build.SourcesDirectory) + includeRootFolder: false + archiveFile: $(Build.StagingDirectory)/repo_unix.tar.gz + archiveType: 'tar' + tarCompression: 'gz' + artifactName: repo_unix diff --git a/eng/crossgen-comparison-job.yml b/eng/crossgen-comparison-job.yml index f45581c..d257c48 100644 --- a/eng/crossgen-comparison-job.yml +++ b/eng/crossgen-comparison-job.yml @@ -6,6 +6,7 @@ parameters: container: '' helixQueues: '' crossrootfsDir: '' + stagedBuild: false ### Crossgen-comparison job ### @@ -19,6 +20,7 @@ jobs: archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osSubgroup: ${{ parameters.osSubgroup }} + stagedBuild: ${{ parameters.stagedBuild }} helixType: 'test/crossgen-comparison/' # Compute job name from template parameters diff --git a/eng/download-artifact-step.yml b/eng/download-artifact-step.yml index a0d1027..852fb86 100644 --- a/eng/download-artifact-step.yml +++ b/eng/download-artifact-step.yml @@ -1,13 +1,15 @@ parameters: downloadFolder: '' unpackFolder: '' + cleanUnpackFolder: true artifactFileName: '' artifactName: '' + displayName: '' steps: # Download artifact - task: DownloadBuildArtifacts@0 - displayName: Download artifacts + displayName: 'Download ${{ parameters.displayName }}' inputs: buildType: current downloadType: single @@ -16,7 +18,8 @@ steps: # Unzip artifact - task: ExtractFiles@1 - displayName: Unzip test artifacts + displayName: 'Unzip ${{ parameters.displayName }}' inputs: archiveFilePatterns: ${{ parameters.downloadFolder }}/${{ parameters.artifactName }}/${{ parameters.artifactFileName }} destinationFolder: ${{ parameters.unpackFolder }} + cleanDestinationFolder: ${{ parameters.cleanUnpackFolder }} diff --git a/eng/format-job.yml b/eng/format-job.yml index 24501bf..30e9034 100644 --- a/eng/format-job.yml +++ b/eng/format-job.yml @@ -6,6 +6,7 @@ parameters: container: '' crossrootfsDir: '' timeoutInMinutes: '' + stagedBuild: false ### Format job jobs: @@ -17,6 +18,7 @@ jobs: osSubgroup: ${{ parameters.osSubgroup }} container: ${{ parameters.container }} crossrootfsDir: ${{ parameters.crossrootfsDir }} + stagedBuild: ${{ parameters.stagedBuild }} timeoutInMinutes: ${{ parameters.timeoutInMinutes }} name: ${{ format('format_{0}{1}_{2}', parameters.osGroup, parameters.osSubgroup, parameters.archType) }} displayName: ${{ format('Formatting {0}{1} {2}', parameters.osGroup, parameters.osSubgroup, parameters.archType) }} diff --git a/eng/pipelines/coreclr/ci.yml b/eng/pipelines/coreclr/ci.yml index a970d98..b7f655c 100644 --- a/eng/pipelines/coreclr/ci.yml +++ b/eng/pipelines/coreclr/ci.yml @@ -5,6 +5,11 @@ pr: none jobs: # +# Checkout repository +# +- template: /eng/checkout-job.yml + +# # Debug builds # - template: /eng/platform-matrix.yml diff --git a/eng/pipelines/coreclr/corefx-jitstress.yml b/eng/pipelines/coreclr/corefx-jitstress.yml index 6b05bd9..d536951 100644 --- a/eng/pipelines/coreclr/corefx-jitstress.yml +++ b/eng/pipelines/coreclr/corefx-jitstress.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/corefx-jitstress2-jitstressregs.yml b/eng/pipelines/coreclr/corefx-jitstress2-jitstressregs.yml index 397dca3..38273ad 100644 --- a/eng/pipelines/coreclr/corefx-jitstress2-jitstressregs.yml +++ b/eng/pipelines/coreclr/corefx-jitstress2-jitstressregs.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/corefx-jitstressregs.yml b/eng/pipelines/coreclr/corefx-jitstressregs.yml index 24fd873..9e5b32c 100644 --- a/eng/pipelines/coreclr/corefx-jitstressregs.yml +++ b/eng/pipelines/coreclr/corefx-jitstressregs.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/corefx.yml b/eng/pipelines/coreclr/corefx.yml index 05f2fc7..036adc4 100644 --- a/eng/pipelines/coreclr/corefx.yml +++ b/eng/pipelines/coreclr/corefx.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/gcstress-extra.yml b/eng/pipelines/coreclr/gcstress-extra.yml index 29b3243..8c4b553 100644 --- a/eng/pipelines/coreclr/gcstress-extra.yml +++ b/eng/pipelines/coreclr/gcstress-extra.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/gcstress0x3-gcstress0xc.yml b/eng/pipelines/coreclr/gcstress0x3-gcstress0xc.yml index 1911849..f79fbfc 100644 --- a/eng/pipelines/coreclr/gcstress0x3-gcstress0xc.yml +++ b/eng/pipelines/coreclr/gcstress0x3-gcstress0xc.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/internal.yml b/eng/pipelines/coreclr/internal.yml index fce432f..6540a86 100644 --- a/eng/pipelines/coreclr/internal.yml +++ b/eng/pipelines/coreclr/internal.yml @@ -27,7 +27,16 @@ variables: value: CORECLR stages: + - stage: checkout + displayName: GIT Checkout + jobs: + # + # Checkout repository + # + - template: /eng/checkout-job.yml + - stage: build + displayName: Build jobs: # # Release builds @@ -37,6 +46,7 @@ stages: jobTemplate: build-job.yml buildConfig: release platformGroup: all + stagedBuild: true jobParameters: # Publishing packages to blob feeds sometimes takes a long time # due to waiting for an exclusive lock on the feed. @@ -86,7 +96,7 @@ stages: buildConfig: release platformGroup: all helixQueueGroup: all - ignoreDependencyOnBuildJobs: true + stagedBuild: true jobParameters: testGroup: outerloop condition: ne(variables['_BypassTesting'], 'true') @@ -100,7 +110,7 @@ stages: buildConfig: release platformGroup: all helixQueueGroup: all - ignoreDependencyOnBuildJobs: true + stagedBuild: true jobParameters: testGroup: outerloop readyToRun: true diff --git a/eng/pipelines/coreclr/jitstress-isas-arm.yml b/eng/pipelines/coreclr/jitstress-isas-arm.yml index 220a3f0..b642de6 100644 --- a/eng/pipelines/coreclr/jitstress-isas-arm.yml +++ b/eng/pipelines/coreclr/jitstress-isas-arm.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/jitstress-isas-x86.yml b/eng/pipelines/coreclr/jitstress-isas-x86.yml index 59d825f..22b76a9 100644 --- a/eng/pipelines/coreclr/jitstress-isas-x86.yml +++ b/eng/pipelines/coreclr/jitstress-isas-x86.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/jitstressregs.yml b/eng/pipelines/coreclr/jitstressregs.yml index 8a3486c..d3ab777 100644 --- a/eng/pipelines/coreclr/jitstressregs.yml +++ b/eng/pipelines/coreclr/jitstressregs.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/perf.yml b/eng/pipelines/coreclr/perf.yml index 9cda86c..0ba6813 100644 --- a/eng/pipelines/coreclr/perf.yml +++ b/eng/pipelines/coreclr/perf.yml @@ -7,6 +7,11 @@ trigger: pr: none jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/pr.yml b/eng/pipelines/coreclr/pr.yml index e53c156..f0fdb32 100644 --- a/eng/pipelines/coreclr/pr.yml +++ b/eng/pipelines/coreclr/pr.yml @@ -9,6 +9,11 @@ pr: jobs: # +# Checkout repository +# +- template: /eng/checkout-job.yml + +# # Debug builds # - template: /eng/platform-matrix.yml diff --git a/eng/pipelines/coreclr/r2r-extra.yml b/eng/pipelines/coreclr/r2r-extra.yml index f5afb25..cccf417 100644 --- a/eng/pipelines/coreclr/r2r-extra.yml +++ b/eng/pipelines/coreclr/r2r-extra.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/r2r.yml b/eng/pipelines/coreclr/r2r.yml index 24f1f2e..c6e170a 100644 --- a/eng/pipelines/coreclr/r2r.yml +++ b/eng/pipelines/coreclr/r2r.yml @@ -3,6 +3,11 @@ trigger: none pr: none jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/pipelines/coreclr/runincontext.yml b/eng/pipelines/coreclr/runincontext.yml index 14ae44c..4166ed8 100644 --- a/eng/pipelines/coreclr/runincontext.yml +++ b/eng/pipelines/coreclr/runincontext.yml @@ -11,6 +11,11 @@ schedules: always: true jobs: +# +# Checkout repository +# +- template: /eng/checkout-job.yml + - template: /eng/platform-matrix.yml parameters: jobTemplate: build-job.yml diff --git a/eng/platform-matrix.yml b/eng/platform-matrix.yml index 377ff0f..dc2d5f4 100644 --- a/eng/platform-matrix.yml +++ b/eng/platform-matrix.yml @@ -13,7 +13,7 @@ parameters: # 'all' - the queues used for non-PR, non-CI test runs, e.g., Manual or Scheduled runs. Typically this is all available queues. # 'corefx' - the queues used for a corefx test run. helixQueueGroup: 'pr' - ignoreDependencyOnBuildJobs: false + stagedBuild: false jobParameters: {} jobs: @@ -23,7 +23,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Linux_arm'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: arm osGroup: Linux @@ -45,7 +45,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Linux_arm64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: arm64 osGroup: Linux @@ -68,7 +68,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Linux_musl_x64'), eq(parameters.platformGroup, 'all')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: x64 osGroup: Linux @@ -89,7 +89,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Linux_musl_arm64'), eq(parameters.platformGroup, 'all')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: arm64 osGroup: Linux @@ -110,7 +110,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Linux_rhel6_x64'), eq(parameters.platformGroup, 'all')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: x64 osGroup: Linux @@ -129,7 +129,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Linux_x64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: x64 osGroup: Linux @@ -175,7 +175,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'OSX_x64'), eq(parameters.platformGroup, 'all')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: x64 osGroup: OSX @@ -195,7 +195,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Windows_NT_x64'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: x64 osGroup: Windows_NT @@ -220,7 +220,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Windows_NT_x86'), in(parameters.platformGroup, 'all', 'gcstress')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: x86 osGroup: Windows_NT @@ -243,7 +243,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Windows_NT_arm'), eq(parameters.platformGroup, 'all')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: arm osGroup: Windows_NT @@ -262,7 +262,7 @@ jobs: - ${{ if or(containsValue(parameters.platforms, 'Windows_NT_arm64'), eq(parameters.platformGroup, 'all')) }}: - template: ${{ parameters.jobTemplate }} parameters: - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} buildConfig: ${{ parameters.buildConfig }} archType: arm64 osGroup: Windows_NT diff --git a/eng/run-test-job.yml b/eng/run-test-job.yml index 38fd39f..67ef0ff 100644 --- a/eng/run-test-job.yml +++ b/eng/run-test-job.yml @@ -9,6 +9,7 @@ parameters: helixQueues: '' # If true, run the corefx tests instead of the coreclr ones corefxTests: false + stagedBuild: false displayNameArgs: '' runInUnloadableContext: false @@ -26,6 +27,7 @@ jobs: osSubgroup: ${{ parameters.osSubgroup }} readyToRun: ${{ parameters.readyToRun }} corefxTests: ${{ parameters.corefxTests }} + stagedBuild: ${{ parameters.stagedBuild }} helixType: 'build/tests/' # Test jobs should continue on error for internal builds diff --git a/eng/test-job.yml b/eng/test-job.yml index 6833268..464ecc0 100644 --- a/eng/test-job.yml +++ b/eng/test-job.yml @@ -13,7 +13,7 @@ parameters: displayNameArgs: '' runInUnloadableContext: false condition: true - ignoreDependencyOnBuildJobs: false + stagedBuild: false ### Test job @@ -34,7 +34,7 @@ jobs: corefxTests: ${{ parameters.coreFxTests }} displayNameArgs: ${{ parameters.displayNameArgs }} condition: ${{ parameters.condition }} - ignoreDependencyOnBuildJobs: ${{ parameters.ignoreDependencyOnBuildJobs }} + stagedBuild: ${{ parameters.stagedBuild }} - template: run-test-job.yml parameters: @@ -48,4 +48,5 @@ jobs: helixQueues: ${{ parameters.helixQueues }} corefxTests: ${{ parameters.coreFxTests }} displayNameArgs: ${{ parameters.displayNameArgs }} + stagedBuild: ${{ parameters.stagedBuild }} runInUnloadableContext: ${{ parameters.runInUnloadableContext }} diff --git a/eng/upload-artifact-step.yml b/eng/upload-artifact-step.yml index 4106b31..3933631 100644 --- a/eng/upload-artifact-step.yml +++ b/eng/upload-artifact-step.yml @@ -5,11 +5,12 @@ parameters: archiveType: '' tarCompression: '' artifactName: '' + displayName: '' steps: # Zip Artifact - task: ArchiveFiles@2 - displayName: Zip Tests + displayName: 'Zip ${{ parameters.displayName }}' inputs: rootFolderOrFile: ${{ parameters.rootFolder }} archiveFile: ${{ parameters.archiveFile }} @@ -18,7 +19,7 @@ steps: includeRootFolder: ${{ parameters.includeRootFolder }} - task: PublishBuildArtifacts@1 - displayName: Publish Artifact + displayName: 'Publish ${{ parameters.displayName }}' inputs: pathtoPublish: ${{ parameters.archiveFile }} artifactName: ${{ parameters.artifactName }} diff --git a/eng/xplat-job.yml b/eng/xplat-job.yml index b334ba2..f4240ec 100644 --- a/eng/xplat-job.yml +++ b/eng/xplat-job.yml @@ -7,6 +7,7 @@ parameters: helixType: '(unspecified)' container: '' crossrootfsDir: '' + stagedBuild: false # arcade-specific parameters condition: '' @@ -27,7 +28,15 @@ jobs: displayName: ${{ parameters.displayName }} condition: ${{ parameters.condition }} - dependsOn: ${{ parameters.dependsOn }} + dependsOn: + - ${{ if ne(parameters.stagedBuild, true) }}: + - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + - 'checkout_windows' + - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + - 'checkout_unix' + - ${{ if ne(parameters.dependsOn, '') }}: + - ${{ parameters.dependsOn }} + timeoutInMinutes: ${{ parameters.timeoutInMinutes }} continueOnError: ${{ parameters.continueOnError }} @@ -151,4 +160,22 @@ jobs: - ${{ each variable in parameters.variables }}: - ${{insert}}: ${{ variable }} - steps: ${{ parameters.steps }} + steps: + - checkout: none + clean: true + + # Download the GIT repository + - template: /eng/download-artifact-step.yml + parameters: + displayName: 'GIT repository' + downloadFolder: $(Build.SourcesDirectory)/download/ + cleanUnpackFolder: false + unpackFolder: $(Build.SourcesDirectory) + ${{ if eq(parameters.osGroup, 'Windows_NT') }}: + artifactFileName: repo_windows.zip + artifactName: repo_windows + ${{ if ne(parameters.osGroup, 'Windows_NT') }}: + artifactFileName: repo_unix.tar.gz + artifactName: repo_unix + + - ${{ parameters.steps }} diff --git a/eng/xplat-test-job.yml b/eng/xplat-test-job.yml index b452673..7a85658 100644 --- a/eng/xplat-test-job.yml +++ b/eng/xplat-test-job.yml @@ -9,6 +9,7 @@ parameters: crossrootfsDir: '' corefxTests: false readyToRun: false + stagedBuild: false # arcade-specific parameters condition: '' @@ -32,6 +33,7 @@ jobs: helixType: ${{ parameters.helixType }} container: ${{ parameters.container }} crossrootfsDir: ${{ parameters.crossrootfsDir }} + stagedBuild: ${{ parameters.stagedBuild }} # arcade-specific parameters condition: ${{ parameters.condition }}