-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Daily reference docs for JS #15749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daily reference docs for JS #15749
Changes from all commits
300fbe7
0ce3ba4
27c1584
085dee2
b4f8b20
e4e7758
91ebcaa
7003acd
922cc5e
98c861f
ef16a12
0095868
8ff7607
9da3bb3
e2621cc
b00629f
58f8600
8c33ab7
dd23cf7
470c513
883168e
de4d311
87e8e91
c7c8775
01b6242
1d75a0a
7a9d3a8
e0a2a9b
d67ae0a
f7ac5f7
f691c23
93f617e
733eaf8
f9314e9
3e5a09b
9b98ef7
f831a49
ac1fb20
6b174e5
75f6e81
4db6e89
8124235
50349d8
7f0f8b9
969c0dd
f85ebce
01a1c34
64c69a8
edd9215
c12283a
05dfffb
d8bcc2a
8ea8dab
8ea7c19
e14e5a5
0cada0d
4b940d4
0d9a9df
b2103a2
44b6ebc
428f8d5
44754a2
cd44528
abcea10
b054eb3
2871f74
581e30d
0067a24
3f909d6
c770216
8f707a9
a16c00e
2e03f12
57dd780
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,10 +50,16 @@ $releaseReplaceRegex = "(https://github.com/$RepoId/(?:blob|tree)/)(?:master|mai | |
| $TITLE_REGEX = "(\#\s+(?<filetitle>Azure .+? (?:client|plugin|shared) library for (?:JavaScript|Java|Python|\.NET|C)))" | ||
|
|
||
| function GetAdjustedReadmeContent($ReadmeContent, $PackageInfo, $PackageMetadata) { | ||
| # Normalize service name "Key Vault" -> "keyvault" | ||
| # TODO: Use taxonomy for service name -- https://github.com/Azure/azure-sdk-tools/issues/1442 | ||
| # probably from metadata | ||
| $service = $PackageMetadata.ServiceName.ToLower().Replace(" ", "") | ||
| # The $PackageMetadata could be $null if there is no associated metadata entry | ||
| # based on how the metadata CSV is filtered | ||
| $service = $PackageInfo.ServiceDirectory.ToLower() | ||
| if ($PackageMetadata -and $PackageMetadata.ServiceName) { | ||
| # Normalize service name "Key Vault" -> "keyvault" | ||
| # TODO: Use taxonomy for service name -- https://github.com/Azure/azure-sdk-tools/issues/1442 | ||
| # probably from metadata | ||
| $service = $PackageMetadata.ServiceName.ToLower().Replace(" ", "") | ||
| } | ||
|
|
||
| # Generate the release tag for use in link substitution | ||
| $tag = "$($PackageInfo.Name)_$($PackageInfo.Version)" | ||
| $date = Get-Date -Format "MM/dd/yyyy" | ||
|
|
@@ -110,11 +116,14 @@ function UpdateDocsMsMetadataForPackage($packageInfoJsonLocation) { | |
|
|
||
| $packageMetadataArray = (Get-CSVMetadata).Where({ $_.Package -eq $packageInfo.Name -and $_.GroupId -eq $packageInfo.Group -and $_.Hide -ne 'true' -and $_.New -eq 'true' }) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if this is going to come into play here yet but if we ever enable strict mode .GroupId will fail because it only exists on some language objects. |
||
| if ($packageMetadataArray.Count -eq 0) { | ||
| LogError "Could not retrieve metadata for $($packageInfo.Name) from metadata CSV" | ||
| LogWarning "Could not retrieve metadata for $($packageInfo.Name) from metadata CSV. Using best effort defaults." | ||
| $packageMetadata = $null | ||
| } elseif ($packageMetadataArray.Count -gt 1) { | ||
| LogWarning "Multiple metadata entries for $($packageInfo.Name) in metadata CSV. Using first entry." | ||
danieljurek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| $packageMetadata = $packageMetadataArray[0] | ||
| } else { | ||
| $packageMetadata = $packageMetadataArray[0] | ||
| } | ||
| $packageMetadata = $packageMetadataArray[0] | ||
|
|
||
| $readmeContent = Get-Content $packageInfo.ReadMePath -Raw | ||
| $outputReadmeContent = "" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ jobs: | |
| Paths: | ||
| - ci-configs/packages-latest.json | ||
| - ci-configs/packages-preview.json | ||
| - metadata/ | ||
| Repositories: | ||
| - Name: $(DocRepoOwner)/$(DocRepoName) | ||
| WorkingDirectory: $(DocRepoLocation) | ||
|
|
@@ -43,3 +44,45 @@ jobs: | |
| 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) | ||
| - task: Powershell@2 | ||
| inputs: | ||
| pwsh: true | ||
| filePath: eng/common/scripts/Update-DocsMsPackages.ps1 | ||
| arguments: -DocRepoLocation $(DocRepoLocation) | ||
| displayName: Update Docs Onboarding for Daily branch | ||
| - 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 | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: Queue Docs CI build | ||
| inputs: | ||
| pwsh: true | ||
| filePath: eng/common/scripts/Queue-Pipeline.ps1 | ||
| # SourceBranch must be "master" as this repo is managed by the docs | ||
| # team and will be updated according to their timeline. | ||
| arguments: > | ||
| -Organization "apidrop" | ||
| -Project "Content%20CI" | ||
| -SourceBranch "master" | ||
| -DefinitionId 3452 | ||
| -Base64EncodedAuthToken "$(azuresdk-apidrop-devops-queue-build-pat)" | ||
| -BuildParametersJson '{"params":"{ \"target_repo\": { \"url\": \"https://github.com/MicrosoftDocs/azure-docs-sdk-node\", \"branch\": \"$(DailyDocsBranchName)\", \"folder\": \"./\" }, \"source_repos\": [] }"}' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: potential future follow-up, it would be get it storing this as yml and using convertToJson worked on it to make this more readable and maintainable. |
||
Uh oh!
There was an error while loading. Please reload this page.