diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d28842..89cc314 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,12 +5,12 @@ stages: - build variables: - VERSION: dind - CACHETAG: build + VERSION: dind-${ARCH} + CACHETAG: build-${ARCH} DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375 services: -- ${CI_REGISTRY}/leenooks/ci-docker:dind +- docker:dind before_script: - docker info @@ -27,7 +27,9 @@ test: only: - debug -build: +x86_64:build: + variables: + ARCH: x86_64 stage: build script: - if [ -f init ]; then chmod 500 init; fi @@ -37,5 +39,22 @@ build: - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} tags: - docker + - x86_64 + only: + - master + +armv7l:build: + variables: + ARCH: armv7l + stage: build + script: + - if [ -f init ]; then chmod 500 init; fi + - docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true + - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . + - docker push ${CI_REGISTRY_IMAGE}:${VERSION} + - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} + tags: + - docker + - armv7l only: - master