Restructure startup procedure

This commit is contained in:
Patrick Jentsch
2023-09-25 10:11:11 +02:00
parent 4a9a03e648
commit 4581367d04
15 changed files with 399 additions and 236 deletions

42
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,42 @@
default:
image: docker:24.0.6
services:
- docker:24.0.6-dind
tags:
- docker
variables:
DOCKER_TLS_CERTDIR: /certs
build_image:
stage: build
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: on_success
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
- if: $CI_COMMIT_TAG
when: "on_success"
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
- when: never
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
include:
- template: Security/Container-Scanning.gitlab-ci.yml
container_scanning:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: on_success
variables:
CS_IMAGE: $CI_REGISTRY_IMAGE:latest
- if: $CI_COMMIT_TAG
when: on_success
variables:
CS_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}
- when: never