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
|
|
|
|
|
|
|
- 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
|
2021-11-05 08:13:56 +03:00
|
|
|
DocValidationImageId: azuresdkimages.azurecr.io/jsrefautocr:latest
|
2021-05-27 18:57:46 +03:00
|
|
|
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)
|
2021-11-08 22:10:26 +03:00
|
|
|
# Pull and build the docker image.
|
2021-11-05 08:13:56 +03:00
|
|
|
- template: /eng/common/pipelines/templates/steps/docker-pull-image.yml
|
|
|
|
parameters:
|
|
|
|
ContainerRegistryClientId: $(azuresdkimages-cr-clientid)
|
|
|
|
ContainerRegistryClientSecret: $(azuresdkimages-cr-clientsecret)
|
2021-11-08 22:10:26 +03:00
|
|
|
ImageId: "$(DocValidationImageId)"
|
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
|
2021-11-05 08:13:56 +03:00
|
|
|
arguments: -DocRepoLocation $(DocRepoLocation) -ImageId '$(DocValidationImageId)'
|
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)
|
|
|
|
displayName: Verify Required Docs Json Members
|
|
|
|
|
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)
|
|
|
|
CommitMsg: "Update docs CI configuration"
|
|
|
|
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
|
|
|
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: Queue Docs CI build
|
|
|
|
inputs:
|
|
|
|
pwsh: true
|
|
|
|
filePath: eng/common/scripts/Queue-Pipeline.ps1
|
|
|
|
arguments: >
|
|
|
|
-Organization "apidrop"
|
|
|
|
-Project "Content%20CI"
|
|
|
|
-DefinitionId 3452
|
2023-04-12 23:51:24 +03:00
|
|
|
-AuthToken "$(azuresdk-apidrop-devops-queue-build-pat)"
|
2021-07-01 21:41:25 +03:00
|
|
|
-BuildParametersJson '{"params":"{ \"target_repo\": { \"url\": \"https://github.com/MicrosoftDocs/azure-docs-sdk-node\", \"branch\": \"$(DailyDocsBranchName)\", \"folder\": \"./\" }, \"source_repos\": [] }"}'
|