Repository navigation
Update ImageBuilder and update pipelines to use appsettings.json for configuration - #1900
Merged
Merged
Conversation
Pass publish config to init template
lbussell
marked this pull request as ready for review
December 22, 2025 21:04
* Initial plan * Condition output publish configuration step on not being a pull request The publish configuration contains Azure DevOps variable references that are only available when running internally. This change prevents failures in public CI by skipping the step during pull request builds. Co-authored-by: lbussell <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: lbussell <[email protected]>
mthalman
reviewed
Jan 5, 2026
Comment on lines
+42
to
+54
| - ${{ if and(parameters.publishConfig, ne(variables['Build.Reason'], 'PullRequest')) }}: | ||
| # .NET Microsoft.Extensions.Configuration reads appsettings.json from the working directory | ||
| # where ImageBuilder is run, not from the executable's directory. Place it in the repo root. | ||
| - powershell: |- | ||
| $appsettingsJsonContent = @" | ||
| { | ||
| "PublishConfiguration": ${{ convertToJson(parameters.publishConfig) }} | ||
| } | ||
| "@ | ||
| Set-Content -Path "appsettings.json" -Value $appsettingsJsonContent | ||
| Get-Content -Path "appsettings.json" | ||
| displayName: Output publish configuration | ||
| condition: and(succeeded(), ${{ parameters.condition }}) |
Member
There was a problem hiding this comment.
It looks like this has the same implementation as init-docker-linux.yml. This can be factored out into a step template file instead.
lbussell
added a commit
that referenced
this pull request
Jan 5, 2026
mthalman
reviewed
Jan 6, 2026
mthalman
approved these changes
Jan 6, 2026
lbussell
added a commit
that referenced
this pull request
Jan 7, 2026
…changes (#1915) #1900 did not update the check-base-image-updates pipeline to initialize appsettings.json, so it was failing authenticate when copying base images. In the process of fixing this, I discovered #1914. I had to work around it in this PR. I also moved the pipeline to the shared 1es.yml template and renamed it to have the correct `-official` suffix. Now it follows the patterns used by other pipelines.
This was referenced Jan 7, 2026
lbussell
added a commit
that referenced
this pull request
Jan 8, 2026
…tings.json (#1917) Ever since #1900 was merged, scheduled runs of the mirror-base-images-public pipeline have been failing with the error: `/eng/pipelines/templates/jobs/copy-base-images-public-mirror.yml (Line: 31, Col: 17): Unexpected parameter 'repoPrefix'`. The pipeline needed to be updated to use repoPrefix as part of the acr object in the publishConfig, instead of using a separate parameter. Other changes include: * Updated mirror-base-images-public pipeline to use the 1es.yml template instead of 1es-official.yml (part of #1892) * Renamed pipeline in azure devops: `dotnet-docker-tools-mirror-base-images-public` -> `dotnet-docker-tools-mirror-base-images-public-official` Test runs: - Dry run of copy base images pipeline: build#2874704 - Unofficial run of imagebuilder pipeline, to ensure that the shared copy-base-images logic is not adversely affected: build#2874735 --------- Co-authored-by: Copilot <[email protected]>
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.
This PR is a follow-up to #1880. It updates the pipelines to use appsettings.json to configure service connections instead of passing them as command line arguments.
It includes the ImageBuilder update from #1894. I am submitting this as a separate PR since I don't want automated builds to unexpectedly overwrite my progress.
Test runs:
build#2864259 - 5b86d60build#2864324 - 00c9607