-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[ci] Enable api scan on dnceng #30984
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
Conversation
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.
Pull Request Overview
This pull request adds API scanning capability to the build pipeline by introducing a new APIScan stage and integrating it into the existing CI/CD workflow. The change addresses the gap left when transitioning to new dnceng builds, which stopped running API scans because 1ES templates don't support this functionality yet.
- Adds a new APIScan stage with configurable parameters for scanning MAUI assemblies
- Integrates the APIScan stage into the internal pipeline to run after the Pack stage
- Prepares and publishes APIScanFiles artifacts containing assemblies (.dll and .pdb files) needed for scanning
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
eng/pipelines/azure-pipelines-internal.yml |
Integrates the new APIScan stage into the internal pipeline |
eng/pipelines/arcade/stage-pack.yml |
Adds artifact preparation for APIScan and removes commented code |
eng/pipelines/arcade/stage-api-scan.yml |
Defines the new APIScan stage template with job configuration |
| - task: CopyFiles@2 | ||
| displayName: Copy assemblies for APIScan | ||
| inputs: | ||
| SourceFolder: '$(Build.SourcesDirectory)\artifacts\bin\Controls.Core' |
Copilot
AI
Aug 1, 2025
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.
The hardcoded path 'Controls.Core' makes this specific to one component. Consider using a parameter or variable to make this more flexible for scanning other components.
| SourceFolder: '$(Build.SourcesDirectory)\artifacts\bin\Controls.Core' | |
| SourceFolder: '$(Build.SourcesDirectory)\artifacts\bin\${{ parameters.componentName }}' |
* [ci] List dlls * Fix steps * Again * Again * yml * Execute post steps * Try run apiscan * Try add ids * TRY AGAIN * Try 1ES tasks * Fxi ident * Remove publish * Try template context * isProduction * try outputs * not release job * Fix artifact name * Try again fix variables * Try push metadat files * Try hardcode * Try again * Update variables
* [ci] List dlls * Fix steps * Again * Again * yml * Execute post steps * Try run apiscan * Try add ids * TRY AGAIN * Try 1ES tasks * Fxi ident * Remove publish * Try template context * isProduction * try outputs * not release job * Fix artifact name * Try again fix variables * Try push metadat files * Try hardcode * Try again * Update variables
Description of Change
When moving to the new dnceng builds we stopped to run the api scan , this adds it back since the 1ES templates don t support it yet. Other sdl tools work fine .
This pull request introduces a new pipeline stage for API scanning and integrates it into the existing build pipeline. The changes primarily focus on adding the
APIScanstage, configuring its parameters, and ensuring the necessary artifacts are prepared and consumed. Below are the most significant changes grouped by theme:Addition of the
APIScanStage:stage-api-scan.ymltemplate to define theAPIScanstage. This includes parameters for configuration (e.g.,AppId,TenantId,ServiceConnectionId) and steps to run theAPIScantask, publish analysis logs, and allow pre/post custom steps. (eng/pipelines/arcade/stage-api-scan.yml)Integration with Existing Pipelines:
APIScanstage into the internal pipeline by extending theazure-pipelines-internal.ymlfile. TheAPIScanstage is configured to depend on thePackstage and uses the appropriate VM pool. (eng/pipelines/azure-pipelines-internal.yml)Artifact Preparation for
APIScan:stage-pack.ymlfile to prepare and output theAPIScanFilesartifact, which includes assemblies required for the API scan. This involves copying.dlland.pdbfiles to a temporary directory for use in theAPIScanstage. (eng/pipelines/arcade/stage-pack.yml) [1] [2]Cleanup of Deprecated Code:
stage-pack.ymlfile to improve readability and maintainability. (eng/pipelines/arcade/stage-pack.yml)