Skip to content

Commit

Permalink
docindex changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljurek committed Sep 6, 2023
1 parent 1285007 commit 25c2ad6
Showing 1 changed file with 90 additions and 82 deletions.
172 changes: 90 additions & 82 deletions eng/pipelines/docindex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
Repositories:
- Name: $(DocRepoOwner)/$(DocRepoName)
WorkingDirectory: $(DocRepoLocation)
Commitish: djurek/test-legacy-migration

# Install the tool for toc step to use
- task: NuGetToolInstaller@1
inputs:
versionSpec: 6.3.1
# Call update docs ci script to onboard packages

- template: /eng/common/pipelines/templates/steps/set-default-branch.yml

- task: Powershell@2
Expand Down Expand Up @@ -94,90 +94,98 @@ jobs:

- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
parameters:
BaseRepoBranch: djurek/test-legacy-migration
BaseRepoBranch: $(DefaultBranch)
BaseRepoOwner: $(DocRepoOwner)
CommitMsg: "Update docs CI configuration"
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)

# - pwsh: |
# $publicFeedUrl = "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
# Write-Host "##vso[task.setvariable variable=PackageSourceOverride]$publicFeedUrl"
# displayName: Set package source variable
# workingDirectory: $(DocRepoLocation)

# - task: Powershell@2
# inputs:
# pwsh: true
# filePath: eng/common/scripts/Update-DocsMsPackages.ps1
# # Use the dotnet public daily package preview feed as the source for
# # updated packages.
# arguments: >
# -DocRepoLocation $(DocRepoLocation)
# -PackageSourceOverride $(PackageSourceOverride)
# 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)
# -TenantId '$(opensource-aad-tenant-id)'
# -ClientId '$(opensource-aad-app-id)'
# -ClientSecret '$(opensource-aad-secret)'
# -ReadmeFolderRoot 'api/overview/azure'
# 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-toc/reference-unified.yml
# -ReadmeFolderRoot "api/overview/azure"
# -PackageSourceOverride $(PackageSourceOverride)
# 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: PowerShell@2
# displayName: Queue Docs CI build
# inputs:
# pwsh: true
# filePath: eng/common/scripts/Queue-Pipeline.ps1
# arguments: >
# -Organization "apidrop"
# -Project "Content%20CI"
# -DefinitionId 397
# -AuthToken "$(azuresdk-apidrop-devops-queue-build-pat)"
# -BuildParametersJson (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)
- 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)
- pwsh: |
$publicFeedUrl = "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
Write-Host "##vso[task.setvariable variable=PackageSourceOverride]$publicFeedUrl"
displayName: Set package source variable
workingDirectory: $(DocRepoLocation)
- 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
# Use the dotnet public daily package preview feed as the source for
# updated packages.
arguments: >
-DocRepoLocation $(DocRepoLocation)
-PackageSourceOverride $(PackageSourceOverride)
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)
-TenantId '$(opensource-aad-tenant-id)'
-ClientId '$(opensource-aad-app-id)'
-ClientSecret '$(opensource-aad-secret)'
-ReadmeFolderRoot 'api/overview/azure'
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-toc/reference-unified.yml
-ReadmeFolderRoot "api/overview/azure"
-PackageSourceOverride $(PackageSourceOverride)
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: PowerShell@2
displayName: Queue Docs CI build
inputs:
pwsh: true
filePath: eng/common/scripts/Queue-Pipeline.ps1
arguments: >
-Organization "apidrop"
-Project "Content%20CI"
-DefinitionId 397
-AuthToken "$(azuresdk-apidrop-devops-queue-build-pat)"
-BuildParametersJson (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)

0 comments on commit 25c2ad6

Please sign in to comment.