-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
45 lines (41 loc) · 1.68 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
stages:
- containerize
- release
- test
- deploy
include:
- remote: https://gitlab.com/TIBHannover/gitlab-ci-templates/raw/master/templates/Docker.gitlab-ci.yml
- remote: https://gitlab.com/TIBHannover/gitlab-ci-templates/raw/master/templates/Docker-Release.gitlab-ci.yml
- template: Container-Scanning.gitlab-ci.yml
container_scanning:
variables:
# Change image name to match our repository naming convention
CI_APPLICATION_REPOSITORY: $CI_REGISTRY_IMAGE
deployment_trigger:incubating:
stage: deploy
image: buildpack-deps:buster-curl
script:
- echo "Triggering deployment for branch $CI_COMMIT_REF_NAME"
- curl --fail -X POST -F "token=$PIPELINE_TRIGGER_TOKEN" -F "ref=master" -F "variables[ORKG_COMPONENT_NAME]=orkg-simcomp" -F "variables[ORKG_COMPONENT_REF_NAME]=$CI_COMMIT_REF_NAME" https://git.tib.eu/api/v4/projects/1317/trigger/pipeline
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
# Disable cloning, downloading artifacts and caching
cache: []
dependencies: []
variables:
GIT_STRATEGY: none
deployment_trigger:release:
stage: deploy
image: buildpack-deps:buster-curl
script:
- echo "Triggering deployment for release version $CI_COMMIT_TAG"
- curl --fail -X POST -F "token=$PIPELINE_TRIGGER_TOKEN" -F "ref=master" -F "variables[ORKG_COMPONENT_NAME]=orkg-simcomp" -F "variables[ORKG_COMPONENT_REF_NAME]=$CI_COMMIT_REF_NAME" -F "variables[ORKG_COMPONENT_RELEASE_VERSION]=$CI_COMMIT_TAG" https://git.tib.eu/api/v4/projects/1317/trigger/pipeline
rules:
- if: $CI_COMMIT_TAG
# Disable cloning, downloading artifacts and caching
cache: []
dependencies: []
variables:
GIT_STRATEGY: none
needs:
- docker-build