Newer
Older
---
include:
- project: shore/ci-templates
file: templates/pre-commit.yml
stages:
- test
- build
- deploy
# One day I may want to start tagging release and for that the TAG variable is
# needed, but that would mean releasing ALL of the images when tagging (sort of
# a periodic release). The images are not really related so for now TAG is
# hard-coded to latest.
variables:
TAG: latest
.build:
stage: build
variables:
DOCKER_BUILDKIT: "1"
tags: &tags [ns4.shore.co.il]
script:
after_script:
- echo "HASH=$(cat iid)" > dot.env
artifacts:
reports:
dotenv: dot.env
rules: &rules
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "push"
changes:
- docker tag "$HASH" "registry.shore.co.il/$IMAGE:${TAG:-latest}"
- docker push "registry.shore.co.il/$IMAGE:${TAG:-latest}"
IMAGE: cgit
needs:
- job: build-cgit
artifacts: true
IMAGE: httpd
needs:
- job: build-httpd
artifacts: true
# httpd buster image:
push-httpd-buster:
extends: .push
variables:
IMAGE: httpd
TAG: buster
needs:
- job: build-httpd
artifacts: true
# httpd bullseye image:
build-httpd-bullseye:
extends: .build
variables:
CONTEXT: httpd/bullseye
push-httpd-bullseye:
extends: .push
variables:
IMAGE: httpd
TAG: bullseye
needs:
- job: build-httpd-bullseye
artifacts: true
# sshd image:
build-sshd:
extends: .build
variables:
CONTEXT: sshd