2021-03-18 15:05:43 +03:00
|
|
|
#!/bin/bash
|
2022-08-09 13:23:12 +03:00
|
|
|
set -eo pipefail
|
2021-03-18 15:05:43 +03:00
|
|
|
|
2022-01-14 16:28:48 +03:00
|
|
|
# enables building the test-deployment container with the same script
|
|
|
|
# defaults to packages for minimal intervention in the ci config
|
2022-01-13 21:44:25 +03:00
|
|
|
FOLDER="${FOLDER:-packages}"
|
|
|
|
|
2022-08-18 11:51:10 +03:00
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
# shellcheck disable=SC1090,SC1091
|
|
|
|
source "${SCRIPT_DIR}/common.sh"
|
2022-01-13 21:51:56 +03:00
|
|
|
|
2022-08-18 11:51:10 +03:00
|
|
|
echo "Building image: ${DOCKER_IMAGE_TAG}:${IMAGE_VERSION_TAG}"
|
2021-03-18 15:05:43 +03:00
|
|
|
|
2022-07-29 13:00:29 +03:00
|
|
|
export DOCKER_BUILDKIT=1
|
|
|
|
|
2022-08-18 11:51:10 +03:00
|
|
|
docker build --build-arg SPECKLE_SERVER_VERSION="${IMAGE_VERSION_TAG}" --tag "${DOCKER_IMAGE_TAG}:${IMAGE_VERSION_TAG}" --file "${FOLDER}/${SPECKLE_SERVER_PACKAGE}/Dockerfile" .
|
2021-03-18 15:05:43 +03:00
|
|
|
|
2022-08-18 11:51:10 +03:00
|
|
|
echo " Saving image: ${DOCKER_FILE_NAME}"
|
|
|
|
docker save --output "/tmp/ci/workspace/${DOCKER_FILE_NAME}" "${DOCKER_IMAGE_TAG}:${IMAGE_VERSION_TAG}"
|