Skip to content

Commit

Permalink
[main] Update common Docker engineering infrastructure with latest (#677
Browse files Browse the repository at this point in the history
)

Update common Docker engineering infrastructure with latest
  • Loading branch information
dotnet-docker-bot authored Aug 24, 2022
1 parent e04ec52 commit b4fb154
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions eng/common/templates/jobs/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,20 @@ jobs:
- powershell: |
$images = "$(BuildImages.builtImages)"
if (-not $images) { return 0 }
$taskDir = $(Get-ChildItem -Recurse -Directory -Filter "ManifestGeneratorTask*" -Path '$(Agent.WorkFolder)').FullName
# There can be leftover versions of the task left on the agent if it's not fresh. So find the latest version.
$taskDir = $(Get-ChildItem -Recurse -Directory -Filter "ManifestGeneratorTask*" -Path '$(Agent.WorkFolder)')[-1].FullName
$manifestToolDllPath = $(Get-ChildItem -Recurse -File -Filter "Microsoft.ManifestTool.dll" -Path $taskDir).FullName
$dotnetDir = $(Get-ChildItem -Recurse -Directory -Filter "*dotnet-*" -Path "$(Agent.ToolsDirectory)").FullName
# If the manifest tool installed its own version of .NET use that; otherwise it's reusing an existing install of .NET
# Check whether the manifest task installed its own version of .NET.
# To be more robust, we'll handle varying implementations that it's had.
# First check for a dotnet folder in the task location
$dotnetDir = $(Get-ChildItem -Recurse -Directory -Filter "dotnet-*" -Path $taskDir).FullName
if (-not $dotnetDir) {
# If it's not there, check in the agent tools location
$dotnetDir = $(Get-ChildItem -Recurse -Directory -Filter "*dotnet-*" -Path "$(Agent.ToolsDirectory)").FullName
}
# If the manifest task installed its own version of .NET use that; otherwise it's reusing an existing install of .NET
# which is executable by default.
if ($dotnetDir) {
$dotnetPath = "$dotnetDir/dotnet"
Expand Down

0 comments on commit b4fb154

Please sign in to comment.