Commit 8c33a1a6 authored by Adam Parák's avatar Adam Parák 💬
Browse files

Update .gitlab-ci.yml file

parent 8e31774e
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -10,12 +10,11 @@ stages:
- test
- buildimage
variables:
  VER: rolling-${CI_PIPELINE_ID}
  ID: "${CI_COMMIT_SHORT_SHA}"
  GIT_SUBMODULE_STRATEGY: recursive
  CI_REGISTRY_IMAGE: frontend
  CI_REGISTRY: gitlab.fi.muni.cz:5050/inject/container-registry/$CI_REGISTRY_IMAGE
  IMAGE_TAG: "$CI_REGISTRY:$VER"
  IMAGE_TAG: "$CI_REGISTRY:$CI_COMMIT_TAG"
  IMAGE_LATEST: "$CI_REGISTRY:latest"
  DOCKER_HOST: tcp://docker:2375
  DOCKER_DRIVER: overlay2
@@ -69,9 +68,7 @@ create-image:
    - "--tls=false"
  stage: buildimage
  rules:
  - if: "$CI_COMMIT_BRANCH == 'main'"
    when: manual
  - if: "$CI_COMMIT_TAG =~ /^v(?:\\d+.){2}(?:\\d+)$/"
  - if: $CI_COMMIT_TAG
    when: manual
  before_script:
  - echo "Docker registry url is $CI_REGISTRY"
@@ -86,6 +83,17 @@ create-image:
  - docker push $IMAGE_TAG
  - docker push $IMAGE_LATEST

release_job:
  stage: buildimage
  image: registry.gitlab.com/gitlab-org/release-cli:latest
  rules:
    - if: $CI_COMMIT_TAG                 # Run this job when a tag is created
  script:
    - echo "running release_job"
  release:                               # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties
    tag_name: '$CI_COMMIT_TAG'
    description: 'Version ${CI_COMMIT_TAG}, for more info please check the changelog in the documentation.'

include:
  - template: Security/Dependency-Scanning.gitlab-ci.yml
  - template: Security/SAST.gitlab-ci.yml