Sync eng/common directory with azure-sdk-tools for PR 9652 (#6361)
* 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 <ben@benbp.net> * 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 <Wes.Haggard@microsoft.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
This commit is contained in:
parent
6f3ee2ab6a
commit
4d8c32d22a
@ -25,13 +25,14 @@ function Get-BlobStorage-Artifacts(
|
||||
# "--query '[].name'" returns a list of only blob names
|
||||
# "--num-results *" handles pagination so the caller does not have to
|
||||
$artifacts = az storage blob list `
|
||||
--auth-mode login `
|
||||
--account-name $storageAccountName `
|
||||
--container-name $storageContainerName `
|
||||
--prefix $storagePrefix `
|
||||
--delimiter / `
|
||||
--only-show-errors `
|
||||
--query '[].name' `
|
||||
--num-results * | ConvertFrom-Json
|
||||
--num-results * | ConvertFrom-Json
|
||||
LogDebug "Number of artifacts found: $($artifacts.Length)"
|
||||
|
||||
# example: "python/azure-storage-blob" -> "azure-storage-blob"
|
||||
|
||||
@ -108,7 +108,7 @@ function httpGetAsyncFallbackOnFail(targetUrl, successCallback, failureCallback)
|
||||
}
|
||||
|
||||
function populateOptions(selector, packageName) {
|
||||
var versionRequestUrl = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions"
|
||||
var versionRequestUrl = "https://azuresdkdocs.z19.web.core.windows.net/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions"
|
||||
|
||||
httpGetAsync(versionRequestUrl, function (responseText) {
|
||||
var versionselector = document.createElement("select")
|
||||
@ -181,9 +181,9 @@ function loadedOtherVersions(url, latestVersions, publishedVersions, selector, c
|
||||
}
|
||||
|
||||
function populateIndexList(selector, packageName) {
|
||||
var url = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions"
|
||||
var latestGAUrl = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/latest-ga"
|
||||
var latestPreviewUrl = "https://azuresdkdocs.blob.core.windows.net/$web/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/latest-preview"
|
||||
var url = "https://azuresdkdocs.z19.web.core.windows.net/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/versions"
|
||||
var latestGAUrl = "https://azuresdkdocs.z19.web.core.windows.net/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/latest-ga"
|
||||
var latestPreviewUrl = "https://azuresdkdocs.z19.web.core.windows.net/" + SELECTED_LANGUAGE + "/" + packageName + "/versioning/latest-preview"
|
||||
var latestVersions = document.createElement("ul")
|
||||
httpGetLatestAsync(latestGAUrl, latestVersions, packageName)
|
||||
httpGetLatestAsync(latestPreviewUrl, latestVersions, packageName)
|
||||
@ -217,7 +217,7 @@ function populateIndexList(selector, packageName) {
|
||||
}
|
||||
|
||||
function getPackageUrl(language, package, version) {
|
||||
return "https://azuresdkdocs.blob.core.windows.net/$web/" + language + "/" + package + "/" + version + "/index.html"
|
||||
return "https://azuresdkdocs.z19.web.core.windows.net/" + language + "/" + package + "/" + version + "/index.html"
|
||||
}
|
||||
|
||||
// Populate Versions
|
||||
|
||||
@ -15,12 +15,14 @@ jobs:
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
displayName: Download and Extract DocFX
|
||||
|
||||
- task: PowerShell@2
|
||||
- task: AzureCLI@2
|
||||
displayName: 'Generate Doc Index'
|
||||
inputs:
|
||||
pwsh: true
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1
|
||||
arguments: >
|
||||
azureSubscription: 'Azure SDK Artifacts'
|
||||
scriptType: pscore
|
||||
scriptLocation: inlineScript
|
||||
inlineScript: >
|
||||
$(Build.SourcesDirectory)/eng/common/docgeneration/Generate-DocIndex.ps1
|
||||
-Docfx $(docfxPath)
|
||||
-RepoRoot $(Build.SourcesDirectory)
|
||||
-DocGenDir "$(Build.SourcesDirectory)/eng/common/docgeneration"
|
||||
|
||||
@ -116,7 +116,7 @@ function Get-Existing-Versions
|
||||
Param (
|
||||
[Parameter(Mandatory=$true)] [String]$PkgName
|
||||
)
|
||||
$versionUri = "${BlobAccountName}/`$web/$($Language)/$($PkgName)/versioning/versions"
|
||||
$versionUri = "https://azuresdkdocs.z19.web.core.windows.net/$Language/$PkgName/versioning/versions"
|
||||
LogDebug "Heading to $versionUri to retrieve known versions"
|
||||
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user