deemix-docker/.gitlab-ci.yml
Henning Bocklage f159189955 formatting
2020-06-05 23:27:28 +02:00

47 lines
1.1 KiB
YAML

image: docker:latest
services:
- docker:dind
stages:
- build
- post
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
build_arm64:
stage: build
tags:
- arm64
script:
- docker build --build-arg IMAGE_ARCH=$ARCH_ARM64 --pull -t $IMAGE:arm64v8 .
- docker push $IMAGE:arm64v8
build_arm32v7:
stage: build
tags:
- armhf
script:
- docker build --build-arg IMAGE_ARCH=$ARCH_ARM32 --pull -t $IMAGE:armhf .
- docker push $IMAGE:armhf
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:
- docker manifest create $IMAGE $IMAGE:amd64 $IMAGE:armhf $IMAGE:arm64v8
- docker manifest annotate $IMAGE $IMAGE:armhf --os linux --arch armhf
- docker manifest annotate $IMAGE $IMAGE:arm64v8 --os linux --arch arm64
- docker manifest push $IMAGE