Skip to content

Commit bca31da

Browse files
azure-sdkweshaggardbenbp
authored
Sync eng/common directory with azure-sdk-tools for PR 9652 (Azure#43851)
* Update github.io docs to use static website instead of blobs directly * Update eng/common/scripts/copy-docs-to-blobstorage.ps1 Co-authored-by: Ben Broderick Phillips <[email protected]> * Switch from AzurePowerShell to AzureCLI task * Add scriptLocation to docindex.yml * Update Generate-DocIndex.ps1 * Fix indentation in docindex.yml script block --------- Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent 2ba0e9f commit bca31da

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

eng/common/docgeneration/Generate-DocIndex.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ function Get-BlobStorage-Artifacts(
2525
# "--query '[].name'" returns a list of only blob names
2626
# "--num-results *" handles pagination so the caller does not have to
2727
$artifacts = az storage blob list `
28+
--auth-mode login `
2829
--account-name $storageAccountName `
2930
--container-name $storageContainerName `
3031
--prefix $storagePrefix `
3132
--delimiter / `
3233
--only-show-errors `
3334
--query '[].name' `
34-
--num-results * | ConvertFrom-Json
35+
--num-results * | ConvertFrom-Json
3536
LogDebug "Number of artifacts found: $($artifacts.Length)"
3637

3738
# example: "python/azure-storage-blob" -> "azure-storage-blob"

eng/common/docgeneration/templates/matthews/styles/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function httpGetAsyncFallbackOnFail(targetUrl, successCallback, failureCallback)
108108
}
109109

110110
function populateOptions(selector, packageName) {
111-
var versionRequestUrl = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions"
111+
var versionRequestUrl = "https://azuresdkdocs.z19.web.core.windows.net/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions"
112112

113113
httpGetAsync(versionRequestUrl, function (responseText) {
114114
var versionselector = document.createElement("select")
@@ -181,9 +181,9 @@ function loadedOtherVersions(url, latestVersions, publishedVersions, selector, c
181181
}
182182

183183
function populateIndexList(selector, packageName) {
184-
var url = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions"
185-
var latestGAUrl = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/latest-ga"
186-
var latestPreviewUrl = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/latest-preview"
184+
var url = "https://azuresdkdocs.z19.web.core.windows.net/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions"
185+
var latestGAUrl = "https://azuresdkdocs.z19.web.core.windows.net/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/latest-ga"
186+
var latestPreviewUrl = "https://azuresdkdocs.z19.web.core.windows.net/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/latest-preview"
187187
var latestVersions = document.createElement("ul")
188188
httpGetLatestAsync(latestGAUrl, latestVersions, packageName)
189189
httpGetLatestAsync(latestPreviewUrl, latestVersions, packageName)
@@ -217,7 +217,7 @@ function populateIndexList(selector, packageName) {
217217
}
218218

219219
function getPackageUrl(language, package, version) {
220-
return "https://azuresdkdocs.blob.core.windows.net/$web/" + language + "/" + package + "/" + version + "/index.html"
220+
return "https://azuresdkdocs.z19.web.core.windows.net/" + language + "/" + package + "/" + version + "/index.html"
221221
}
222222

223223
// Populate Versions

eng/common/pipelines/templates/jobs/docindex.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ jobs:
1515
workingDirectory: $(Build.BinariesDirectory)
1616
displayName: Download and Extract DocFX
1717
18-
- task: PowerShell@2
18+
- task: AzureCLI@2
1919
displayName: 'Generate Doc Index'
2020
inputs:
21-
pwsh: true
22-
filePath: $(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1
23-
arguments: >
21+
azureSubscription: 'Azure SDK Artifacts'
22+
scriptType: pscore
23+
scriptLocation: inlineScript
24+
inlineScript: >
25+
$(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1
2426
-Docfx $(docfxPath)
2527
-RepoRoot $(Build.SourcesDirectory)
2628
-DocGenDir "$(Build.SourcesDirectory)/eng/common/docgeneration"

eng/common/scripts/copy-docs-to-blobstorage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function Get-Existing-Versions
116116
Param (
117117
[Parameter(Mandatory=$true)] [String]$PkgName
118118
)
119-
$versionUri = "${BlobAccountName}/`$web/$($Language)/$($PkgName)/versioning/versions"
119+
$versionUri = "https://azuresdkdocs.z19.web.core.windows.net/$Language/$PkgName/versioning/versions"
120120
LogDebug "Heading to $versionUri to retrieve known versions"
121121

122122
try {

0 commit comments

Comments
 (0)