-
Notifications
You must be signed in to change notification settings - Fork 171
Sync eng/common directory with azure-sdk-tools for PR 16660 #7385
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
Travis Prescott (tjprescott)
merged 13 commits into
main
from
sync-eng-common-arh/ReleaseScripts-16660
Aug 31, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
89596d8
Add Get-PackageApprovalStatus script.
tjprescott bdfbd5e
Add Create-APIViewRevision.ps1 script
tjprescott b3ddbbe
Add Mark-PackageReleased.ps1 script.
tjprescott 8103387
Update proposoal and scripts. Add step templates.
tjprescott 7eafb75
Updates.
tjprescott f79acfa
Code review feedback.
tjprescott 82c8ab1
Feedback.
tjprescott e30cd54
Update get-package-approval-status condition.
tjprescott c9a1c6d
Updates.
tjprescott a0a1f8f
Ensure Get-PackageApprovalStatus does not fail for packages that aren…
tjprescott 24492d8
Code review feedback.
tjprescott 1832b79
Code review feedback.
tjprescott f0e2591
Validate SDK language for package approval
tjprescott 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
66 changes: 66 additions & 0 deletions
66
eng/common/pipelines/templates/steps/create-apiview-revision.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,66 @@ | ||
| parameters: | ||
| - name: ArtifactPath | ||
| type: string | ||
| default: $(Build.ArtifactStagingDirectory) | ||
| - name: Artifacts | ||
| type: object | ||
| default: [] | ||
| - name: ConfigFileDir | ||
| type: string | ||
| default: $(Build.ArtifactStagingDirectory)/PackageInfo | ||
| - name: GenerateApiReviewForManualOnly | ||
| type: boolean | ||
| default: false | ||
| - name: ArtifactName | ||
| type: string | ||
| default: "packages" | ||
| - name: PackageName | ||
| type: string | ||
| default: "" | ||
| - name: SourceRootPath | ||
| type: string | ||
| default: $(Build.SourcesDirectory) | ||
| - name: PackageInfoFiles | ||
| type: object | ||
| default: [] | ||
|
|
||
| steps: | ||
| # Automatic APIView revisions are created regardless of how the pipeline is triggered. | ||
| # This condition limits revision creation to manual runs when GenerateApiReviewForManualOnly is true. | ||
| - ${{ if or(ne(parameters.GenerateApiReviewForManualOnly, true), eq(variables['Build.Reason'], 'Manual')) }}: | ||
| # Ideally this should be an initial step in the caller job. | ||
| # Remove this step once all callers set the default branch themselves. | ||
| - template: /eng/common/pipelines/templates/steps/set-default-branch.yml | ||
| parameters: | ||
| WorkingDirectory: ${{ parameters.SourceRootPath }} | ||
|
|
||
| - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest'), not(endsWith(variables['Build.Repository.Name'], '-pr'))) }}: | ||
| - task: AzureCLI@2 | ||
| inputs: | ||
| azureSubscription: "APIView prod deployment" | ||
| scriptType: pscore | ||
| scriptLocation: scriptPath | ||
| scriptPath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Create-APIViewRevision.ps1 | ||
| # PackageInfoFiles example: @('a/file1.json','a/file2.json') | ||
| arguments: > | ||
| -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') | ||
| -ArtifactList ('${{ convertToJson(parameters.Artifacts) }}' | ConvertFrom-Json | Select-Object Name) | ||
| -ArtifactPath '${{ parameters.ArtifactPath }}' | ||
| -ArtifactName '${{ parameters.ArtifactName }}' | ||
| -PackageName '${{ parameters.PackageName }}' | ||
| -SourceBranch '$(Build.SourceBranchName)' | ||
| -DefaultBranch '$(DefaultBranch)' | ||
| -ConfigFileDir '${{ parameters.ConfigFileDir }}' | ||
| -BuildId '$(Build.BuildId)' | ||
| -RepoName '$(Build.Repository.Name)' | ||
| displayName: Create APIView Revision | ||
| condition: >- | ||
| and( | ||
| succeededOrFailed(), | ||
| not( | ||
| and( | ||
| eq(variables['Skip.CreateApiReview'], 'true'), | ||
| eq(variables['IsRequesterAuthorizedToSkipApiReview'], 'true') | ||
| ) | ||
| ) | ||
| ) |
45 changes: 45 additions & 0 deletions
45
eng/common/pipelines/templates/steps/get-package-approval-status.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,45 @@ | ||
| parameters: | ||
| - name: PackageInfoFiles | ||
| type: object | ||
| - name: RepoOwner | ||
| type: string | ||
| default: "" | ||
| - name: SourceRootPath | ||
| type: string | ||
| default: $(Build.SourcesDirectory) | ||
|
|
||
| steps: | ||
| # The consuming pipeline must install the Azure SDK Tools CLI before including this template. | ||
| # Use install-azsdk-cli.yml or otherwise set $(AZSDK) to the azsdk executable path. | ||
| - task: AzureCLI@2 | ||
| displayName: Check Package Approval Status | ||
| # Keep this predicate aligned with the release-stage inclusion condition in archetype-python-release.yml. | ||
| condition: >- | ||
| and( | ||
| succeeded(), | ||
| eq(variables['System.TeamProject'], 'internal'), | ||
| or( | ||
| in(variables['Build.Reason'], 'Manual', ''), | ||
| and( | ||
| eq(variables['Build.Reason'], 'IndividualCI'), | ||
| eq(variables['Build.SourceBranch'], 'refs/heads/main') | ||
| ) | ||
| ), | ||
| not( | ||
| and( | ||
| eq(variables['Skip.CheckPackageApproval'], 'true'), | ||
| eq(variables['IsRequesterAuthorizedToSkipApiReview'], 'true') | ||
| ) | ||
| ) | ||
| ) | ||
| inputs: | ||
| azureSubscription: "ADO to ARH Service Connection" | ||
| scriptType: pscore | ||
| scriptLocation: scriptPath | ||
| scriptPath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Get-PackageApprovalStatus.ps1 | ||
| # PackageInfoFiles example: @('a/file1.json','a/file2.json') | ||
| arguments: > | ||
| -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') | ||
| -RepoOwner '${{ parameters.RepoOwner }}' | ||
| -AzSdkExePath '$(AZSDK)' | ||
| workingDirectory: $(Pipeline.Workspace) |
37 changes: 37 additions & 0 deletions
37
eng/common/pipelines/templates/steps/mark-package-released.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,37 @@ | ||
| parameters: | ||
| - name: PackageInfoFiles | ||
| type: object | ||
| - name: RepoOwner | ||
| type: string | ||
| default: "" | ||
| - name: SourceRootPath | ||
| type: string | ||
| default: $(Build.SourcesDirectory) | ||
|
|
||
| steps: | ||
| # Include this template only after package publishing in the release stage. | ||
| # The consuming pipeline must install the Azure SDK Tools CLI before including this template. | ||
| # Use install-azsdk-cli.yml or otherwise set $(AZSDK) to the azsdk executable path. | ||
| - task: AzureCLI@2 | ||
| displayName: Mark Packages Released | ||
| condition: >- | ||
| and( | ||
| succeeded(), | ||
| not( | ||
| and( | ||
| eq(variables['Skip.MarkPackageReleased'], 'true'), | ||
| eq(variables['IsRequesterAuthorizedToSkipApiReview'], 'true') | ||
| ) | ||
| ) | ||
| ) | ||
| inputs: | ||
| azureSubscription: "ADO to ARH Service Connection" | ||
| scriptType: pscore | ||
| scriptLocation: scriptPath | ||
| scriptPath: ${{ parameters.SourceRootPath }}/eng/common/scripts/Mark-PackageReleased.ps1 | ||
| # PackageInfoFiles example: @('a/file1.json','a/file2.json') | ||
| arguments: > | ||
| -PackageInfoFiles @('${{ join(''',''', parameters.PackageInfoFiles) }}') | ||
| -RepoOwner '${{ parameters.RepoOwner }}' | ||
| -AzSdkExePath '$(AZSDK)' | ||
| workingDirectory: $(Pipeline.Workspace) |
12 changes: 12 additions & 0 deletions
12
eng/common/pipelines/templates/variables/api-review-break-glass.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,12 @@ | ||
| variables: | ||
| IsRequesterAuthorizedToSkipApiReview: >- | ||
| $[in( | ||
| lower(variables['Build.RequestedForEmail']), | ||
| 'bebroder@microsoft.com', | ||
| 'mharder@microsoft.com', | ||
| 'djurek@microsoft.com', | ||
| 'chononiw@microsoft.com', | ||
| 'raychen@microsoft.com', | ||
| 'trpresco@microsoft.com', | ||
| 'prmarott@microsoft.com' | ||
| )] | ||
Oops, something went wrong.
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.