Commit 63038b8e authored by Ben Gamari's avatar Ben Gamari 🐢

Merge branch 'fix-it' into 'master'

Be more careful about quoting

See merge request ghc/ci-images!1
parents 863921a8 5fa883d4
......@@ -4,24 +4,89 @@ services:
- docker:dind
variables:
CONTAINER_IMAGE_BASE: registry.gitlab.haskell.org/$CI_PROJECT_NAME
CONTAINER_IMAGE_BASE: registry.gitlab.haskell.org/$CI_PROJECT_PATH
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.haskell.org
build:
.build:
stage: build
script:
- |
CONTAINER_IMAGE="$CONTAINER_IMAGE_BASE/$IMAGE"
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.haskell.org
docker pull $CONTAINER_IMAGE:latest || true
docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest $IMAGE
docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
docker push $CONTAINER_IMAGE:latest
build-linters:
extends: .build
variables:
IMAGE: linters
tags:
- docker
script:
- 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
- x86_64-linux
build-aarch64-linux-deb9:
extends: .build
variables:
IMAGE: aarch64-linux-deb9
tags:
- docker
- aarch64-linux
build-i386-linux-deb8:
extends: .build
variables:
IMAGE: i386-linux-deb8
tags:
- docker
- x86_64-linux
build-i386-linux-deb9:
extends: .build
variables:
IMAGE: i386-linux-deb9
tags:
- docker
- x86_64-linux
build-x86_64-freebsd:
extends: .build
variables:
IMAGE: x86_64-freebsd
tags:
- docker
- x86_64-linux
build-x86_64-linux-centos7:
extends: .build
variables:
IMAGE: x86_64-linux-centos7
tags:
- docker
- x86_64-linux
build-x86_64-linux-deb8:
extends: .build
variables:
IMAGE: x86_64-linux-deb8
tags:
- docker
- x86_64-linux
build-x86_64-linux-deb9:
extends: .build
variables:
IMAGE: x86_64-linux-deb9
tags:
- docker
- x86_64-linux
build-x86_64-linux-fedora27:
extends: .build
variables:
IMAGE: x86_64-linux-fedora27
tags:
- docker
- x86_64-linux
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