-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
170 lines (170 loc) · 5.13 KB
/
.drone.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# ---
# kind: pipeline
# type: docker
# name: "Test Environment"
# # Builds and tests on pull request. Required success before merge can happen.
# trigger:
# branch:
# - master
# event:
# include:
# - pull_request
# steps:
# - name: build & test
# image: enonic/enonic-ci:7.7-node
# commands:
# - /setup_sandbox.sh
# - enonic project build
# - name: deploy
# image: enonic/enonic-ci:7.7-node
# environment:
# ENONIC_CLI_REMOTE_URL:
# from_secret: ssb-xp7t-url
# ENONIC_CLI_REMOTE_USER:
# from_secret: ssb-xp7t-user
# ENONIC_CLI_REMOTE_PASS:
# from_secret: ssb-xp7t-pass
# commands:
# - enonic app install --file build/libs/*.jar
# - name: mabl create and test branch - test.ssb.no
# image: enonic/enonic-ci:7.7-node
# environment:
# MABL_API_KEY:
# from_secret: mabl-api-key
# MABL_APP_ID:
# from_secret: mabl-application-id
# MABL_ENV_ID_TEST:
# from_secret: mabl-env-test
# commands:
# - npm install -g @mablhq/mabl-cli
# - mabl deployments create --api-key $MABL_API_KEY --application-id $MABL_APP_ID --labels MIMIR_SMOKE --environment-id $MABL_ENV_ID_TEST --revision $DRONE_COMMIT_SHA --await-completion
# ---
# kind: pipeline
# type: docker
# name: "QA Environment - promote"
# # Deploy to qa on promoted builds
# trigger:
# target:
# - qa
# steps:
# - name: build & test
# image: enonic/enonic-ci:7.7-node
# commands:
# - /setup_sandbox.sh
# - enonic project build
# - name: deploy
# image: enonic/enonic-ci:7.7-node
# environment:
# ENONIC_CLI_REMOTE_URL:
# from_secret: ssb-xp7q-url
# ENONIC_CLI_REMOTE_USER:
# from_secret: ssb-xp7q-user
# ENONIC_CLI_REMOTE_PASS:
# from_secret: ssb-xp7q-pass
# commands:
# - enonic app install --file build/libs/*.jar
# - name: mabl end-to-end test
# image: enonic/enonic-ci:7.7-node
# environment:
# MABL_API_KEY:
# from_secret: mabl-api-key
# MABL_APP_ID:
# from_secret: mabl-application-id
# MABL_ENV_ID_QA:
# from_secret: mabl-env-qa
# commands:
# - npm install -g @mablhq/mabl-cli
# - mabl deployments create --api-key $MABL_API_KEY --application-id $MABL_APP_ID --labels MIMIR --environment-id $MABL_ENV_ID_QA --await-completion
# - name: slack
# image: plugins/slack
# settings:
# webhook:
# from_secret: slack_webhook_mimir_utv
# channel: mimir_utv
# template: >
# {{#success build.status}}
# 🛠Build {{build.number}} deploy to QA succeeded. Good job.
# {{else}}
# 💣Build {{build.number}} failed. {{build.author}} triggered the build. Maybe do a fix? Here's the failed build: {{build.link}}
# {{/success}}
# when:
# status: [success, failure]
# ---
# kind: pipeline
# type: docker
# name: "QA Environment - Push to master"
# # Deploy to qa on push to master
# trigger:
# branch:
# - master
# event:
# include:
# - push
# steps:
# - name: build & test
# image: enonic/enonic-ci:7.7-node
# commands:
# - /setup_sandbox.sh
# - enonic project build
# - name: deploy
# image: enonic/enonic-ci:7.7-node
# environment:
# ENONIC_CLI_REMOTE_URL:
# from_secret: ssb-xp7q-url
# ENONIC_CLI_REMOTE_USER:
# from_secret: ssb-xp7q-user
# ENONIC_CLI_REMOTE_PASS:
# from_secret: ssb-xp7q-pass
# commands:
# - enonic app install --file build/libs/*.jar
# - name: mabl end-to-end test
# image: enonic/enonic-ci:7.7-node
# environment:
# MABL_API_KEY:
# from_secret: mabl-api-key
# MABL_APP_ID:
# from_secret: mabl-application-id
# MABL_ENV_ID_QA:
# from_secret: mabl-env-qa
# commands:
# - npm install -g @mablhq/mabl-cli
# - mabl deployments create --api-key $MABL_API_KEY --application-id $MABL_APP_ID --environment-id $MABL_ENV_ID_QA --labels MIMIR --await-completion
# - name: slack
# image: plugins/slack
# settings:
# webhook:
# from_secret: slack_webhook_mimir_utv
# channel: mimir_utv
# template: >
# {{#success build.status}}
# 🛠Build {{build.number}} deploy to QA succeeded. Good job.
# {{else}}
# 💣Build {{build.number}} failed. {{build.author}} triggered the build. Maybe do a fix? Here's the failed build: {{build.link}}
# {{/success}}
# when:
# status: [success, failure]
# ---
# kind: pipeline
# type: docker
# name: "Production Environment"
# # Deploy to prod on promoted builds
# trigger:
# target:
# - prod
# steps:
# - name: build & test
# image: enonic/enonic-ci:7.7-node
# commands:
# - /setup_sandbox.sh
# - enonic project build
# - name: deploy
# image: enonic/enonic-ci:7.7-node
# environment:
# ENONIC_CLI_REMOTE_URL:
# from_secret: ssb-xp7p-url
# ENONIC_CLI_REMOTE_USER:
# from_secret: ssb-xp7p-user
# ENONIC_CLI_REMOTE_PASS:
# from_secret: ssb-xp7p-pass
# commands:
# - enonic app install --file build/libs/*.jar