11# intended to be used as part of a release process
22parameters :
3- ArtifactLocation : ' not-specified'
4- PackageRepository : ' not-specified'
5- ReleaseSha : ' not-specified'
6- RepoId : $(Build.Repository.Name)
7- WorkingDirectory : ' '
8- ScriptDirectory : eng/common/scripts
9- TargetDocRepoName : ' '
10- TargetDocRepoOwner : ' '
11- PRBranchName : ' master-rdme'
12- PRLabels : ' auto-merge'
13- ArtifactName : ' '
14- Language : ' '
15- DocRepoDestinationPath : ' ' # usually docs-ref-services/
16- CIConfigs : ' []'
17- GHReviewersVariable : ' '
18- GHTeamReviewersVariable : ' ' # externally set, as eng-common does not have the identity-resolver. Run as pre-step
19- OnboardingBranch : ' '
20- CloseAfterOpenForTesting : false
21- SkipPackageJson : false
3+ - name : ArtifactLocation
4+ type : string
5+ default : ' not-specified'
6+ - name : PackageRepository
7+ type : string
8+ default : ' not-specified'
9+ - name : ReleaseSha
10+ type : string
11+ default : ' not-specified'
12+ - name : RepoId
13+ type : string
14+ default : $(Build.Repository.Name)
15+ - name : WorkingDirectory
16+ type : string
17+ default : ' '
18+ - name : ScriptDirectory
19+ type : string
20+ default : eng/common/scripts
21+ - name : TargetDocRepoName
22+ type : string
23+ default : ' '
24+ - name : TargetDocRepoOwner
25+ type : string
26+ default : ' '
27+ - name : PRBranchName
28+ type : string
29+ default : ' master-rdme'
30+ - name : PRLabels
31+ type : string
32+ default : ' auto-merge'
33+ - name : ArtifactName
34+ type : string
35+ default : ' '
36+ - name : Language
37+ type : string
38+ default : ' '
39+ - name : DocRepoDestinationPath
40+ type : string
41+ default : ' ' # usually docs-ref-services/
42+ - name : CIConfigs
43+ type : string
44+ default : ' []'
45+ - name : GHReviewersVariable
46+ type : string
47+ default : ' '
48+ - name : GHTeamReviewersVariable
49+ type : string
50+ default : ' ' # externally set, as eng-common does not have the identity-resolver. Run as pre-step
51+ - name : OnboardingBranch
52+ type : string
53+ default : ' '
54+ - name : CloseAfterOpenForTesting
55+ type : boolean
56+ default : false
57+ - name : SkipPackageJson
58+ type : object
59+ default : false
60+ - name : SparseCheckoutPaths
61+ type : object
62+ default : null
2263
2364steps :
2465- pwsh : |
@@ -30,14 +71,25 @@ steps:
3071 Write-Host "This script is not executing on Windows, skipping registry modification."
3172 }
3273 displayName : Enable Long Paths if Necessary
33-
34- - pwsh : |
35- git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo
36- displayName : Clone Documentation Repository
37- ignoreLASTEXITCODE : false
74+
75+ - ${{ if not(parameters.SparseCheckoutPaths) }} :
76+ - pwsh : |
77+ git clone https://github.com/${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} ${{ parameters.WorkingDirectory }}/repo
78+ displayName: Clone Documentation Repository
79+ ignoreLASTEXITCODE: false
80+
81+ - ${{ if parameters.SparseCheckoutPaths }} :
82+ - template : /eng/common/pipelines/templates/steps/sparse-checkout.yml
83+ parameters :
84+ SkipDefaultCheckout : true
85+ Repositories :
86+ - Name : ${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }}
87+ WorkingDirectory : ${{ parameters.WorkingDirectory }}/repo
88+ Paths : ${{ parameters.SparseCheckoutPaths }}
89+
3890- template : /eng/common/pipelines/templates/steps/set-default-branch.yml
3991 parameters :
40- WorkingDirectory : ${{ parameters.WorkingDirectory }}/repo
92+ WorkingDirectory : ${{ parameters.WorkingDirectory }}/repo
4193- task : PowerShell@2
4294 displayName : ' Apply Documentation Updates From Artifact'
4395 inputs :
0 commit comments