-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: build multiple windows images
Signed-off-by: Dominik Rosiek <[email protected]>
- Loading branch information
Dominik Rosiek
committed
Feb 29, 2024
1 parent
5c6b91c
commit 59e08f6
Showing
6 changed files
with
56 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,10 @@ if [[ -z "${REPO_URL}" ]]; then | |
exit 1 | ||
fi | ||
|
||
if [[ ! -z "${BASE_VERSION}" ]]; then | ||
BASE_VERSION="-${BASE_VERSION}" | ||
fi | ||
|
||
if [[ -z "${PLATFORM}" ]]; then | ||
echo "No PLATFORM passed in" | ||
exit 1 | ||
|
@@ -80,6 +84,20 @@ function build_push() { | |
PLATFORM="windows/amd64" | ||
;; | ||
|
||
"windows/amd64/ltsc2022"|"windows_amd64_ltsc2022") | ||
readonly BUILD_ARCH="amd64" | ||
readonly BUILD_PLATFORM="windows" | ||
readonly BASE_VERSION="-ltsc2022" | ||
PLATFORM="windows/amd64" | ||
;; | ||
|
||
"windows/amd64/ltsc2019"|"windows_amd64_ltsc2019") | ||
readonly BUILD_ARCH="amd64" | ||
readonly BUILD_PLATFORM="windows" | ||
readonly BASE_VERSION="-ltsc2019" | ||
PLATFORM="windows/amd64" | ||
;; | ||
|
||
# Can't really enable it for now because: | ||
# !shopify/[email protected]/gssapi_kerberos.go:62:10: constant 4294967295 overflows int | ||
# ref: https://github.com/SumoLogic/sumologic-otel-collector/runs/2805247906 | ||
|
@@ -97,9 +115,9 @@ function build_push() { | |
esac | ||
|
||
local TAG | ||
readonly TAG="${REPO_URL}:${BUILD_TAG}${BUILD_TYPE_SUFFIX}-${BUILD_PLATFORM}-${BUILD_ARCH}" | ||
readonly TAG="${REPO_URL}:${BUILD_TAG}${BUILD_TYPE_SUFFIX}-${BUILD_PLATFORM}-${BUILD_ARCH}${BASE_VERSION}" | ||
local LATEST_TAG | ||
readonly LATEST_TAG="${REPO_URL}:latest${BUILD_TYPE_SUFFIX}-${BUILD_PLATFORM}-${BUILD_ARCH}" | ||
readonly LATEST_TAG="${REPO_URL}:latest${BUILD_TYPE_SUFFIX}-${BUILD_PLATFORM}-${BUILD_ARCH}${BASE_VERSION}" | ||
|
||
# --provenance=false for docker buildx ensures that we create manifest instead of manifest list | ||
if [[ "${PUSH}" == true ]]; then | ||
|
@@ -109,6 +127,7 @@ function build_push() { | |
docker build \ | ||
--file "${DOCKERFILE}" \ | ||
--build-arg BUILD_TAG="${BUILD_TAG}" \ | ||
--build-arg BASE_VERSION="${BASE_VERSION}" \ | ||
--build-arg BUILDKIT_INLINE_CACHE=1 \ | ||
--platform="${PLATFORM}" \ | ||
--tag "${LATEST_TAG}" \ | ||
|
@@ -123,6 +142,7 @@ function build_push() { | |
--push \ | ||
--file "${DOCKERFILE}" \ | ||
--build-arg BUILD_TAG="${BUILD_TAG}" \ | ||
--build-arg BASE_VERSION="${BASE_VERSION}" \ | ||
--build-arg BUILDKIT_INLINE_CACHE=1 \ | ||
--platform="${PLATFORM}" \ | ||
--tag "${LATEST_TAG}" \ | ||
|
@@ -136,6 +156,7 @@ function build_push() { | |
docker build \ | ||
--file "${DOCKERFILE}" \ | ||
--build-arg BUILD_TAG="latest${BUILD_TYPE_SUFFIX}" \ | ||
--build-arg BASE_VERSION="${BASE_VERSION}" \ | ||
--build-arg BUILDKIT_INLINE_CACHE=1 \ | ||
--platform="${PLATFORM}" \ | ||
--tag "${REPO_URL}:latest${BUILD_TYPE_SUFFIX}" \ | ||
|
@@ -146,6 +167,7 @@ function build_push() { | |
docker buildx build \ | ||
--file "${DOCKERFILE}" \ | ||
--build-arg BUILD_TAG="latest${BUILD_TYPE_SUFFIX}" \ | ||
--build-arg BASE_VERSION="${BASE_VERSION}" \ | ||
--build-arg BUILDKIT_INLINE_CACHE=1 \ | ||
--platform="${PLATFORM}" \ | ||
--load \ | ||
|
This file contains 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