Skip to content

Commit

Permalink
Added pipeline to validate spec location (#28303)
Browse files Browse the repository at this point in the history
### Purpose of this PR
The purpose is to gate on the REST API specifications used to release
SDK are from the main branch of
[Azure/azure-rest-api-spec](https://github.com/Azure/azure-rest-api-specs).

### Packages impacted by this PR
All the data plane GA packages to be released.

I scanned through this JS repo and identified 11 data plane services
that have released GA packages but their configuration file either
`tsp-location.yaml` or `swagger\README.md` reference the REST API specs
from a non-main branch of Azure spec repo.
Please refer to [this
spreadsheet](https://microsoftapc-my.sharepoint.com/:x:/g/personal/raychen_microsoft_com/ETMHnmWSA6VKmGouTjAITwEBqSavTLQkOcd2Ykx2eEE8_g?e=oalb1N)
to get the details of all the violated packages.

After this PR is merged, the next GA release for these packages will be
blocked. They need to correct the spec path before releasing GA
packages.

### Describe the problem that is addressed by this PR
Added a pipeline from common template to release pipeline to validate
the REST API specification location is from the main branch of
[Azure/azure-rest-api-spec](https://github.com/Azure/azure-rest-api-specs).

This validation will be skipped if the package to be released is non-GA
package.

### Provide a list of related PRs
The common script and pipeline were merged by another PR.
Azure/azure-sdk-tools#7451

FYI - The same change has been added to other language repos' release
pipelines.
Azure/azure-sdk-for-net#40783
Azure/azure-sdk-for-java#38332
  • Loading branch information
raych1 authored Jan 19, 2024
1 parent 5984837 commit c719a2c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eng/pipelines/templates/stages/archetype-js-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ stages:
PackageName: ${{artifact.name}}
ServiceName: ${{parameters.ServiceDirectory}}
ForRelease: true
- template: /eng/common/pipelines/templates/steps/verify-restapi-spec-location.yml
parameters:
PackageName: ${{artifact.name}}
ServiceDirectory: ${{parameters.ServiceDirectory}}
ArtifactLocation: $(Pipeline.Workspace)/${{parameters.ArtifactName}}
- pwsh: |
Get-ChildItem -Recurse ${{parameters.ArtifactName}}/${{artifact.name}}
workingDirectory: $(Pipeline.Workspace)
Expand Down

0 comments on commit c719a2c

Please sign in to comment.