-
Notifications
You must be signed in to change notification settings - Fork 375
Publish generator dev versions during RegenPreview so emitter deps are restorable in CI #11280
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
Draft
Copilot
wants to merge
9
commits into
main
Choose a base branch
from
copilot/consider-publishing-generator-dev-versions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
04d95af
Initial plan
Copilot 5881cf2
Publish generator dev versions during RegenPreview so emitter deps ar…
Copilot 896b437
Publish generator packages by default when a regen is requested (remo…
Copilot c645ad5
Query ADO feed for next available branded/mgmt emitter versions; publ…
Copilot 878aca2
Hoist version-counter regex out of loop in Get-NextGeneratorVersion
Copilot 0d34d47
Orchestrate generator build/publish/regen as discrete steps in publis…
Copilot d0469ec
Reuse hoisted path variables across phases (address review)
Copilot 9e11a23
Publish Azure/mgmt generators via shared publish template instead of …
Copilot d241888
Rename PublishGenerators phase to BuildGenerators to match its build-…
Copilot 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
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
24 changes: 24 additions & 0 deletions
24
eng/emitters/pipelines/templates/steps/publish-to-devops-feed.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,24 @@ | ||
| parameters: | ||
| # Directory containing the packed *.tgz npm packages to publish. | ||
| - name: PackagesPath | ||
| type: string | ||
|
|
||
| # Condition guarding the publish step. | ||
| - name: Condition | ||
| type: string | ||
| default: succeeded() | ||
|
|
||
| # Publishes all packed *.tgz npm packages found in PackagesPath to the internal | ||
| # Azure Artifacts (DevOps) feed. Callers are responsible for authenticating the | ||
| # active npm registry beforehand (for example via | ||
| # /eng/common/pipelines/templates/steps/create-authenticated-npmrc.yml). | ||
| steps: | ||
| - pwsh: | | ||
| $packageFiles = Get-ChildItem -Path . -Filter '*.tgz' | ||
| foreach ($file in $packageFiles.Name) { | ||
| Write-Host "npm publish $file --verbose --access public" | ||
| npm publish $file --verbose --access public | ||
| } | ||
| displayName: Publish to DevOps feed | ||
| workingDirectory: ${{ parameters.PackagesPath }} | ||
| condition: ${{ parameters.Condition }} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot publishing should be done via the shared publish template job/stage /eng/emitters/pipelines/templates/stages/emitter-stages.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Publishing no longer happens inside the ps1 scripts. I extracted the DevOps-feed publish steps out of
emitter-stages.ymlinto a shared reusable template/eng/emitters/pipelines/templates/steps/publish-to-devops-feed.yml, refactoredemitter-stages.ymlto consume it (no behavior change), andpublish.ymlnow uses that same shared template to publish the Azure/mgmt generator packages to the ADO feed.The step that previously did "Build & publish generators" is now split:
Submit-AzureSdkForNetPr.ps1 -Phase PublishGeneratorsonly builds/packs the generators and stamps the next available feed version (pinning the emitter artifacts to it), and the publish is done by the shared template step immediately after.Publish-GeneratorPackage(thenpm publishinRegenPreview.psm1) has been removed entirely.