-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.gitlab-ci.yml
24 lines (19 loc) · 968 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
image: docker:stable
services:
- docker:dind
variables:
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH
DOCKER_DRIVER: overlay2
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
- docker run --rm --privileged multiarch/qemu-user-static:register || true
build-arm:
stage: build
script:
- docker pull $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG || true
- docker build -f Dockerfile.ARM32V6 --cache-from $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG --tag $CONTAINER_IMAGE:$CI_BUILD_REF --tag $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG .
- test -n "$CI_BUILD_TAG" && docker tag $CONTAINER_IMAGE:$CI_BUILD_REF $CONTAINER_IMAGE:ARM32V6-$CI_BUILD_TAG || true
- docker push $CONTAINER_IMAGE:$CI_BUILD_REF
- docker push $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG
- test -n "$CI_BUILD_TAG" && docker push $CONTAINER_IMAGE:ARM32V6-$CI_BUILD_TAG || true