Skip to content

Commit 25fe2b3

Browse files
authored
Merge d48c00b into 157226e
2 parents 157226e + d48c00b commit 25fe2b3

File tree

3 files changed

+244
-102
lines changed

3 files changed

+244
-102
lines changed

eng/pipelines/docindex.yml

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -86,89 +86,89 @@ jobs:
8686
displayName: Verify Required Docs Json Members
8787

8888
# Push changes to docs repo
89-
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml
90-
parameters:
91-
WorkingDirectory: $(DocRepoLocation)
89+
# - template: /eng/common/pipelines/templates/steps/set-default-branch.yml
90+
# parameters:
91+
# WorkingDirectory: $(DocRepoLocation)
9292

9393
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
9494
parameters:
95-
BaseRepoBranch: $(DefaultBranch)
95+
BaseRepoBranch: "jim-ToC-Test"
9696
BaseRepoOwner: $(DocRepoOwner)
9797
CommitMsg: "Update docs CI configuration"
9898
TargetRepoName: $(DocRepoName)
9999
TargetRepoOwner: $(DocRepoOwner)
100100
WorkingDirectory: $(DocRepoLocation)
101101

102-
# Prepare daily docs CI
103-
- template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml
104-
parameters:
105-
DailyBranchVariableName: DailyDocsBranchName
106-
- pwsh: |
107-
$ErrorActionPreference = "Continue"
108-
git checkout "origin/$(DailyDocsBranchName)" 2>&1 | Out-Null
109-
$LASTEXITCODE = 0 # This ignores any error from git checkout
110-
git status
111-
displayName: Checkout daily branch if it exists
112-
workingDirectory: $(DocRepoLocation)
113-
114-
- task: Powershell@2
115-
inputs:
116-
pwsh: true
117-
filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1
118-
arguments: -DocRepoLocation $(DocRepoLocation)
119-
displayName: Move deprecated packages to legacy moniker
120-
condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
121-
122-
- task: Powershell@2
123-
inputs:
124-
pwsh: true
125-
filePath: eng/common/scripts/Update-DocsMsPackages.ps1
126-
arguments: >-
127-
-DocRepoLocation $(DocRepoLocation)
128-
-PackageSourceOverride "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
129-
displayName: Update Docs Onboarding for Daily docs
130-
- task: Powershell@2
131-
inputs:
132-
pwsh: true
133-
filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1
134-
arguments: -DocRepoLocation $(DocRepoLocation)
135-
displayName: Generate Service Level Readme for Daily docs
136-
- task: Powershell@2
137-
inputs:
138-
pwsh: true
139-
filePath: eng/common/scripts/Update-DocsMsToc.ps1
140-
arguments: >-
141-
-DocRepoLocation $(DocRepoLocation)
142-
-OutputLocation $(DocRepoLocation)/docs-ref-mapping/reference-unified.yml
143-
displayName: Generate ToC for Daily Docs
144-
145-
- task: Powershell@2
146-
inputs:
147-
pwsh: true
148-
filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1
149-
arguments: >-
150-
-DocRepoLocation $(DocRepoLocation)
151-
displayName: Verify Required Docs Json Members
152-
153-
- template: /eng/common/pipelines/templates/steps/git-push-changes.yml
154-
parameters:
155-
BaseRepoBranch: $(DailyDocsBranchName)
156-
BaseRepoOwner: $(DocRepoOwner)
157-
CommitMsg: "Update targeting packages based on release metadata. (Daily docs)"
158-
TargetRepoName: $(DocRepoName)
159-
TargetRepoOwner: $(DocRepoOwner)
160-
WorkingDirectory: $(DocRepoLocation)
161-
ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts
162-
PushArgs: -f
163-
164-
- task: PowerShell@2
165-
displayName: Queue Docs CI build
166-
inputs:
167-
pwsh: true
168-
filePath: eng/common/scripts/Queue-Pipeline.ps1
169-
arguments: >
170-
-Organization "apidrop"
171-
-Project "Content%20CI"
172-
-DefinitionId 5533
173-
-AuthToken "$(azuresdk-apidrop-devops-queue-build-pat)"
174-
-BuildParametersJson (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)
102+
# # Prepare daily docs CI
103+
# - template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml
104+
# parameters:
105+
# DailyBranchVariableName: DailyDocsBranchName
106+
# - pwsh: |
107+
# $ErrorActionPreference = "Continue"
108+
# git checkout "origin/$(DailyDocsBranchName)" 2>&1 | Out-Null
109+
# $LASTEXITCODE = 0 # This ignores any error from git checkout
110+
# git status
111+
# displayName: Checkout daily branch if it exists
112+
# workingDirectory: $(DocRepoLocation)
113+
114+
# - task: Powershell@2
115+
# inputs:
116+
# pwsh: true
117+
# filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1
118+
# arguments: -DocRepoLocation $(DocRepoLocation)
119+
# displayName: Move deprecated packages to legacy moniker
120+
# condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
121+
122+
# - task: Powershell@2
123+
# inputs:
124+
# pwsh: true
125+
# filePath: eng/common/scripts/Update-DocsMsPackages.ps1
126+
# arguments: >-
127+
# -DocRepoLocation $(DocRepoLocation)
128+
# -PackageSourceOverride "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
129+
# displayName: Update Docs Onboarding for Daily docs
130+
# - task: Powershell@2
131+
# inputs:
132+
# pwsh: true
133+
# filePath: eng/common/scripts/Service-Level-Readme-Automation.ps1
134+
# arguments: -DocRepoLocation $(DocRepoLocation)
135+
# displayName: Generate Service Level Readme for Daily docs
136+
# - task: Powershell@2
137+
# inputs:
138+
# pwsh: true
139+
# filePath: eng/common/scripts/Update-DocsMsToc.ps1
140+
# arguments: >-
141+
# -DocRepoLocation $(DocRepoLocation)
142+
# -OutputLocation $(DocRepoLocation)/docs-ref-mapping/reference-unified.yml
143+
# displayName: Generate ToC for Daily Docs
144+
145+
# - task: Powershell@2
146+
# inputs:
147+
# pwsh: true
148+
# filePath: eng/common/scripts/Verify-RequiredDocsJsonMembers.ps1
149+
# arguments: >-
150+
# -DocRepoLocation $(DocRepoLocation)
151+
# displayName: Verify Required Docs Json Members
152+
153+
# - template: /eng/common/pipelines/templates/steps/git-push-changes.yml
154+
# parameters:
155+
# BaseRepoBranch: $(DailyDocsBranchName)
156+
# BaseRepoOwner: $(DocRepoOwner)
157+
# CommitMsg: "Update targeting packages based on release metadata. (Daily docs)"
158+
# TargetRepoName: $(DocRepoName)
159+
# TargetRepoOwner: $(DocRepoOwner)
160+
# WorkingDirectory: $(DocRepoLocation)
161+
# ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts
162+
# PushArgs: -f
163+
164+
# - task: PowerShell@2
165+
# displayName: Queue Docs CI build
166+
# inputs:
167+
# pwsh: true
168+
# filePath: eng/common/scripts/Queue-Pipeline.ps1
169+
# arguments: >
170+
# -Organization "apidrop"
171+
# -Project "Content%20CI"
172+
# -DefinitionId 5533
173+
# -AuthToken "$(azuresdk-apidrop-devops-queue-build-pat)"
174+
# -BuildParametersJson (@{ params = (Get-Content ./eng/dailydocsconfig.json -Raw) -replace '%%DailyDocsBranchName%%', "$(DailyDocsBranchName)" } | ConvertTo-Json)

