2020-06-05 20:49:21 +00:00
|
|
|
image: docker:latest
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
2020-06-05 21:23:47 +00:00
|
|
|
- post
|
2020-06-05 20:49:21 +00:00
|
|
|
|
|
|
|
variables:
|
|
|
|
IMAGE: registry.gitlab.com/bockiii/deemix-docker
|
|
|
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
|
|
|
ARCH_AMD: python3
|
|
|
|
ARCH_ARM32: python3.armhf
|
|
|
|
ARCH_ARM64: python3.arm64
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
|
2020-06-05 21:23:47 +00:00
|
|
|
build_arm64:
|
|
|
|
stage: build
|
2020-06-05 21:27:28 +00:00
|
|
|
tags:
|
|
|
|
- arm64
|
2020-06-05 21:23:47 +00:00
|
|
|
script:
|
|
|
|
- docker build --build-arg IMAGE_ARCH=$ARCH_ARM64 --pull -t $IMAGE:arm64v8 .
|
|
|
|
- docker push $IMAGE:arm64v8
|
2020-06-05 21:12:07 +00:00
|
|
|
|
2020-06-05 21:23:47 +00:00
|
|
|
build_arm32v7:
|
2020-06-05 20:49:21 +00:00
|
|
|
stage: build
|
2020-06-05 21:27:28 +00:00
|
|
|
tags:
|
|
|
|
- armhf
|
2020-06-05 20:49:21 +00:00
|
|
|
script:
|
2020-06-05 21:27:28 +00:00
|
|
|
- docker build --build-arg IMAGE_ARCH=$ARCH_ARM32 --pull -t $IMAGE:armhf .
|
|
|
|
- docker push $IMAGE:armhf
|
2020-06-05 21:23:47 +00:00
|
|
|
|
|
|
|
build_amd64:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- docker build --build-arg IMAGE_ARCH=$ARCH_AMD --pull -t $IMAGE:amd64 .
|
|
|
|
- docker push $IMAGE:amd64
|
|
|
|
|
|
|
|
annotate:
|
|
|
|
stage: post
|
|
|
|
script:
|
2020-06-05 21:27:28 +00:00
|
|
|
- docker manifest create $IMAGE $IMAGE:amd64 $IMAGE:armhf $IMAGE:arm64v8
|
|
|
|
- docker manifest annotate $IMAGE $IMAGE:armhf --os linux --arch armhf
|
2020-06-05 20:49:21 +00:00
|
|
|
- docker manifest annotate $IMAGE $IMAGE:arm64v8 --os linux --arch arm64
|
|
|
|
- docker manifest push $IMAGE
|