183 строки
7.2 KiB
YAML
183 строки
7.2 KiB
YAML
trigger: none
|
|
variables:
|
|
- template: /eng/pipelines/templates/variables/globals.yml
|
|
jobs:
|
|
- template: /eng/common/pipelines/templates/jobs/docindex.yml
|
|
|
|
- job: UpgradeRexTool
|
|
timeoutInMinutes: 10
|
|
pool:
|
|
vmImage: ubuntu-22.04
|
|
|
|
steps:
|
|
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
|
|
parameters:
|
|
Paths:
|
|
- eng/
|
|
|
|
- task: Powershell@2
|
|
inputs:
|
|
pwsh: true
|
|
filePath: eng/scripts/docs/Update-RexValidationTool.ps1
|
|
displayName: Update JS REX Validation Tool
|
|
|
|
- template: /eng/common/pipelines/templates/steps/create-pull-request.yml
|
|
parameters:
|
|
PRBranchName: docs/rex-tool-upgrade
|
|
# Force push as this task updates a single file and history is not
|
|
# necessary for changes in this branch.
|
|
PushArgs: -f
|
|
PRTitle: Upgrade JS REX Validation Tool
|
|
PRBody: |
|
|
This PR upgrades the JS REX Validation Tool to the latest version.
|
|
Testing was done in $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)
|
|
|
|
- job: UpdateDocsMsBuildConfig
|
|
timeoutInMinutes: 90
|
|
pool:
|
|
vmImage: ubuntu-20.04
|
|
variables:
|
|
DocRepoLocation: $(Pipeline.Workspace)/docs
|
|
DocRepoOwner: MicrosoftDocs
|
|
DocRepoName: azure-docs-sdk-node
|
|
steps:
|
|
# Sync docs repo (this can be sparse)
|
|
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
|
|
parameters:
|
|
SkipCheckoutNone: true
|
|
Paths:
|
|
- ci-configs/
|
|
- metadata/
|
|
- docs-ref-mapping/
|
|
- docs-ref-services/
|
|
Repositories:
|
|
- Name: $(DocRepoOwner)/$(DocRepoName)
|
|
WorkingDirectory: $(DocRepoLocation)
|
|
|
|
- template: /eng/pipelines/templates/steps/install-rex-validation-tool.yml
|
|
|
|
- task: Powershell@2
|
|
inputs:
|
|
pwsh: true
|
|
filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
|
displayName: Move deprecated packages to legacy moniker
|
|
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
|
|
|
|
- task: Powershell@2
|
|
inputs:
|
|
pwsh: true
|
|
filePath: eng/common/scripts/Update-DocsMsPackages.ps1
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
|
displayName: Update Docs Onboarding for main branch
|
|
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
|
|
|
|
- task: Powershell@2
|
|
inputs:
|
|
pwsh: true
|
|
filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
|
displayName: Generate Service Level Readme for main branch
|
|
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
|
|
|
|
- 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
|
|
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
|
|
|
|
- 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)
|
|
|
|
# Prepare daily docs CI
|
|
- template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml
|
|
parameters:
|
|
DailyBranchVariableName: DailyDocsBranchName
|
|
- pwsh: |
|
|
$ErrorActionPreference = "Continue"
|
|
git checkout "origin/$(DailyDocsBranchName)" 2>&1 | Out-Null
|
|
$LASTEXITCODE = 0 # This ignores any error from git checkout
|
|
git status
|
|
displayName: Checkout daily branch if it exists
|
|
workingDirectory: $(DocRepoLocation)
|
|
- task: Powershell@2
|
|
inputs:
|
|
pwsh: true
|
|
filePath: eng/common/scripts/Update-DocsMsPackages.ps1
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
|
displayName: Update Docs Onboarding for Daily docs
|
|
|
|
- task: Powershell@2
|
|
inputs:
|
|
pwsh: true
|
|
filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
|
displayName: Generate Service Level Readme for Daily docs
|
|
|
|
- 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 Daily docs
|
|
|
|
- task: Powershell@2
|
|
inputs:
|
|
pwsh: true
|
|
filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1
|
|
arguments: >-
|
|
-DocRepoLocation $(DocRepoLocation)
|
|
displayName: Verify Required Docs Json Members
|
|
|
|
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
|
|
parameters:
|
|
BaseRepoBranch: $(DailyDocsBranchName)
|
|
BaseRepoOwner: $(DocRepoOwner)
|
|
CommitMsg: "Update targeting packages based on release metadata. (Daily docs)"
|
|
TargetRepoName: $(DocRepoName)
|
|
TargetRepoOwner: $(DocRepoOwner)
|
|
WorkingDirectory: $(DocRepoLocation)
|
|
ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts
|
|
PushArgs: -f
|
|
|
|
- task: AzureCLI@2
|
|
displayName: Queue Docs CI build
|
|
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
|
|
$buildParamJson = '{"params":"{ \"target_repo\": { \"url\": \"https://github.com/MicrosoftDocs/azure-docs-sdk-node\", \"branch\": \"$(DailyDocsBranchName)\", \"folder\": \"./\" }, \"source_repos\": [] }"}'
|
|
eng/common/scripts/Queue-Pipeline.ps1 `
|
|
-Organization "apidrop" `
|
|
-Project "Content%20CI" `
|
|
-DefinitionId 3452 `
|
|
-BuildParametersJson $buildParamJson `
|
|
-BearerToken $accessToken
|