-
Notifications
You must be signed in to change notification settings - Fork 60
Add "bootstrap" option to ImageBuilder unofficial pipeline #1947
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
base: main
Are you sure you want to change the base?
Conversation
Use Build.Repository.LocalPath instead of relative paths so the bootstrap template works correctly when versionsRepoRef is set, which triggers multi-repo checkout and changes the directory structure.
In multi-repo checkout scenarios, Build.Repository.LocalPath points to the parent directory containing both repos. Add repoRoot and versionsRepoRoot variables that resolve to the correct paths in both single and multi-repo checkout modes. - repoRoot: Always points to the source repo root - versionsRepoRoot: Points to versions repo in multi-repo mode Remove duplicate versionsRepoRoot calculation from publish.yml since it's now set centrally in init-matrix-build-publish.yml.
| dockerClientOS: null | ||
| buildJobTimeout: 60 | ||
| commonInitStepsForMatrixAndBuild: [] | ||
| customInitSteps: [] |
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.
Since we already have customInitSteps, can we make use of that instead of introducing customImageBuilderSetupSteps? In that case customInitSteps could be defaulted to just call init-docker.yml.
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.
Yeah. This would be a breaking change, but after doing some searching, I don't see any usage of customInitSteps by consuming repos. So that sounds reasonable to me.
Background: Testing ImageBuilder changes end-to-end (code + pipelines) requires building and pushing an image to a registry and manually updating the ImageBuilder code reference for every code change. This limits how quickly you can iterate on larger ImageBuilder changes.
This PR: adds a bootstrapImageBuilder parameter to the imagebuilder-unofficial pipeline. When enabled, ImageBuilder is built from source at the start of every job. This enables validating ImageBuilder source changes and pipeline template changes together in a single pipeline run.
Linux builds the container directly using
docker build, tags the image, and overrides the imagebuilder image variable so that it's used for later steps. Windows builds directly using .NET, and puts the output in the place that subsequent steps expect. In this sense, it's different from the pipeline build, since it's not built using ImageBuilder. That's why it's a "bootstrap". I determined that this would be OK because the pipeline itself will then proceed to validate that build ImageBuilder can build ImageBuilder.Other options I considered:
Other changes:
init-docker-linuxandinit-docker-windowstemplates into one.Testing: