-
Notifications
You must be signed in to change notification settings - Fork 183
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
New validation for REST API spec location before SDK release #7451
Conversation
SDK release pipeline would run this validation to ensure the spec comes from the main branch of Azure/azure-rest-api-specs repo
The following pipelines have been queued for testing: |
eng/common/pipelines/templates/steps/verify-restapi-spec-location.yml
Outdated
Show resolved
Hide resolved
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
eng/common/pipelines/templates/steps/verify-restapi-spec-location.yml
Outdated
Show resolved
Hide resolved
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
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.
This looks reasonable to me I'll leave it to Renhe to sign-off as he will have more knowledge about the content of these files.
The following pipelines have been queued for testing: |
[ValidateNotNullOrEmpty()] | ||
[string] $ArtifactLocation, | ||
[Parameter(Position = 2)] | ||
[string]$GitHubPat = $($env:GH_TOKEN), |
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.
Get the token from environment variable so that it won't be leaked in the pipeline log.
@weshaggard , can you also approve this PR if the change looks good? |
eng/common/pipelines/templates/steps/verify-restapi-spec-location.yml
Outdated
Show resolved
Hide resolved
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.
A couple comments but overall looks good to get started using.
The following pipelines have been queued for testing: |
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#7451 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: raychen <raychen@microsoft.com>
### 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
We only support the SDK release for the spec checked into 'main' branch of Azure/azure-rest-api-specs repository.
tsp-location.yaml
(typespec case) and validation onautorest.md
(swagger case)@weshaggard can you review?