mirror of
https://gitlab.com/openlp/runners.git
synced 2024-12-22 11:22:48 +00:00
102 lines
3.1 KiB
YAML
102 lines
3.1 KiB
YAML
image: docker:stable
|
|
|
|
services:
|
|
- docker:dind
|
|
|
|
variables:
|
|
IMAGE_BASE: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME
|
|
|
|
before_script:
|
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
|
|
build-debian:
|
|
stage: build
|
|
script:
|
|
- docker pull $IMAGE_BASE/debian || true
|
|
- docker build --cache-from $IMAGE_BASE/debian --tag $IMAGE_BASE/debian:$CI_COMMIT_SHA --tag $IMAGE_BASE/debian:latest -f Dockerfile.debian .
|
|
- docker push $IMAGE_BASE/debian:$CI_COMMIT_SHA
|
|
- docker push $IMAGE_BASE/debian:latest
|
|
only:
|
|
refs:
|
|
- master@openlp/runners
|
|
changes:
|
|
- Dockerfile.debian
|
|
|
|
|
|
build-ubuntu:
|
|
stage: build
|
|
script:
|
|
- docker pull $IMAGE_BASE/ubuntu || true
|
|
- docker build --cache-from $IMAGE_BASE/ubuntu --tag $IMAGE_BASE/ubuntu:$CI_COMMIT_SHA --tag $IMAGE_BASE/ubuntu:latest -f Dockerfile.ubuntu .
|
|
- docker push $IMAGE_BASE/ubuntu:$CI_COMMIT_SHA
|
|
- docker push $IMAGE_BASE/ubuntu:latest
|
|
only:
|
|
refs:
|
|
- master@openlp/runners
|
|
changes:
|
|
- Dockerfile.ubuntu
|
|
|
|
build-fedora:
|
|
stage: build
|
|
script:
|
|
- docker pull $IMAGE_BASE/fedora || true
|
|
- docker build --cache-from $IMAGE_BASE/fedora --tag $IMAGE_BASE/fedora:$CI_COMMIT_SHA --tag $IMAGE_BASE/fedora:latest -f Dockerfile.fedora .
|
|
- docker push $IMAGE_BASE/fedora:$CI_COMMIT_SHA
|
|
- docker push $IMAGE_BASE/fedora:latest
|
|
only:
|
|
refs:
|
|
- master@openlp/runners
|
|
changes:
|
|
- Dockerfile.fedora
|
|
|
|
build-arch:
|
|
stage: build
|
|
script:
|
|
- docker pull $IMAGE_BASE/arch || true
|
|
- docker build --cache-from $IMAGE_BASE/arch --tag $IMAGE_BASE/arch:$CI_COMMIT_SHA --tag $IMAGE_BASE/arch:latest -f Dockerfile.arch .
|
|
- docker push $IMAGE_BASE/arch:$CI_COMMIT_SHA
|
|
- docker push $IMAGE_BASE/arch:latest
|
|
only:
|
|
refs:
|
|
- master@openlp/runners
|
|
changes:
|
|
- Dockerfile.arch
|
|
|
|
build-angular:
|
|
stage: build
|
|
script:
|
|
- docker pull $IMAGE_BASE/angular || true
|
|
- docker build --cache-from $IMAGE_BASE/angular --tag $IMAGE_BASE/angular:$CI_COMMIT_SHA --tag $IMAGE_BASE/angular:latest -f Dockerfile.angular .
|
|
- docker push $IMAGE_BASE/angular:$CI_COMMIT_SHA
|
|
- docker push $IMAGE_BASE/angular:latest
|
|
only:
|
|
refs:
|
|
- master@openlp/runners
|
|
changes:
|
|
- Dockerfile.angular
|
|
|
|
build-documentation:
|
|
stage: build
|
|
script:
|
|
- docker pull $IMAGE_BASE/documentation || true
|
|
- docker build --cache-from $IMAGE_BASE/documentation --tag $IMAGE_BASE/documentation:$CI_COMMIT_SHA --tag $IMAGE_BASE/documentation:latest -f Dockerfile.documentation .
|
|
- docker push $IMAGE_BASE/documentation:$CI_COMMIT_SHA
|
|
- docker push $IMAGE_BASE/documentation:latest
|
|
only:
|
|
refs:
|
|
- master@openlp/runners
|
|
changes:
|
|
- Dockerfile.documentation
|
|
|
|
build-all:
|
|
stage: build
|
|
script:
|
|
- |
|
|
for NAME in debian ubuntu fedora arch angular documentation; do
|
|
docker pull $IMAGE_BASE/$NAME || true
|
|
docker build --cache-from $IMAGE_BASE/$NAME --tag $IMAGE_BASE/$NAME:$CI_COMMIT_SHA --tag $IMAGE_BASE/$NAME:latest -f Dockerfile.$NAME .
|
|
docker push $IMAGE_BASE/$NAME:$CI_COMMIT_SHA
|
|
docker push $IMAGE_BASE/$NAME:latest
|
|
done
|
|
when: manual
|