From 8c883dff0813d23c938845c0d2cf36e92dc8f2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Ahlba=CC=88ck?= Date: Fri, 21 Jan 2022 08:10:38 +0100 Subject: [PATCH] wip --- custom-build.sh | 8 ++++++++ packages/tests/custom-build.sh | 5 +++++ packages/tests/skaffold.yaml | 10 ++++++++++ packages/tests/tests/zonemaster/custom-build.sh | 5 +++++ skaffold.yaml | 14 +++++++------- 5 files changed, 35 insertions(+), 7 deletions(-) create mode 100755 custom-build.sh create mode 100755 packages/tests/custom-build.sh create mode 100755 packages/tests/tests/zonemaster/custom-build.sh diff --git a/custom-build.sh b/custom-build.sh new file mode 100755 index 0000000..95760d9 --- /dev/null +++ b/custom-build.sh @@ -0,0 +1,8 @@ +DOCKERFILE=$1 + +docker buildx build \ + --platform linux/amd64 \ + --tag $IMAGE \ + --push \ + --file $DOCKERFILE \ + $BUILD_CONTEXT diff --git a/packages/tests/custom-build.sh b/packages/tests/custom-build.sh new file mode 100755 index 0000000..76ab519 --- /dev/null +++ b/packages/tests/custom-build.sh @@ -0,0 +1,5 @@ +docker buildx build \ + --platform linux/amd64 \ + --tag $IMAGE \ + --push \ + $BUILD_CONTEXT diff --git a/packages/tests/skaffold.yaml b/packages/tests/skaffold.yaml index 83dc3c5..c6c2428 100644 --- a/packages/tests/skaffold.yaml +++ b/packages/tests/skaffold.yaml @@ -10,11 +10,21 @@ build: artifacts: - image: netnodse/dns-zonemaster context: tests/zonemaster/ + custom: + buildCommand: ../../custom-build.sh - image: netnodse/ipv6-dns context: tests/ipv6-dns/ + custom: + buildCommand: ../../custom-build.sh - image: netnodse/https-reachable context: tests/https/ + custom: + buildCommand: ../../custom-build.sh - image: netnodse/hsts context: tests/hsts/ + custom: + buildCommand: ../../custom-build.sh - image: netnodse/ipv6-connectivity context: tests/ipv6-connectivity + custom: + buildCommand: ../../custom-build.sh diff --git a/packages/tests/tests/zonemaster/custom-build.sh b/packages/tests/tests/zonemaster/custom-build.sh new file mode 100755 index 0000000..76ab519 --- /dev/null +++ b/packages/tests/tests/zonemaster/custom-build.sh @@ -0,0 +1,5 @@ +docker buildx build \ + --platform linux/amd64 \ + --tag $IMAGE \ + --push \ + $BUILD_CONTEXT diff --git a/skaffold.yaml b/skaffold.yaml index e0d30ab..6712bde 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -19,21 +19,21 @@ deploy: namespace: dev --- # Deploy services after -apiVersion: skaffold/v2beta13 +apiVersion: skaffold/v2beta26 kind: Config metadata: name: robust-tjanst build: artifacts: - image: netnodse/robust-web - docker: - dockerfile: Dockerfile.web + custom: + buildCommand: ./custom-build.sh Dockerfile.web - image: netnodse/robust-admin - docker: - dockerfile: Dockerfile.admin + custom: + buildCommand: ./custom-build.sh Dockerfile.admin - image: netnodse/robust-test-runner - docker: - dockerfile: Dockerfile.tests + custom: + buildCommand: ./custom-build.sh Dockerfile.tests deploy: kubectl: defaultNamespace: dev