Skip to content

Commit 6f2d42c

Browse files
authored
Use the service connection instead of PAT to kick off docs CI runs (Azure#29870)
The msdocs-apidrop-connection service connection will replace the azuresdk-apidrop-devops-queue-build-pat that was being used to kick off runs. The docindex run was run against this refs/merge for both testing and also initial approval of the service connection.
1 parent 24429df commit 6f2d42c

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

eng/pipelines/docindex.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,18 @@ jobs:
165165
ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts
166166
PushArgs: -f
167167

168-
- task: PowerShell@2
168+
- task: AzureCLI@2
169169
displayName: Queue Docs CI build
170170
inputs:
171-
pwsh: true
172-
filePath: eng/common/scripts/Queue-Pipeline.ps1
173-
arguments: >
174-
-Organization "apidrop"
175-
-Project "Content%20CI"
176-
-DefinitionId 3452
177-
-AuthToken "$(azuresdk-apidrop-devops-queue-build-pat)"
178-
-BuildParametersJson '{"params":"{ \"target_repo\": { \"url\": \"https://github.com/MicrosoftDocs/azure-docs-sdk-node\", \"branch\": \"$(DailyDocsBranchName)\", \"folder\": \"./\" }, \"source_repos\": [] }"}'
171+
azureSubscription: msdocs-apidrop-connection
172+
scriptType: pscore
173+
scriptLocation: inlineScript
174+
inlineScript: |
175+
$accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv
176+
$buildParamJson = '{"params":"{ \"target_repo\": { \"url\": \"https://github.com/MicrosoftDocs/azure-docs-sdk-node\", \"branch\": \"$(DailyDocsBranchName)\", \"folder\": \"./\" }, \"source_repos\": [] }"}'
177+
eng/common/scripts/Queue-Pipeline.ps1 `
178+
-Organization "apidrop" `
179+
-Project "Content%20CI" `
180+
-DefinitionId 3452 `
181+
-BuildParametersJson $buildParamJson `
182+
-BearerToken $accessToken

0 commit comments

Comments
 (0)