deemix-docker/.gitlab-ci.yml

32 lines
1.2 KiB
YAML
Raw Normal View History

2020-06-05 20:49:21 +00:00
image: docker:latest
services:
- docker:dind
stages:
- build
variables:
IMAGE: registry.gitlab.com/bockiii/deemix-docker
DOCKER_CLI_EXPERIMENTAL: enabled
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- apk add --update curl && rm -rf /var/cache/apk/*
2020-06-05 20:49:21 +00:00
2020-06-05 21:45:21 +00:00
build:
2020-06-05 21:23:47 +00:00
stage: build
2020-06-05 20:49:21 +00:00
script:
2020-06-05 21:45:21 +00:00
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- docker build --pull -f Dockerfile.arm64v8 -t $IMAGE:arm64v8 .
2020-06-05 21:45:21 +00:00
- docker push $IMAGE:arm64v8
- docker build --pull -f Dockerfile.arm32v7 -t $IMAGE:arm32v7 .
- docker push $IMAGE:arm32v7
2020-06-05 21:45:21 +00:00
- docker build --pull -t $IMAGE:amd64 .
2020-06-05 21:23:47 +00:00
- docker push $IMAGE:amd64
- set -e
- HOST_ARCH=$(uname -m)
- HOST_ARCH_ALIAS=$([[ "${HOST_ARCH}" == "x86_64" ]] && echo "amd64" || echo "${HOST_ARCH}")
- MANIFEST_TOOL_VERSION=$(curl -s https://api.github.com/repos/estesp/manifest-tool/releases/latest | grep 'tag_name' | cut -d\" -f4)
- curl -L https://github.com/estesp/manifest-tool/releases/download/$MANIFEST_TOOL_VERSION/manifest-tool-linux-$HOST_ARCH_ALIAS -o manifest-tool
- chmod +x manifest-tool
- ./manifest-tool push from-spec manifest.yaml