Skip to content

Commit

Permalink
Use the service connection instead of PAT to kick off docs CI runs (#…
Browse files Browse the repository at this point in the history
…40430)

* Use the service connection instead of PAT to kick off docs CI runs

* fix spacing

* Remove -SourceBranch argument, yay copy/paste

* Move rex tool install to just after the sparse checkout
  • Loading branch information
JimSuplizio authored May 31, 2024
1 parent 7977a15 commit e2ffc4e
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions eng/pipelines/docindex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
- Name: azure-sdk/$(DocRepoName)
WorkingDirectory: $(DailyDocRepoLocation)


- template: /eng/pipelines/templates/steps/mvn-linux-repository-settings.yml

- template: /eng/pipelines/templates/steps/install-rex-validation-tool.yml

- task: Powershell@2
inputs:
pwsh: true
Expand Down Expand Up @@ -90,10 +95,6 @@ jobs:
parameters:
DailyBranchVariableName: DailyDocsBranchName

- template: /eng/pipelines/templates/steps/mvn-linux-repository-settings.yml

- template: /eng/pipelines/templates/steps/install-rex-validation-tool.yml

- task: Powershell@2
inputs:
pwsh: true
Expand Down Expand Up @@ -142,14 +143,18 @@ jobs:
ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts
PushArgs: -f

- task: PowerShell@2
- task: AzureCLI@2
displayName: Queue Docs CI build
inputs:
pwsh: true
filePath: eng/common/scripts/Queue-Pipeline.ps1
arguments: >
-Organization "apidrop"
-Project "Content%20CI"
-DefinitionId 3188
-AuthToken "$(azuresdk-apidrop-devops-queue-build-pat)"
-BuildParametersJson (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)
azureSubscription: msdocs-apidrop-connection
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
$accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv
$buildParamJson = (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)
eng/common/scripts/Queue-Pipeline.ps1 `
-Organization "apidrop" `
-Project "Content%20CI" `
-DefinitionId 3188 `
-BuildParametersJson $buildParamJson `
-BearerToken $accessToken

0 comments on commit e2ffc4e

Please sign in to comment.