Skip to content

Commit 1176144

Browse files
authored
create a docker manifest for CI builds
1 parent b865382 commit 1176144

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Build.Docker.ps1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ function Publish-DockerImage($arch)
5050
$ErrorActionPreference = "Stop"
5151
}
5252

53+
function Publish-DockerManifest($archs)
54+
{
55+
$images = ""
56+
foreach ($arch in $archs) {
57+
$images += "$image-ci:$version-$($arch.rid) "
58+
}
59+
60+
invoke-expression "docker manifest create $image-ci:$version $images"
61+
if ($LASTEXITCODE) { exit 4 }
62+
63+
docker manifest push $image-ci:$version
64+
if ($LASTEXITCODE) { exit 4 }
65+
}
66+
5367
Push-Location $PSScriptRoot
5468

5569
Execute-Tests
@@ -62,4 +76,8 @@ foreach ($arch in $archs) {
6276
}
6377
}
6478

79+
if ($IsPublishedBuild) {
80+
Publish-DockerManifest($archs)
81+
}
82+
6583
Pop-Location

0 commit comments

Comments
 (0)