Move ImageBuilder tests to pre-build validation#2016
Open
lbussell wants to merge 1 commit intodotnet:mainfrom
Open
Move ImageBuilder tests to pre-build validation#2016lbussell wants to merge 1 commit intodotnet:mainfrom
lbussell wants to merge 1 commit intodotnet:mainfrom
Conversation
ImageBuilder tests are pure dotnet test runs that don't need built container images. Move them from the Test stage (multi-platform matrix) to PreBuildValidation (single Linux AMD64 job in the Build stage) by swapping testScriptPath and preBuildTestScriptPath. This skips the entire Test stage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mthalman
reviewed
Mar 13, 2026
Member
mthalman
left a comment
There was a problem hiding this comment.
By moving this to pre-build, there's no exercising of the Test stage in the docker-tools pipelines. Given that this repo is the definition of the pipeline infrastructure, it'd be good to continue to ensure that all the stages are working properly.
Member
Author
We should exercise it in the eng-validation pipeline instead. Looks like that isn't happening currently. I will take a look at enabling that in this PR. |
Member
Author
|
@mthalman it is running:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ImageBuilder only has unit tests -- it does not have any tests that inspect or run the ImageBuilder container image produced by the build pipeline. The test script simply runs
dotnet testand does not do anything platform specific. Therefore, we are wasting pipeline time by running these tests in parallel on multiple build agents.This PR moves ImageBuilder's tests from distributed Test jobs to the PreBuildValidation job, so that the tests run only once, and before spinning up extra build agents to build the ImageBuilder container images. The entire test stage will also be skipped, including Test matrix generation and spinning up build agents for 4 multiple platforms.
This reduces CPU/Machine time spent in the ImageBuilder build pipeline by 22%, from 1h31m to 1h11m (comparing build#2924511 and build#2925370 (This PR)). Wall clock time is difficult to compare directly due to build agent queue times, but the pipeline will now only use 11 separate jobs instead of 16 jobs, which means the pipeline will be less affected by build agent wait times.
Related: