Skip to content

Commit fe24c10

Browse files
authored
Docs: Wire up onboarding URL for daily docs (#47410)
1 parent bf67022 commit fe24c10

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

eng/pipelines/docindex.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ jobs:
163163
inputs:
164164
pwsh: true
165165
filePath: eng/common/scripts/Update-DocsMsPackages.ps1
166-
arguments: -DocRepoLocation $(DocRepoLocation)
166+
arguments: >-
167+
-DocRepoLocation $(DocRepoLocation)
168+
-PackageSourceOverride 'https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-java/maven/v1'
167169
displayName: Update Docs Onboarding for Daily docs
168170

169171
- task: Powershell@2

eng/scripts/docs/Docs-Onboarding.ps1

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,25 @@ function Set-java-DocsPackageOnboarding($moniker, $metadata, $docRepoLocation, $
1919
Write-Error "No appropriate index for moniker $moniker"
2020
}
2121

22+
$packageDownloadUrl = 'https://repo1.maven.org/maven2'
23+
if ($PackageSourceOverride) {
24+
$packageDownloadUrl = $PackageSourceOverride
25+
}
26+
2227
$onboardedPackages = @()
23-
foreach ($package in $metadata) {
28+
foreach ($package in $metadata) {
29+
2430
$packageInfo = [ordered]@{
2531
packageArtifactId = $package.Name
2632
packageGroupId = $package.Group
2733
packageVersion = $package.Version
28-
29-
# packageDownloadUrl is required by docs build and other values are
30-
# rejected. This is a temporary workaround until the docs build
31-
# supports more package stores.
32-
packageDownloadUrl = 'https://repo1.maven.org/maven2'
34+
packageDownloadUrl = $packageDownloadUrl
3335
}
3436

3537
# Add items from 'DocsCiConfigProperties' into onboarding info. If a
3638
# property already exists, it will be overwritten.
37-
if ($package.ContainsKey('DocsCiConfigProperties')) {
38-
foreach ($key in $package['DocsCiConfigProperties'].Keys) {
39+
if ($package.ContainsKey('DocsCiConfigProperties')) {
40+
foreach ($key in $package['DocsCiConfigProperties'].Keys) {
3941
$packageInfo[$key] = $package['DocsCiConfigProperties'][$key]
4042
}
4143
}

0 commit comments

Comments
 (0)