|
1
|
|
-image: java:8u102-jdk
|
|
|
1
|
+image: registry.gitlab.com/ultreiaio/docker/ird-observe:latest
|
|
2
|
2
|
|
|
3
|
3
|
stages:
|
|
4
|
4
|
- Build
|
|
5
|
5
|
- Test
|
|
6
|
6
|
- Staging
|
|
7
|
|
- - Production
|
|
8
|
|
-
|
|
9
|
|
-.before_script_default: &before_script_default
|
|
10
|
|
- before_script:
|
|
11
|
|
- - eval $(ssh-agent -s)
|
|
12
|
|
- - ssh-add <(echo "$SSH_PRIVATE_KEY")
|
|
13
|
|
- - mkdir -p ~/.ssh
|
|
14
|
|
- - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
|
15
|
|
- - (cd ~ ; git clone ssh://git@gitlab.com/ultreiaio/env.git)
|
|
16
|
|
- - . ~/env/bin/prepare-env "$GITLAB_USER_ID" "$GITLAB_USER_EMAIL"
|
|
17
|
|
-
|
|
18
|
|
-.before_script_clone: &before_script_clone
|
|
19
|
|
- before_script:
|
|
20
|
|
- - eval $(ssh-agent -s)
|
|
21
|
|
- - ssh-add <(echo "$SSH_PRIVATE_KEY")
|
|
22
|
|
- - mkdir -p ~/.ssh
|
|
23
|
|
- - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
|
24
|
|
- - (cd ~ ; git clone ssh://git@gitlab.com/ultreiaio/env.git)
|
|
25
|
|
- - . ~/env/bin/prepare-env-with-clone "$CI_PROJECT_PATH" "$CI_PROJECT_NAME" "$GITLAB_USER_ID" "$GITLAB_USER_EMAIL"
|
|
26
|
7
|
|
|
27
|
8
|
.env_test: &env_test
|
|
28
|
9
|
environment:
|
| ... |
... |
@@ -32,9 +13,13 @@ stages: |
|
32
|
13
|
environment:
|
|
33
|
14
|
name: staging
|
|
34
|
15
|
|
|
35
|
|
-.env_production: &env_production
|
|
36
|
|
- environment:
|
|
37
|
|
- name: production
|
|
|
16
|
+.test_manual: &test_manual
|
|
|
17
|
+ stage: Test
|
|
|
18
|
+ only:
|
|
|
19
|
+ - develop
|
|
|
20
|
+ except:
|
|
|
21
|
+ - triggers
|
|
|
22
|
+ when: manual
|
|
38
|
23
|
|
|
39
|
24
|
.deploy_site: &deploy_site
|
|
40
|
25
|
script:
|
| ... |
... |
@@ -46,9 +31,18 @@ stages: |
|
46
|
31
|
script:
|
|
47
|
32
|
- war-deploy-latest-to-demo 'server'
|
|
48
|
33
|
|
|
|
34
|
+.nightly: &nightly
|
|
|
35
|
+ only:
|
|
|
36
|
+ - triggers
|
|
|
37
|
+
|
|
|
38
|
+.staging: &staging
|
|
|
39
|
+ stage: Staging
|
|
|
40
|
+ only:
|
|
|
41
|
+ - tags
|
|
|
42
|
+ <<: *env_staging
|
|
|
43
|
+
|
|
49
|
44
|
build:
|
|
50
|
45
|
stage: Build
|
|
51
|
|
- <<: *before_script_default
|
|
52
|
46
|
script:
|
|
53
|
47
|
- maven-execute 'verify -DskipTests'
|
|
54
|
48
|
only:
|
| ... |
... |
@@ -57,21 +51,11 @@ build: |
|
57
|
51
|
except:
|
|
58
|
52
|
- triggers
|
|
59
|
53
|
|
|
60
|
|
-.test_manual: &test_manual
|
|
61
|
|
- stage: Test
|
|
62
|
|
- <<: *before_script_default
|
|
63
|
|
- only:
|
|
64
|
|
- - develop
|
|
65
|
|
- except:
|
|
66
|
|
- - triggers
|
|
67
|
|
- when: manual
|
|
68
|
|
-
|
|
69
|
54
|
stage:
|
|
70
|
55
|
<<: *env_staging
|
|
71
|
56
|
<<: *test_manual
|
|
72
|
|
- <<: *before_script_clone
|
|
73
|
57
|
script:
|
|
74
|
|
- - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y
|
|
|
58
|
+ - release-gitlab-init ${CI_PROJECT_PATH} ${GITLAB_USER_ID} ${GITLAB_USER_EMAIL}
|
|
75
|
59
|
- milestone-close
|
|
76
|
60
|
- release-start
|
|
77
|
61
|
- release-finish
|
| ... |
... |
@@ -82,9 +66,8 @@ stage: |
|
82
|
66
|
release:
|
|
83
|
67
|
<<: *env_staging
|
|
84
|
68
|
<<: *test_manual
|
|
85
|
|
- <<: *before_script_clone
|
|
86
|
69
|
script:
|
|
87
|
|
- - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y
|
|
|
70
|
+ - release-gitlab-init ${CI_PROJECT_PATH} ${GITLAB_USER_ID} ${GITLAB_USER_EMAIL}
|
|
88
|
71
|
- milestone-close
|
|
89
|
72
|
- release-start
|
|
90
|
73
|
- release-finish
|
| ... |
... |
@@ -92,12 +75,26 @@ release: |
|
92
|
75
|
- changelog-update
|
|
93
|
76
|
- milestone-create
|
|
94
|
77
|
|
|
95
|
|
-deploy-snapshot:
|
|
96
|
|
- <<: *env_staging
|
|
97
|
|
- <<: *test_manual
|
|
|
78
|
+staging-demo:
|
|
|
79
|
+ <<: *staging
|
|
|
80
|
+ script:
|
|
|
81
|
+ - war-deploy-to-demo 'server'
|
|
|
82
|
+
|
|
|
83
|
+staging-site:
|
|
|
84
|
+ <<: *staging
|
|
|
85
|
+ <<: *deploy_site
|
|
|
86
|
+
|
|
|
87
|
+stage-release:
|
|
|
88
|
+ <<: *staging
|
|
|
89
|
+ when: manual
|
|
|
90
|
+ script:
|
|
|
91
|
+ - stage-release
|
|
|
92
|
+
|
|
|
93
|
+stage-drop:
|
|
|
94
|
+ <<: *staging
|
|
|
95
|
+ when: manual
|
|
98
|
96
|
script:
|
|
99
|
|
- - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y
|
|
100
|
|
- - maven-execute 'deploy -DperformRelease'
|
|
|
97
|
+ - stage-drop
|
|
101
|
98
|
|
|
102
|
99
|
latest-site:
|
|
103
|
100
|
<<: *env_test
|
| ... |
... |
@@ -109,16 +106,10 @@ latest-demo: |
|
109
|
106
|
<<: *test_manual
|
|
110
|
107
|
<<: *deploy_demo_latest
|
|
111
|
108
|
|
|
112
|
|
-.nightly: &nightly
|
|
113
|
|
- <<: *before_script_default
|
|
114
|
|
- only:
|
|
115
|
|
- - triggers
|
|
116
|
|
-
|
|
117
|
109
|
nightly-build:
|
|
118
|
110
|
stage: Build
|
|
119
|
111
|
<<: *nightly
|
|
120
|
112
|
script:
|
|
121
|
|
- - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y
|
|
122
|
113
|
- maven-execute 'verify -DperformRelease'
|
|
123
|
114
|
|
|
124
|
115
|
nightly-site:
|
| ... |
... |
@@ -132,31 +123,3 @@ nightly-demo: |
|
132
|
123
|
<<: *env_test
|
|
133
|
124
|
<<: *nightly
|
|
134
|
125
|
<<: *deploy_demo_latest
|
|
135
|
|
-
|
|
136
|
|
-.staging: &staging
|
|
137
|
|
- stage: Staging
|
|
138
|
|
- only:
|
|
139
|
|
- - tags
|
|
140
|
|
- <<: *env_staging
|
|
141
|
|
- <<: *before_script_default
|
|
142
|
|
-
|
|
143
|
|
-staging-demo:
|
|
144
|
|
- <<: *staging
|
|
145
|
|
- script:
|
|
146
|
|
- - war-deploy-to-demo 'server'
|
|
147
|
|
-
|
|
148
|
|
-staging-site:
|
|
149
|
|
- <<: *staging
|
|
150
|
|
- <<: *deploy_site
|
|
151
|
|
-
|
|
152
|
|
-stage-release:
|
|
153
|
|
- <<: *staging
|
|
154
|
|
- when: manual
|
|
155
|
|
- script:
|
|
156
|
|
- - stage-release
|
|
157
|
|
-
|
|
158
|
|
-stage-drop:
|
|
159
|
|
- <<: *staging
|
|
160
|
|
- when: manual
|
|
161
|
|
- script:
|
|
162
|
|
- - stage-drop
|