From 9e165282c0b85922f0ad495029937c568b6c73db Mon Sep 17 00:00:00 2001 From: Jamie Vangeysel <32323785+JamieVangeysel@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:52:47 +0100 Subject: [PATCH] add test build script --- build-test.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 build-test.sh diff --git a/build-test.sh b/build-test.sh new file mode 100755 index 0000000..a5258d6 --- /dev/null +++ b/build-test.sh @@ -0,0 +1,19 @@ +#!/bin/bash +docker_tag="test" +docker_reg="groupclaes" +PACKAGE_VERSION=$(cat package.json \ + | grep version \ + | head -1 \ + | awk -F: '{ print $2 }' \ + | sed 's/[",]//g' \ + | tr -d '[[:space:]]') +PACKAGE_NAME=$(cat package.json \ + | grep name \ + | head -1 \ + | awk -F: '{ print $2 }' \ + | sed 's/[",]//g' \ + | tr -d '[[:space:]]') + +echo "building docker images ${docker_reg}/${PACKAGE_NAME}:${docker_tag}" + +docker buildx build --platform=linux/amd64 -t "${docker_reg}/${PACKAGE_NAME}:${docker_tag}" -f Dockerfile --sbom=true --provenance=true --push . \ No newline at end of file