-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
103 lines (91 loc) · 2.54 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
include: "/.gitlab-ci-explorviz-common.yml"
stages:
- trigger-multi-project-pipeline
- test
- deploy:images
- deploy:retagging
run-pre-commit:
stage: test
image: explorviz/pre-commit:latest
script:
- pre-commit run --all-files --config .pre-commit-config.yaml
deploy-petclinic-amd64:
extends: .build-and-deploy
variables:
DOCKER_CONTEXT_PATH: $CI_PROJECT_DIR/example-applications/petclinic-demo
DOCKERFILE_NAME: Dockerfile_Spring_2.7
rules:
- if: $ARM64_BUILD
when: never
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"
deploy-petclinic-arm64:
extends: deploy-petclinic-amd64
rules:
- if: $MULTI_ARCH_BUILD || $ARM64_BUILD
variables:
DOCKERHUB_TAG: "arm64"
tags:
- arm64
deploy-demo-supplier-amd64:
extends: .build-and-deploy
variables:
DOCKER_CONTEXT_PATH: $CI_PROJECT_DIR/demo-supplier
rules:
- if: $ARM64_BUILD
when: never
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
changes:
- demo-supplier/app.js
- demo-supplier/Dockerfile
- demo-supplier/package.json
- demo-supplier/user.json
deploy-demo-supplier-arm64:
extends: deploy-demo-supplier-amd64
rules:
- if: $MULTI_ARCH_BUILD || $ARM64_BUILD
variables:
DOCKERHUB_TAG: "arm64"
tags:
- arm64
retag-petclinic-as-latest:
extends: .retag-dockerhub-image
rules:
- if: $MULTI_ARCH_BUILD || $ARM64_BUILD
when: never
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"
variables:
SOURCE_TAG: "amd64"
TARGET_TAG: "latest"
retag-demo-supplier-as-latest:
extends: .retag-dockerhub-image
rules:
- if: $MULTI_ARCH_BUILD || $ARM64_BUILD
when: never
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
changes:
- demo-supplier/app.js
- demo-supplier/Dockerfile
- demo-supplier/package.json
- demo-supplier/user.json
variables:
IMAGE_NAME: "demo-supplier"
SOURCE_TAG: "amd64"
TARGET_TAG: "latest"
publish-multi-arch-manifest-demo-supplier:
extends: .retag-as-multi-arch-dockerhub-image
variables:
IMAGE_NAME: "demo-supplier"
publish-multi-arch-manifest-petclinic:
extends: .retag-as-multi-arch-dockerhub-image
.trigger-multi-project-pipeline:
stage: trigger-multi-project-pipeline
rules:
- if: $MULTI_PROJECT_PIPELINE
trigger:
project: ExplorViz/code/$TRIGGERED_PROJECT
forward:
pipeline_variables: true
trigger-metrics-service:
extends: .trigger-multi-project-pipeline
variables:
TRIGGERED_PROJECT: "metrics-service"