Add condition check for main branch updates
@@ -6,7 +6,8 @@ jobs:
- job: UpdateDocsMsBuildConfig
pool:
- vmImage: ubuntu-20.04
+ name: azsdk-pool-mms-ubuntu-2004-general
+ vmImage: Ubuntu20.04
variables:
DocRepoLocation: $(Pipeline.Workspace)/docs
DocRepoOwner: MicrosoftDocs
@@ -48,7 +49,7 @@ jobs:
pwsh: true
filePath: eng/common/scripts/Update-DocsMsPackages.ps1
arguments: -DocRepoLocation $(DocRepoLocation) -ImageId '$(DocValidationImageId)'
- displayName: Update Docs Onboarding
+ displayName: Update Docs Onboarding for main branch
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
- task: Powershell@2
@@ -60,7 +61,8 @@ jobs:
-TenantId '$(opensource-aad-tenant-id)'
-ClientId '$(opensource-aad-app-id)'
-ClientSecret '$(opensource-aad-secret)'
- displayName: Generate Service Level Readme
+ 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:
@@ -69,7 +71,8 @@ jobs:
arguments: >-
-DocRepoLocation $(DocRepoLocation)
-OutputLocation $(DocRepoLocation)/docs-ref-mapping/reference-unified.yml
- displayName: Generate ToC
+ displayName: Generate ToC for main branch
+ condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
# Push changes to docs repo
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
@@ -104,7 +107,7 @@ jobs:
arguments: >-
-DocRepoLocation $(DocRepoLocation)
-PackageSourceOverride "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
- displayName: Update Docs Onboarding for Daily branch
+ displayName: Update Docs Onboarding for Daily docs
- task: Powershell@2
inputs:
pwsh: true
@@ -114,7 +117,7 @@ jobs:
-TenantId '$(opensource-aad-tenant-id)'
-ClientId '$(opensource-aad-app-id)'
-ClientSecret '$(opensource-aad-secret)'
- displayName: Generate Service Level Readme
+ displayName: Generate Service Level Readme for Daily docs
- task: Powershell@2
inputs:
pwsh: true
@@ -133,6 +136,7 @@ jobs:
TargetRepoOwner: $(DocRepoOwner)
WorkingDirectory: $(DocRepoLocation)
ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts
+ PushArgs: -f
- task: PowerShell@2
displayName: Queue Docs CI build
