-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring back checkout bundle for PRs until AzDo fixes PR job checkouts (#…
- Loading branch information
Showing
65 changed files
with
502 additions
and
208 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
...pelines/common/evaluate-default-paths.yml → ...es/common/checkout-and-evaluate-paths.yml
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,62 @@ | ||
### Check out job creating a git bundle and publishing it | ||
### into an Azure artifact for reuse by the subsequent build and test execution phases. | ||
### If paths is specified, we will create a job using evaluate-changed-paths.yml template | ||
### for each path specified. | ||
|
||
parameters: | ||
# Object containing subset include and exclude paths in an array form. | ||
# Scenarios: | ||
# 1. exclude paths are specified | ||
# Will include all paths except the ones in the exclude list. | ||
# 2. include paths are specified | ||
# Will only include paths specified in the list. | ||
# 3. exclude + include: | ||
# 1st we evaluate changes for all paths except ones in excluded list. If we can't find | ||
# any applicable changes like that, then we evaluate changes for incldued paths | ||
# if any of these two finds changes, then a variable will be set to true. | ||
# In order to consume this variable you need to reference it via: $[ dependencies.checkout.outputs['SetPathVars_<subset>.containschange'] ] | ||
# | ||
# Array form example | ||
# paths: | ||
# - subset: coreclr | ||
# include: | ||
# - src/libraries/System.Private.CoreLib/* | ||
# exclude: | ||
# - src/libraries/* | ||
# | ||
# This example will include ALL path changes except the ones under src/libraries/*!System.Private.CoreLib/* | ||
paths: [] | ||
|
||
jobs: | ||
- job: checkout | ||
displayName: Checkout | ||
|
||
pool: | ||
vmImage: 'macOS-10.14' | ||
|
||
steps: | ||
- checkout: self | ||
clean: true | ||
fetchDepth: 20 | ||
|
||
- script: git bundle create $(Build.StagingDirectory)/Checkout.bundle HEAD | ||
displayName: Create Checkout.bundle | ||
|
||
- publish: $(Build.StagingDirectory)/Checkout.bundle | ||
artifact: Checkout_bundle | ||
displayName: Upload Checkout.bundle | ||
|
||
- ${{ if and(ne(parameters.paths[0], ''), eq(variables['Build.Reason'], 'PullRequest')) }}: | ||
- ${{ each path in parameters.paths }}: | ||
- template: evaluate-changed-paths.yml | ||
parameters: | ||
subsetName: ${{ path.subset }} | ||
arguments: | ||
# The commit that we're building is always a merge commit that is merging into the target branch. | ||
# So the first parent of the commit is on the target branch and the second parent is on the source branch. | ||
- --difftarget HEAD^1 | ||
- --subset ${{ path.subset }} | ||
- ${{ if ne(path.include[0], '') }}: | ||
- --includepaths '${{ join('+', path.include) }}' | ||
- ${{ if ne(path.exclude[0], '') }}: | ||
- --excludepaths '${{ join('+', path.exclude) }}' |
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,23 @@ | ||
parameters: | ||
useBundle: true | ||
fetchDepth: 20 | ||
|
||
steps: | ||
# Checkout from bundle | ||
- ${{ if eq(parameters.useBundle, true) }}: | ||
- checkout: none | ||
|
||
- download: current | ||
artifact: Checkout_bundle | ||
displayName: Download Checkout.bundle | ||
|
||
- script: | | ||
$(setScriptToEchoAndFailOnNonZero) | ||
git clone $(Pipeline.Workspace)/Checkout_bundle/Checkout.bundle . | ||
git remote set-url origin $(Build.Repository.Uri) | ||
displayName: Clone the repository from Checkout.bundle | ||
- ${{ if eq(parameters.useBundle, false) }}: | ||
- checkout: self | ||
clean: true | ||
fetchDepth: ${{ parameters.fetchDepth }} |
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
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
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
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
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
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
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
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
Oops, something went wrong.