Commit 779c918a authored by Kevin Daudt's avatar Kevin Daudt

docker-image.yml: add template for docker images

parent 6db46940
Pipeline #33 canceled with stage
image: alpinelinux/docker-cli:latest
stages:
- build
- upload
- manifest
.build:
stage: build
script:
- docker build -t alinelinux/$CI_PROJECT_NAME:latest-$ARCH .
build-s390x:
extends: .build
variables:
ARCH: s390x
tags:
- docker-alpine
- s390x
.upload:
stage: upload
only:
- master
script:
- docker tag :latest-$ARCH alpinelinux/$CI_RPOJECT_NAME:latest-$ARCH
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker push alpinelinux/$CI_PROJECT_NAME:latest-$ARCH
upload-s390x:
extends: .upload
variables:
ARCH: s390x
tags:
- docker-alpine
- s390x
create-manifest:
stage: manifest
variables:
DOCKER_CLI_EXPERIMENTAL: enabled
only:
- master
tags:
- docker-alpine
- s390x
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker manifest create --amend alpinelinux/$CI_PROJECT_NAME:latest alpinelinux/$CI_PROJECT_NAME:latest-s390x
- docker manifest push --purge alpinelinux/$CI_PROJECT_NAME:latest
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment