Skip to content

Migrate SkipDefaultCheckout to SkipCheckoutNone #4042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
1 commit merged into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ steps:
- ${{ if parameters.SparseCheckoutPaths }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
SkipDefaultCheckout: true
SkipCheckoutNone: true
Repositories:
- Name: ${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }}
WorkingDirectory: ${{ parameters.WorkingDirectory }}/repo
Expand Down
8 changes: 6 additions & 2 deletions eng/common/pipelines/templates/steps/sparse-checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ parameters:
- Name: $(Build.Repository.Name)
Commitish: $(Build.SourceVersion)
WorkingDirectory: $(System.DefaultWorkingDirectory)
# NOTE: SkipDefaultCheckout is being deprecated in favor of SkipCheckoutNone
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm keeping both to make it easier to do PRs one by one in the other repositories. After I'm done, I'll remove this parameter.

- name: SkipDefaultCheckout
type: boolean
default: false
- name: SkipCheckoutNone
type: boolean
default: false

steps:
- ${{ if not(parameters.SkipDefaultCheckout) }}:
- checkout: none
- ${{ if and(not(parameters.SkipDefaultCheckout), not(parameters.SkipCheckoutNone)) }}:
- checkout: none

- task: PowerShell@2
displayName: 'Sparse checkout repositories'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ steps:

- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
SkipDefaultCheckout: true
SkipCheckoutNone: true
Repositories:
- Name: ${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }}
WorkingDirectory: $(DocRepoLocation)
Expand Down Expand Up @@ -77,7 +77,7 @@ steps:
displayName: Checkout daily docs branch if it exists
workingDirectory: $(DocRepoLocation)

# If NOT performing a daily docs build, set the $(TargetBranchName) to the
# If NOT performing a daily docs build, set the $(TargetBranchName) to the
# default branch of the documentation repository.
- ${{ if ne(parameters.DailyDocsBuild, 'true') }}:
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
Expand All @@ -104,7 +104,7 @@ steps:
-PackageSourceOverride '${{ parameters.PackageSourceOverride }}' `
-TenantId '$(opensource-aad-tenant-id)' `
-ClientId '$(opensource-aad-app-id)' `
-ClientSecret '$(opensource-aad-secret)'
-ClientSecret '$(opensource-aad-secret)'
displayName: Apply Documentation Updates

- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/templates/steps/sync-directory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
SkipDefaultCheckout: true
SkipCheckoutNone: true
Paths:
- ${{ parameters.DirectoryToSync }}
Repositories:
Expand Down Expand Up @@ -130,7 +130,7 @@ steps:
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
SkipDefaultCheckout: true
SkipCheckoutNone: true
Paths:
- ${{ parameters.DirectoryToSync }}
Repositories:
Expand Down