eng/scripts/Language-Settings.ps1

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,29 @@ function Get-python-PackageInfoFromPackageFile ($pkg, $workingDirectory)
128128
}
129129
}
130130

131+
# This is the GetDocsMsDevLanguageSpecificPackageInfoFn implementation
132+
function Get-python-DocsMsDevLanguageSpecificPackageInfo($packageInfo, $packageSourceOverride) {
133+
# If the default namespace isn't in the package info then it needs to be added
134+
if (!$packageInfo.Namespaces) {
135+
# If the Version is INGORE that means it's a source install and those
136+
# ones need to be done by hand
137+
if ($packageInfo.Version -ine "IGNORE") {
138+
$version = $packageInfo.Version
139+
# If the dev version is set, use that
140+
if ($packageInfo.DevVersion) {
141+
$version = $packageInfo.DevVersion
142+
}
143+
$namespaces = Get-NamespacesFromWhlFile $packageInfo.Name $version $packageSourceOverride
144+
if ($namespaces.Count -gt 0) {
145+
$packageInfo | Add-Member -Type NoteProperty -Name "Namespaces" -Value $namespaces
146+
} else {
147+
LogWarning "Unable to find namespaces $($packageInfo.Name):$version"
148+
}
149+
}
150+
}
151+
return $packageInfo
152+
}
153+
131154
# Stage and Upload Docs to blob Storage
132155
function Publish-python-GithubIODocs ($DocLocation, $PublicArtifactLocation)
133156
{
@@ -618,8 +641,8 @@ function Validate-Python-DocMsPackages ($PackageInfo, $PackageInfos, $PackageSou
618641

619642
$allSucceeded = $true
620643
foreach ($item in $PackageInfos) {
621-
# Some packages
622-
if ($item.Version -eq 'IGNORE') {
644+
# If the Version is INGORE that means it's a source install and those aren't run through ValidatePackage
645+
if ($item.Version -eq 'IGNORE') {
623646
continue
624647
}
625648

@@ -656,7 +679,7 @@ function Get-python-DirectoriesForGeneration () {
656679

657680
function Update-python-GeneratedSdks([string]$PackageDirectoriesFile) {
658681
$packageDirectories = Get-Content $PackageDirectoriesFile | ConvertFrom-Json
659-
682+
660683
$directoriesWithErrors = @()
661684

662685
foreach ($directory in $packageDirectories) {

0 commit comments

Comments
 (0)