Commit 4625176b authored by Matthew Pickering's avatar Matthew Pickering

Do all images in directory

parent abb8830e
......@@ -4,7 +4,7 @@ services:
- docker:dind
variables:
CONTAINER_IMAGE_BASE: registry.gitlab.haskell.org/ghc/ghc
CONTAINER_IMAGE_BASE: registry.gitlab.haskell.org/$CI_PROJECT_NAME
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
......@@ -14,9 +14,12 @@ before_script:
build:
stage: build
script:
- export CONTAINER_IMAGE=$CONTAINER_IMAGE_BASE/linters
- docker pull $CONTAINER_IMAGE:latest || true
- docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest linters/
- docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
- docker push $CONTAINER_IMAGE:latest
- for dir in $(ls -d */)
do
CONTAINER_IMAGE=$CONTAINER_IMAGE_BASE/${dir::-1}
docker pull $CONTAINER_IMAGE:latest || true
docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest linters/
docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
docker push $CONTAINER_IMAGE:latest
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment