From 714b1439d6625c8a484ba4ca98ffcd61fc46a587 Mon Sep 17 00:00:00 2001 From: Egor Chesakov Date: Wed, 20 Nov 2019 12:50:52 -0800 Subject: [PATCH] Use git bundles (#132) --- .../coreclr/templates/checkout-job.yml | 54 ++++--------------- eng/pipelines/coreclr/templates/xplat-job.yml | 25 ++++----- 2 files changed, 18 insertions(+), 61 deletions(-) diff --git a/eng/pipelines/coreclr/templates/checkout-job.yml b/eng/pipelines/coreclr/templates/checkout-job.yml index 07f9b847f5b..cca772dcd7f 100644 --- a/eng/pipelines/coreclr/templates/checkout-job.yml +++ b/eng/pipelines/coreclr/templates/checkout-job.yml @@ -5,60 +5,24 @@ ### 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)' +- job: checkout + displayName: Checkout pool: - # Public Windows Build Pool ${{ if eq(variables['System.TeamProject'], 'public') }}: - vmImage: 'windows-latest' + name: Hosted MacOS - # Private Windows Build Pool ${{ if ne(variables['System.TeamProject'], 'public') }}: - name: NetCoreInternal-Pool - queue: BuildPool.Windows.10.Amd64.VS2017 + name: Hosted Mac Internal steps: - checkout: self clean: true fetchDepth: 5 - ### Zip up downloaded repo and publish to Helix - - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml - parameters: - displayName: 'GIT repository (Windows)' - rootFolder: $(Build.SourcesDirectory) - includeRootFolder: false - archiveType: 'zip' - tarCompression: '' - archiveExtension: '.zip' - artifactName: repo_windows + - script: git bundle create $(Build.StagingDirectory)/Checkout.bundle HEAD + displayName: Create Checkout.bundle -- 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: 5 - - ### Zip up downloaded repo and publish to Helix - - template: /eng/pipelines/coreclr/templates/upload-artifact-step.yml - parameters: - displayName: 'GIT repository (Unix)' - rootFolder: $(Build.SourcesDirectory) - includeRootFolder: false - archiveType: 'tar' - tarCompression: 'gz' - archiveExtension: '.tar.gz' - artifactName: repo_unix + - publish: $(Build.StagingDirectory)/Checkout.bundle + artifact: Checkout_bundle + displayName: Upload Checkout.bundle diff --git a/eng/pipelines/coreclr/templates/xplat-job.yml b/eng/pipelines/coreclr/templates/xplat-job.yml index 2ded9695527..8a2fa164ad0 100644 --- a/eng/pipelines/coreclr/templates/xplat-job.yml +++ b/eng/pipelines/coreclr/templates/xplat-job.yml @@ -31,10 +31,7 @@ jobs: condition: ${{ parameters.condition }} dependsOn: - ${{ if ne(parameters.stagedBuild, true) }}: - - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - - 'checkout_windows' - - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - - 'checkout_unix' + - checkout - ${{ if ne(parameters.dependsOn, '') }}: - ${{ parameters.dependsOn }} @@ -158,17 +155,13 @@ jobs: - checkout: none clean: true - # Download the GIT repository - - template: /eng/pipelines/coreclr/templates/download-artifact-step.yml - parameters: - displayName: 'GIT repository' - 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 + - download: current + artifact: Checkout_bundle + displayName: Download Checkout.bundle + + - script: | + git clone $(Pipeline.Workspace)/Checkout_bundle/Checkout.bundle . + git remote set-url origin $(Build.Repository.Uri) + displayName: Clone the repository from Checkout.bundle - ${{ parameters.steps }} -- GitLab