2021-05-21 00:20:54 +03:00
|
|
|
trigger: none
|
2022-06-03 00:32:25 +03:00
|
|
|
variables:
|
|
|
|
- template: /eng/pipelines/templates/variables/globals.yml
|
2021-05-21 00:20:54 +03:00
|
|
|
jobs:
|
|
|
|
- template: /eng/common/pipelines/templates/jobs/docindex.yml
|
2021-05-27 18:57:46 +03:00
|
|
|
|
2023-12-01 00:40:53 +03:00
|
|
|
- job: UpgradeRexTool
|
|
|
|
timeoutInMinutes: 10
|
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-22.04
|
2024-05-01 00:58:54 +03:00
|
|
|
|
2023-12-01 00:40:53 +03:00
|
|
|
steps:
|
|
|
|
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
|
|
|
|
parameters:
|
2024-05-01 00:58:54 +03:00
|
|
|
Paths:
|
|
|
|
- eng/
|
2023-12-01 00:40:53 +03:00
|
|
|
|
|
|
|
- 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)
|
|
|
|
|
2021-05-27 18:57:46 +03:00
|
|
|
- job: UpdateDocsMsBuildConfig
|
2021-11-08 22:10:26 +03:00
|
|
|
timeoutInMinutes: 90
|
2021-05-27 18:57:46 +03:00
|
|
|
pool:
|
2021-06-23 21:54:58 +03:00
|
|
|
vmImage: ubuntu-20.04
|
2021-05-27 18:57:46 +03:00
|
|
|
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:
|
2022-09-12 23:28:02 +03:00
|
|
|
SkipCheckoutNone: true
|
2021-05-27 18:57:46 +03:00
|
|
|
Paths:
|
2022-03-02 20:00:58 +03:00
|
|
|
- ci-configs/
|
2021-07-01 21:41:25 +03:00
|
|
|
- metadata/
|
2022-03-01 18:46:36 +03:00
|
|
|
- docs-ref-mapping/
|
2022-07-19 00:28:14 +03:00
|
|
|
- docs-ref-services/
|
2021-05-27 18:57:46 +03:00
|
|
|
Repositories:
|
|
|
|
- Name: $(DocRepoOwner)/$(DocRepoName)
|
|
|
|
WorkingDirectory: $(DocRepoLocation)
|
2023-12-01 00:40:53 +03:00
|
|
|
|
|
|
|
- template: /eng/pipelines/templates/steps/install-rex-validation-tool.yml
|
2021-05-27 18:57:46 +03:00
|
|
|
|
2023-09-14 00:14:30 +03:00
|
|
|
- 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')))
|
|
|
|
|
2021-05-27 18:57:46 +03:00
|
|
|
- task: Powershell@2
|
|
|
|
inputs:
|
|
|
|
pwsh: true
|
|
|
|
filePath: eng/common/scripts/Update-DocsMsPackages.ps1
|
2023-12-01 00:40:53 +03:00
|
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
2022-11-16 03:13:33 +03:00
|
|
|
displayName: Update Docs Onboarding for main branch
|
2021-11-05 08:13:56 +03:00
|
|
|
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
|
2021-11-08 22:10:26 +03:00
|
|
|
|
2022-07-20 20:23:10 +03:00
|
|
|
- task: Powershell@2
|
|
|
|
inputs:
|
|
|
|
pwsh: true
|
|
|
|
filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1
|
2023-10-03 18:28:52 +03:00
|
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
2022-11-16 03:13:33 +03:00
|
|
|
displayName: Generate Service Level Readme for main branch
|
|
|
|
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
|
2022-07-20 20:23:10 +03:00
|
|
|
|
2022-03-03 20:18:30 +03:00
|
|
|
- task: Powershell@2
|
|
|
|
inputs:
|
|
|
|
pwsh: true
|
|
|
|
filePath: eng/common/scripts/Update-DocsMsToc.ps1
|
|
|
|
arguments: >-
|
|
|
|
-DocRepoLocation $(DocRepoLocation)
|
|
|
|
-OutputLocation $(DocRepoLocation)/docs-ref-mapping/reference-unified.yml
|
2022-11-16 03:13:33 +03:00
|
|
|
displayName: Generate ToC for main branch
|
2022-03-23 20:47:44 +03:00
|
|
|
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
|
2022-03-03 20:18:30 +03:00
|
|
|
|
2023-04-28 00:49:49 +03:00
|
|
|
- task: Powershell@2
|
|
|
|
inputs:
|
|
|
|
pwsh: true
|
|
|
|
filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1
|
|
|
|
arguments: >-
|
|
|
|
-DocRepoLocation $(DocRepoLocation)
|
2024-05-01 00:58:54 +03:00
|
|
|
displayName: Verify Required Docs Json Members
|
2023-04-28 00:49:49 +03:00
|
|
|
|
2021-05-27 18:57:46 +03:00
|
|
|
# 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)
|
2023-12-01 00:40:53 +03:00
|
|
|
CommitMsg: "Update docs CI configuration Build: $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)"
|
2021-05-27 18:57:46 +03:00
|
|
|
TargetRepoName: $(DocRepoName)
|
|
|
|
TargetRepoOwner: $(DocRepoOwner)
|
|
|
|
WorkingDirectory: $(DocRepoLocation)
|
2021-07-01 21:41:25 +03:00
|
|
|
|
|
|
|
# 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
|
2021-12-10 06:19:31 +03:00
|
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
2022-11-16 03:13:33 +03:00
|
|
|
displayName: Update Docs Onboarding for Daily docs
|
2021-11-05 08:13:56 +03:00
|
|
|
|
2022-07-19 00:28:14 +03:00
|
|
|
- task: Powershell@2
|
|
|
|
inputs:
|
|
|
|
pwsh: true
|
|
|
|
filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1
|
2023-10-03 18:28:52 +03:00
|
|
|
arguments: -DocRepoLocation $(DocRepoLocation)
|
2022-11-16 03:13:33 +03:00
|
|
|
displayName: Generate Service Level Readme for Daily docs
|
2022-07-19 00:28:14 +03:00
|
|
|
|
2022-03-01 18:46:36 +03:00
|
|
|
- task: Powershell@2
|
|
|
|
inputs:
|
|
|
|
pwsh: true
|
|
|
|
filePath: eng/common/scripts/Update-DocsMsToc.ps1
|
|
|
|
arguments: >-
|
|
|
|
-DocRepoLocation $(DocRepoLocation)
|
|
|
|
-OutputLocation $(DocRepoLocation)/docs-ref-mapping/reference-unified.yml
|
2022-11-16 03:13:33 +03:00
|
|
|
displayName: Generate ToC for Daily docs
|
2022-03-01 18:46:36 +03:00
|
|
|
|
2023-04-28 00:49:49 +03:00
|
|
|
- task: Powershell@2
|
|
|
|
inputs:
|
|
|
|
pwsh: true
|
|
|
|
filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1
|
|
|
|
arguments: >-
|
|
|
|
-DocRepoLocation $(DocRepoLocation)
|
|
|
|
displayName: Verify Required Docs Json Members
|
|
|
|
|
2021-07-01 21:41:25 +03:00
|
|
|
- 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
|
2022-11-16 03:13:33 +03:00
|
|
|
PushArgs: -f
|
2021-07-01 21:41:25 +03:00
|
|
|
|
2024-05-31 20:23:31 +03:00
|
|
|
- task: AzureCLI@2
|
2021-07-01 21:41:25 +03:00
|
|
|
displayName: Queue Docs CI build
|
|
|
|
inputs:
|
2024-05-31 20:23:31 +03:00
|
|
|
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
|