You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
606 B

#!/bin/sh
#
# Script to build images
#
# break on error
set -e
set -x
set -a
DATE=`date +%Y.%m.%d`
COMPOSE='docker-compose -f docker-compose-build.yml run docker19'
. ./vars.env
## warm up cache for CI
docker pull ${IMAGE} || true
${COMPOSE} build --pull=true --build-arg ARG_DEVPI_VERSION=${DEVPI_VERSION} -t ${IMAGE}:latest /data
${COMPOSE} inspect ${IMAGE}:latest
${COMPOSE} tag -f ${IMAGE}:latest ${IMAGE}:latest-${DATE}
${COMPOSE} tag -f ${IMAGE}:latest ${IMAGE}:${DEVPI_VERSION}
${COMPOSE} push ${IMAGE}:latest
${COMPOSE} push ${IMAGE}:latest-${DATE}
${COMPOSE} push ${IMAGE}:${DEVPI_VERSION}