Skip to content

Conversation

@lbussell
Copy link
Member

@lbussell lbussell commented Dec 19, 2025

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:

@lbussell lbussell marked this pull request as ready for review December 22, 2025 21:04
@lbussell lbussell requested a review from a team as a code owner December 22, 2025 21:04
lbussell and others added 2 commits December 22, 2025 14:43
* 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 <36081148+lbussell@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
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 }})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this has the same implementation as init-docker-linux.yml. This can be factored out into a step template file instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b6fc71a, testing in build#2872503

lbussell added a commit that referenced this pull request Jan 5, 2026
#1894 was mistakenly merged even though it had a "do
not merge" label.

The ImageBuilder update actually requires
#1900 to be completed first.
@lbussell lbussell merged commit e62aea1 into dotnet:main Jan 6, 2026
22 checks passed
@lbussell lbussell deleted the update-imagebuilder branch January 6, 2026 18:11
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.
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 <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants