Skip to content

Commit 4c6ef77

Browse files
JimSupliziobenbpdanieljurek
authored
Update docIndex to kick off the docs SDK CI run for main (Azure#47434)
* Update docIndex to kick off the docs SDK CI run for main * Add a parameter to determine whether or not the SDK CI run for main should be kicked off as part of a manual run * Fix the condition to check true * The condition was indented too far...go me * Update eng/pipelines/docindex.yml Co-authored-by: Ben Broderick Phillips <[email protected]> * Update eng/pipelines/docindex.yml Co-authored-by: Daniel Jurek <[email protected]> --------- Co-authored-by: Ben Broderick Phillips <[email protected]> Co-authored-by: Daniel Jurek <[email protected]>
1 parent d366345 commit 4c6ef77

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

eng/dailydocsconfig.json renamed to eng/docsSDKCIConfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"TFM": "net471",
33
"target_repo": {
44
"url": "https://github.com/Azure/azure-docs-sdk-dotnet",
5-
"branch": "%%DailyDocsBranchName%%",
5+
"branch": "%%DocsBranchName%%",
66
"folder": "xml"
77
},
88
"source_repo": {
99
"url": "https://github.com/Azure/azure-docs-sdk-dotnet",
10-
"branch": "%%DailyDocsBranchName%%",
10+
"branch": "%%DocsBranchName%%",
1111
"csvPath": "bundlepackages"
1212
},
1313
"import_content": true

eng/pipelines/docindex.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ parameters:
77
type: boolean
88
default: true
99

10+
- name: StartMainSDKCIRun
11+
displayName: |
12+
Kick off the main SDK CI docs run when manually running the pipeline
13+
type: boolean
14+
default: false
15+
1016
- name: ForceDailyUpdate
1117
displayName: |
1218
Force the daily branch update (includes starting daily branch run).
@@ -114,6 +120,23 @@ jobs:
114120
TargetRepoOwner: $(DocRepoOwner)
115121
WorkingDirectory: $(DocRepoLocation)
116122

123+
- task: AzureCLI@2
124+
displayName: Queue Docs CI build for main branch
125+
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(${{ parameters.StartMainSDKCIRun }}, true)))
126+
inputs:
127+
azureSubscription: msdocs-apidrop-connection
128+
scriptType: pscore
129+
scriptLocation: inlineScript
130+
inlineScript: |
131+
# Resource here is the Devops API scope
132+
$accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv
133+
$buildParamJson = (@{ params = (Get-Content ./eng/docsSDKCIConfig.json -Raw) -replace '%%DocsBranchName%%', "main" } | ConvertTo-Json)
134+
eng/common/scripts/Queue-Pipeline.ps1 `
135+
-Organization "apidrop" `
136+
-Project "Content%20CI" `
137+
-DefinitionId 397 `
138+
-BuildParametersJson $buildParamJson `
139+
-BearerToken $accessToken
117140
118141
# The scenario for running a Manual build is normally only for the main updates. The daily build
119142
# should really only get kicked off for scheduled runs.
@@ -200,7 +223,7 @@ jobs:
200223
scriptLocation: inlineScript
201224
inlineScript: |
202225
$accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv
203-
$buildParamJson = (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)
226+
$buildParamJson = (@{ params = (Get-Content ./eng/docsSDKCIConfig.json -Raw) -replace '%%DocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)
204227
eng/common/scripts/Queue-Pipeline.ps1 `
205228
-Organization "apidrop" `
206229
-Project "Content%20CI" `

0 commit comments

Comments
 (0)