---
include:
  - project: shore/ci-stuff
    file: templates/pre-commit.yml
  - project: shore/ci-stuff
    file: templates/notify.yml
  - project: shore/ci-stuff
    file: templates/containerfiles.yml

# cgit image:

build-cgit:
  extends: .container-build
  variables:
    CONTEXT: cgit

push-cgit:
  extends: .container-push
  variables:
    CONTEXT: cgit
    IMAGE: cgit
  needs:
    - job: build-cgit
      artifacts: true

# httpd latest image:

build-httpd:
  extends: .container-build
  variables:
    CONTEXT: httpd/buster

push-httpd:
  extends: .container-push
  variables:
    CONTEXT: httpd/buster
    IMAGE: httpd
  needs:
    - job: build-httpd
      artifacts: true

# httpd buster image:

push-httpd-buster:
  extends: .container-push
  variables:
    CONTEXT: httpd/buster
    IMAGE: httpd
    TAG: buster
  needs:
    - job: build-httpd
      artifacts: true

# httpd bullseye image:

build-httpd-bullseye:
  extends: .container-build
  variables:
    CONTEXT: httpd/bullseye

push-httpd-bullseye:
  extends: .container-push
  variables:
    CONTEXT: httpd/bullseye
    IMAGE: httpd
    TAG: bullseye
  needs:
    - job: build-httpd-bullseye
      artifacts: true

# sshd image:

build-sshd:
  extends: .container-build
  variables:
    CONTEXT: sshd
    DOCKER_BUILDKIT: ""

push-sshd:
  extends: .container-push
  variables:
    CONTEXT: sshd
    IMAGE: sshd
  needs:
    - job: build-sshd
      artifacts: true

# crond image:

build-crond:
  extends: .container-build
  variables:
    CONTEXT: crond

push-crond:
  extends: .container-push
  variables:
    CONTEXT: crond
    IMAGE: cron
  needs:
    - job: build-crond
      artifacts: true

# sleep image:

build-sleep:
  extends: .container-build
  variables:
    CONTEXT: sleep

push-sleep:
  extends: .container-push
  variables:
    CONTEXT: sleep
    IMAGE: cron
  needs:
    - job: build-sleep
      artifacts: true
