-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
116 lines (102 loc) · 2.85 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
104
105
106
107
108
109
110
111
112
113
114
115
116
# CICD stages
stages:
- test-unit
- test-integration
- test-functional
- deploy
# The test script: Runs the functional, and unit tests of .NET Core
#
# TEST_PROJECT_NAME # The name of the csharp test project
.test_script: &test_script
image: mcr.microsoft.com/dotnet/core/sdk:3.1
dependencies: []
script:
- echo "TEST_PROJECT_NAME=$TEST_PROJECT_NAME"
- dotnet restore ./tests/$TEST_PROJECT_NAME/$TEST_PROJECT_NAME.csproj
- dotnet test ./tests/$TEST_PROJECT_NAME/$TEST_PROJECT_NAME.csproj
.test_functional_script: &test_functional_script
<<: *test_script
stage: test-functional
variables:
TEST_PROJECT_NAME: "FunctionalTests"
.test_integration_script: &test_integration_script
<<: *test_script
stage: test-integration
variables:
TEST_PROJECT_NAME: "IntegrationTests"
.test_unit_script: &test_unit_script
<<: *test_script
stage: test-unit
variables:
TEST_PROJECT_NAME: "UnitTests"
test-functional:dev:
<<: *test_functional_script
tags:
- vanilla-dev # use vanilla-dev for all work that not need Docker-in-Docker and for all deployments to DEV cluster
only:
- /^issues\/.*$/
- /^hotfixes\/.*$/
- develop
test-functional:qa:
<<: *test_functional_script
tags:
- vanilla-dev # use vanilla-dev for all work that not need Docker-in-Docker and for all deployments to DEV cluster
only:
- release
test-functional:prod:
<<: *test_functional_script
tags:
- vanilla-prod
only:
- master
test-integration:dev:
<<: *test_integration_script
tags:
- vanilla-dev # use vanilla-dev for all work that not need Docker-in-Docker and for all deployments to DEV cluster
only:
- /^issues\/.*$/
- /^hotfixes\/.*$/
- develop
test-integration:qa:
<<: *test_integration_script
tags:
- vanilla-dev # use vanilla-dev for all work that not need Docker-in-Docker and for all deployments to DEV cluster
only:
- release
test-integration:prod:
<<: *test_integration_script
tags:
- vanilla-prod
only:
- master
test-unit:dev:
<<: *test_unit_script
tags:
- vanilla-dev # use vanilla-dev for all work that not need Docker-in-Docker and for all deployments to DEV cluster
only:
- /^issues\/.*$/
- /^hotfixes\/.*$/
- develop
test-unit:qa:
<<: *test_unit_script
tags:
- vanilla-dev # use vanilla-dev for all work that not need Docker-in-Docker and for all deployments to DEV cluster
only:
- release
test-unit:prod:
<<: *test_unit_script
tags:
- vanilla-prod
only:
- master
trigger-deployment:
stage: deploy
image: curlimages/curl
tags:
- dind-dev
script:
- curl -X POST -F token=$DEPLOYMENT_TOKEN -F ref=$CI_COMMIT_REF_NAME $DEPLOYMENT_REPO_URL
only:
- develop
- release
- master