Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into updatecli_4ef8049ef9f0373a94b0e3c2f88ab1e9…
Browse files Browse the repository at this point in the history
…8fe34d9a1e7b1d2b5816d7420f71c3e3
  • Loading branch information
dduportal authored Jul 31, 2023
2 parents e208b74 + a1d2112 commit d369006
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
context: ./
dockerfile: ./windows/nanoserver/Dockerfile
args:
JAVA_MAJOR_VERSION: 11
version: ${PARENT_IMAGE_VERSION}
WINDOWS_VERSION_TAG: ${NANOSERVER_VERSION_TAG}
jdk17-nanoserver:
Expand All @@ -13,6 +14,7 @@ services:
context: ./
dockerfile: ./windows/nanoserver/Dockerfile
args:
JAVA_MAJOR_VERSION: 17
version: ${PARENT_IMAGE_VERSION}
WINDOWS_VERSION_TAG: ${NANOSERVER_VERSION_TAG}
jdk11-windowsservercore:
Expand All @@ -21,6 +23,7 @@ services:
context: ./
dockerfile: ./windows/windowsservercore/Dockerfile
args:
JAVA_MAJOR_VERSION: 11
version: ${PARENT_IMAGE_VERSION}
WINDOWS_VERSION_TAG: ${WINDOWS_VERSION_TAG}
jdk17-windowsservercore:
Expand All @@ -29,5 +32,6 @@ services:
context: ./
dockerfile: ./windows/windowsservercore/Dockerfile
args:
JAVA_MAJOR_VERSION: 17
version: ${PARENT_IMAGE_VERSION}
WINDOWS_VERSION_TAG: ${WINDOWS_VERSION_TAG}
18 changes: 9 additions & 9 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Param(
[Parameter(Position=1)]
[String] $Target = "build",
[String] $Build = '',
[String] $VersionTag = 'NEXT_TAG_VERSION',
[String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-5',
[String] $BuildNumber = '1',
[switch] $PushVersions = $false
)

Expand Down Expand Up @@ -84,8 +84,8 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object {
$windowsVersion = $items[2]

$baseImage = "${windowsType}-${windowsVersion}"
$versionTag = "${ParentImageVersion}-${BuildNumber}-${image}"
$tags = @( $image, $versionTag )
$completeVersionTag = "${VersionTag}-${image}"
$tags = @( $image, $completeVersionTag )
if($jdkMajorVersion -eq "$defaultJdk") {
$tags += $baseImage
}
Expand Down Expand Up @@ -215,15 +215,15 @@ if($target -eq "publish") {
}

if($PushVersions) {
$buildTag = "$ParentImageVersion-$BuildNumber-$tag"
$buildTag = "$VersionTag-$tag"
if($tag -eq 'latest') {
$buildTag = "$ParentImageVersion-$BuildNumber"
$buildTag = "$VersionTag"
}
Publish-Image "$Build" "${Organization}/${Repository}:${buildTag}"
Publish-Image "$b" "${Organization}/${Repository}:${buildTag}"
if($lastExitCode -ne 0) {
$publishFailed = 1
}
}
}
}
} else {
foreach($b in $builds.Keys) {
Expand All @@ -234,9 +234,9 @@ if($target -eq "publish") {
}

if($PushVersions) {
$buildTag = "$ParentImageVersion-$BuildNumber-$tag"
$buildTag = "$VersionTag-$tag"
if($tag -eq 'latest') {
$buildTag = "$ParentImageVersion-$BuildNumber"
$buildTag = "$VersionTag"
}
Publish-Image "$b" "${Organization}/${Repository}:${buildTag}"
if($lastExitCode -ne 0) {
Expand Down

0 comments on commit d369006

Please sign in to comment.