azure-sdk-for-cpp/eng/pipelines/docindex.yml
2025-12-04 09:11:08 -08:00

102 lines
3.6 KiB
YAML

trigger: none
parameters:
- name: StartMainSDKCIRun
displayName: |
Kick off the main SDK CI docs run when manually running the pipeline
type: boolean
default: false
variables:
- template: /eng/pipelines/templates/variables/globals.yml
- template: /eng/pipelines/templates/variables/image.yml
jobs:
- template: /eng/common/pipelines/templates/jobs/docindex.yml
- job: UpdateDocsMsBuildConfig
pool:
name: $(LINUXPOOL)
demands: ImageOverride -equals $(LINUXVMIMAGE)
variables:
DocRepoLocation: $(Pipeline.Workspace)/docs
DocRepoOwner: MicrosoftDocs
DocRepoName: azure-docs-sdk-cpp
steps:
# Sync docs repo (this can be sparse)
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
parameters:
# TODO: Remove when C++ docs repo goes public
TokenToUseForAuth: $(azuresdk-github-pat)
SkipCheckoutNone: true
Paths:
- ci-configs/
- metadata/
- docs-ref-mapping/
- docs-ref-services/
Repositories:
- Name: $(DocRepoOwner)/$(DocRepoName)
WorkingDirectory: $(DocRepoLocation)
- task: Powershell@2
inputs:
pwsh: true
filePath: eng/common/scripts/Update-DocsMsPackages.ps1
arguments: -DocRepoLocation $(DocRepoLocation) -SkipLegacyOnboarding
displayName: Update Docs Onboarding for main branch
- task: Powershell@2
inputs:
pwsh: true
filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1
arguments: >-
-DocRepoLocation $(DocRepoLocation)
-Monikers @('latest','preview')
displayName: Generate Service Level Readme for main branch
- task: Powershell@2
inputs:
pwsh: true
filePath: eng/common/scripts/Update-DocsMsToc.ps1
arguments: >-
-DocRepoLocation $(DocRepoLocation)
-OutputLocation $(DocRepoLocation)/docs-ref-mapping/reference-unified.yml
displayName: Generate ToC for main branch
- task: Powershell@2
inputs:
pwsh: true
filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1
arguments: >-
-DocRepoLocation $(DocRepoLocation)
displayName: Verify Required Docs Json Members
# Push changes to docs repo
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
parameters:
WorkingDirectory: $(DocRepoLocation)
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
parameters:
BaseRepoBranch: $(DefaultBranch)
BaseRepoOwner: $(DocRepoOwner)
CommitMsg: "Update docs CI configuration Build: $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)"
TargetRepoName: $(DocRepoName)
TargetRepoOwner: $(DocRepoOwner)
WorkingDirectory: $(DocRepoLocation)
- task: AzureCLI@2
displayName: Queue Docs CI build
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(${{ parameters.StartMainSDKCIRun }}, true)))
inputs:
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
eng/common/scripts/Queue-Pipeline.ps1 `
-Organization "apidrop" `
-Project "Content%20CI" `
-DefinitionId 8056 `
-BearerToken $accessToken