mirror of
https://gitlab.com/openlp/runners.git
synced 2024-09-01 11:43:45 +00:00
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
|
image: docker:stable
|
||
|
|
||
|
services:
|
||
|
- docker:dind
|
||
|
|
||
|
variables:
|
||
|
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH
|
||
|
DOCKER_HOST: tcp://docker:2375
|
||
|
DOCKER_DRIVER: overlay2
|
||
|
|
||
|
before_script:
|
||
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
|
||
|
|
||
|
build-debian:
|
||
|
stage: build
|
||
|
script:
|
||
|
- docker pull $CONTAINER_IMAGE:debian || true
|
||
|
- docker build --cache-from $CONTAINER_IMAGE:debian --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:debian -f Dockerfile.debian .
|
||
|
- docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
|
||
|
- docker push $CONTAINER_IMAGE:debian
|
||
|
|
||
|
build-ubuntu:
|
||
|
stage: build
|
||
|
script:
|
||
|
- docker pull $CONTAINER_IMAGE:ubuntu || true
|
||
|
- docker build --cache-from $CONTAINER_IMAGE:ubuntu --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:ubuntu -f Dockerfile.ubuntu .
|
||
|
- docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
|
||
|
- docker push $CONTAINER_IMAGE:ubuntu
|
||
|
|
||
|
build-fedora:
|
||
|
stage: build
|
||
|
script:
|
||
|
- docker pull $CONTAINER_IMAGE:fedora || true
|
||
|
- docker build --cache-from $CONTAINER_IMAGE:fedora --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:fedora -f Dockerfile.fedora .
|
||
|
- docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
|
||
|
- docker push $CONTAINER_IMAGE:fedora
|