mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-07-02 02:40:35 +00:00
Restructure startup procedure
This commit is contained in:
42
.gitlab-ci.yml
Normal file
42
.gitlab-ci.yml
Normal 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
|
Reference in New Issue
Block a user