-
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
Merged
Merged
Daily reference docs for JS #15749
Changes from 61 commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
300fbe7
Add dev version to Save-Package-Properties.ps1 and includd in build p…
danieljurek 0ce3ba4
Now with fewer pipelines
danieljurek 27c1584
Add daily docs.ms work to docindex.yml
danieljurek 085dee2
Update-DocsMsMetadata and required functions
danieljurek b4f8b20
Common
danieljurek e4e7758
Docs meatadata release and daily docs build
danieljurek 91ebcaa
eq
danieljurek 7003acd
Loop over artifacts in paramaters.Artifacts
danieljurek 922cc5e
Add PackageInfo to path
danieljurek 98c861f
download: current
danieljurek ef16a12
Output artifacts
danieljurek 0095868
Pool
danieljurek 8ff7607
Use relative paths in package properties json file and use dev versio…
danieljurek 9da3bb3
Skip checking out docs repo if it's already checked out
danieljurek e2621cc
Don't overcomplicate docs-metadata-release.yml
danieljurek b00629f
With parameters properly defined and redundant logic removed
danieljurek 58f8600
Use TargetBranchName
danieljurek 8c33ab7
Retain original version to differentiate where metadata and readme do…
danieljurek dd23cf7
Add docs repo support for GetDocsMetadata: first cut
danieljurek 470c513
Sparse checkout needs to include metadata
danieljurek 883168e
Add metadata from packages that aren't tracked in the CSV file yet
danieljurek de4d311
Use "dev" if the package has a "dev" version in JS. This will not wor…
danieljurek 87e8e91
Refactor and use sparse checkout everywhere
danieljurek c7c8775
Refactor long path support
danieljurek 01b6242
Correct path
danieljurek 1d75a0a
Parameter names
danieljurek 7a9d3a8
Remove unnecessary parameter
danieljurek e0a2a9b
Close quote
danieljurek d67ae0a
Add pipeline starting
danieljurek f7ac5f7
Keep the single quotes
danieljurek f691c23
Output link to CI build
danieljurek 93f617e
Refactor:
danieljurek 733eaf8
Apply suggestions from code review
danieljurek f9314e9
Review feedback: Save-Package-Properties.ps1
danieljurek 3e5a09b
Add ability to specify variable name for default branch
danieljurek 9b98ef7
Try convertToJson
danieljurek f831a49
Tab scope
danieljurek ac1fb20
Do doc artifact info loop in Update-DocsMsMetadata.ps1 instead of yam…
danieljurek 6b174e5
Single quotes
danieljurek 75f6e81
Remove template loop
danieljurek 4db6e89
Remove extra template references
danieljurek 8124235
Move convertToJson
danieljurek 50349d8
Try different formatting given convertToJson
danieljurek 7f0f8b9
Reverse Update-DocsMsMetadata.ps1 to operate on a single object. Loop…
danieljurek 969c0dd
Loop in yaml, Rename Update-DocsMsMetadata parameter
danieljurek f85ebce
Try re-formatting yaml
danieljurek 01a1c34
Spell parameters properly
danieljurek 64c69a8
Missing backtick
danieljurek edd9215
Remove extra logging
danieljurek c12283a
First cut at default implementation
danieljurek 05dfffb
Move business logic inside Update-DocsMsMetadata.ps1, PowerShell can …
danieljurek d8bcc2a
Use proper function name
danieljurek 8ea8dab
PackageProps has a DevVersion
danieljurek 8ea7c19
No DefaultImplementation in this change. This should be part of a wid…
danieljurek e14e5a5
Straggling master -> main rename
danieljurek 0cada0d
Merge branch 'main' into djurek/daily-ref-docs-2
danieljurek 4b940d4
Use existing devops starting logic
danieljurek 0d9a9df
Remove extra condition
danieljurek b2103a2
Fix backslashes
danieljurek 44b6ebc
Correct number of backslashes
danieljurek 428f8d5
Use variable for branch name
danieljurek 44754a2
Update eng/scripts/Language-Settings.ps1
danieljurek cd44528
Review feedback
danieljurek abcea10
Do not replace the default branch with the tag in links when doing a …
danieljurek b054eb3
Conditions on docs version for template project
danieljurek 2871f74
Do not run PublishDocsToNightlyBranch if TestPipeline is true
danieljurek 581e30d
Merge branch 'main' into djurek/daily-ref-docs-2
danieljurek 0067a24
Merge branch 'main' into djurek/daily-ref-docs-2
danieljurek 3f909d6
Performance improvements, switch to Linux to take advantage of paths …
danieljurek c770216
Add markdown files to sparse checkout
danieljurek 8f707a9
Reproduce failure for template publishing
danieljurek a16c00e
Remove eng, it's already there by default
danieljurek 2e03f12
Fix instances where metadata might not be available because of filter…
danieljurek 57dd780
Merge branch 'main' into djurek/daily-ref-docs-2
danieljurek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
eng/common/pipelines/templates/steps/enable-long-path-support.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| steps: | ||
| - pwsh: | | ||
| if ($IsWindows) { | ||
| REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /f /v LongPathsEnabled /t REG_DWORD /d 1 | ||
| git config --system core.longpaths true | ||
| } | ||
| else { | ||
| Write-Host "This script is not executing on Windows, skipping registry modification." | ||
| } | ||
| displayName: Enable long path support if necessary |
14 changes: 14 additions & 0 deletions
14
eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| parameters: | ||
| - name: DailyBranchVariableName | ||
| type: string | ||
| default: TargetBranchName | ||
|
|
||
| steps: | ||
| - pwsh: | | ||
| $branchName = $env:DAILYDOCSBRANCHNAMEOVERRIDE | ||
| if (!$branchName) { | ||
| $branchName = "daily/$(Get-Date -Format 'yyyy-MM-dd')" | ||
| } | ||
| Write-Host "Daily Branch Name: $branchName" | ||
| Write-Host "##vso[task.setvariable variable=${{ parameters.DailyBranchVariableName }};]$branchName" | ||
| displayName: Set daily docs branch name in $(${{ parameters.DailyBranchVariableName }}) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,16 @@ | ||
| parameters: | ||
| WorkingDirectory: '$(System.DefaultWorkingDirectory)' | ||
| RemoteRepo: 'origin' | ||
| DefaultBranchVariableName: DefaultBranch | ||
| steps: | ||
| - pwsh: | | ||
| $setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1' | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Host "Not able to fetch the default branch from git command. Set to main." | ||
| $setDefaultBranch = 'main' | ||
| } | ||
| Write-Host "Setting DefaultBranch=$setDefaultBranch" | ||
| Write-Host "##vso[task.setvariable variable=DefaultBranch]$setDefaultBranch" | ||
| Write-Host "Setting ${{ parameters.DefaultBranchVariableName }}=$setDefaultBranch" | ||
| Write-Host "##vso[task.setvariable variable=${{ parameters.DefaultBranchVariableName }}]$setDefaultBranch" | ||
| displayName: "Setup Default Branch" | ||
| workingDirectory: ${{ parameters.workingDirectory }} | ||
| ignoreLASTEXITCODE: true |
95 changes: 95 additions & 0 deletions
95
eng/common/pipelines/templates/steps/update-docsms-metadata.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| parameters: | ||
| - name: Artifacts | ||
| type: object | ||
| default: [] | ||
| - name: RepoId | ||
| type: string | ||
| default: $(Build.Repository.Name) | ||
| - name: WorkingDirectory | ||
| type: string | ||
| default: '' | ||
| - name: ScriptDirectory | ||
| type: string | ||
| default: eng/common/scripts | ||
| - name: TargetDocRepoName | ||
| type: string | ||
| default: '' | ||
| - name: TargetDocRepoOwner | ||
| type: string | ||
| - name: Language | ||
| type: string | ||
| default: '' | ||
| - name: DailyDocsBuild | ||
| type: boolean | ||
| default: false | ||
| - name: SparseCheckoutPaths | ||
| type: object | ||
| default: | ||
| - '**' | ||
|
|
||
| steps: | ||
| - template: /eng/common/pipelines/templates/steps/enable-long-path-support.yml | ||
|
weshaggard marked this conversation as resolved.
|
||
|
|
||
| - pwsh: | | ||
| Write-Host "###vso[task.setvariable variable=DocRepoLocation]${{ parameters.WorkingDirectory }}/doc" | ||
| displayName: Set $(DocRepoLocation) | ||
|
|
||
| - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml | ||
| parameters: | ||
| SkipDefaultCheckout: true | ||
| Repositories: | ||
| - Name: ${{ parameters.TargetDocRepoOwner }}/${{ parameters.TargetDocRepoName }} | ||
| WorkingDirectory: $(DocRepoLocation) | ||
| Paths: ${{ parameters.SparseCheckoutPaths }} | ||
|
|
||
| # If performing a daily docs build set the $(TargetBranchName) to a daily branch | ||
| # name and attempt to checkout the daily docs branch. If the branch doesn't | ||
| # exist, create it | ||
| - ${{ if eq(parameters.DailyDocsBuild, 'true') }}: | ||
| - template: /eng/common/pipelines/templates/steps/set-daily-docs-branch-name.yml | ||
|
|
||
| - pwsh: | | ||
| $ErrorActionPreference = "Continue" | ||
| $RemoteName = "origin" | ||
| $BranchName = "$(TargetBranchName)" | ||
| # Fetch and checkout remote branch if it already exists otherwise create a new branch. | ||
| git ls-remote --exit-code --heads $RemoteName $BranchName | ||
| if ($LASTEXITCODE -eq 0) { | ||
|
danieljurek marked this conversation as resolved.
|
||
| Write-Host "git fetch $RemoteName $BranchName" | ||
| git fetch $RemoteName $BranchName | ||
| Write-Host "git checkout $BranchName." | ||
| git checkout $BranchName | ||
| } else { | ||
| Write-Host "git checkout -b $BranchName." | ||
| git checkout -b $BranchName | ||
| } | ||
| displayName: Checkout daily docs branch if it exists | ||
| workingDirectory: $(DocRepoLocation) | ||
|
|
||
| # If NOT performing a daily docs build, set the $(TargetBranchName) to the | ||
| # default branch of the documentation repository. | ||
| - ${{ if ne(parameters.DailyDocsBuild, 'true') }}: | ||
| - template: /eng/common/pipelines/templates/steps/set-default-branch.yml | ||
| parameters: | ||
| WorkingDirectory: $(DocRepoLocation) | ||
|
danieljurek marked this conversation as resolved.
|
||
| DefaultBranchVariableName: TargetBranchName | ||
|
|
||
| - pwsh: | | ||
| $artifactInfoJson = '${{ convertToJson(parameters.Artifacts) }}'.Trim('"') | ||
| $artifactInfo = ConvertFrom-Json $artifactInfoJson | ||
| ${{ parameters.ScriptDirectory }}/Update-DocsMsMetadata.ps1 ` | ||
| -PackageInfoJsonLocations $artifactInfo ` | ||
|
danieljurek marked this conversation as resolved.
Outdated
|
||
| -DocRepoLocation "$(DocRepoLocation)" ` | ||
| -Language '${{parameters.Language}}' ` | ||
| -RepoId '${{ parameters.RepoId }}' | ||
| displayName: Apply Documentation Updates | ||
|
|
||
| - template: /eng/common/pipelines/templates/steps/git-push-changes.yml | ||
| parameters: | ||
| BaseRepoBranch: $(TargetBranchName) | ||
| BaseRepoOwner: ${{ parameters.TargetDocRepoOwner }} | ||
| CommitMsg: "Update docs metadata" | ||
| TargetRepoName: ${{ parameters.TargetDocRepoName }} | ||
| TargetRepoOwner: ${{ parameters.TargetDocRepoOwner }} | ||
| WorkingDirectory: $(DocRepoLocation) | ||
| ScriptDirectory: ${{ parameters.WorkingDirectory }}/${{ parameters.ScriptDirectory }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.