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

  1. #!/bin/sh
  2. #
  3. # Script to build images
  4. #
  5. # break on error
  6. set -e
  7. set -x
  8. set -a
  9. DATE=`date +%Y.%m.%d`
  10. COMPOSE='docker-compose -f docker-compose-build.yml run docker19'
  11. . ./vars.env
  12. ## warm up cache for CI
  13. docker pull ${IMAGE} || true
  14. ${COMPOSE} build --pull=true --build-arg ARG_DEVPI_VERSION=${DEVPI_VERSION} -t ${IMAGE}:latest /data
  15. ${COMPOSE} inspect ${IMAGE}:latest
  16. ${COMPOSE} tag -f ${IMAGE}:latest ${IMAGE}:latest-${DATE}
  17. ${COMPOSE} tag -f ${IMAGE}:latest ${IMAGE}:${DEVPI_VERSION}
  18. ${COMPOSE} push ${IMAGE}:latest
  19. ${COMPOSE} push ${IMAGE}:latest-${DATE}
  20. ${COMPOSE} push ${IMAGE}:${DEVPI_VERSION}