Skip to content

Commit

Permalink
Use git bundles (dotnet#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
echesakov authored Nov 20, 2019
1 parent a23534e commit 714b143
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 61 deletions.
54 changes: 9 additions & 45 deletions eng/pipelines/coreclr/templates/checkout-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 9 additions & 16 deletions eng/pipelines/coreclr/templates/xplat-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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 }}

0 comments on commit 714b143

Please sign in to comment.