This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
evergreen.yml
234 lines (208 loc) · 5.68 KB
/
evergreen.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
variables:
- &package_deb
archive: "https://downloads.mongodb.com/on-prem-mms/deb/mongodb-mms_4.4.17.100.20210901T1617Z-1_x86_64.deb"
- &package_rpm
archive: "https://downloads.mongodb.com/on-prem-mms/rpm/mongodb-mms-4.4.17.100.20210901T1617Z-1.x86_64.rpm"
functions:
"fetch source":
- command: git.get_project
type: system
params:
directory: src
"merge in base branch":
- command: shell.exec
type: system
params:
working_dir: src
shell: bash
script: |
# exit if non-patch or this is not a pull request
if [[ "${is_patch}" != "true" || -z "${github_pr_number}" ]]; then
exit 0
fi
# merge before checking
echo "==>"
echo "==> Merging in the base branch"
git merge ${branch_name}
"ego install":
- command: shell.exec
params:
working_dir: src
shell: bash
script: |
set -e
echo "==>"
echo "==> Installing ego"
bin/ego seed-local ${workdir}
"install ops manager":
- command: shell.exec
params:
working_dir: src
shell: bash
script: |
set -e
echo "==>"
echo "==> Installing Ops Manager ${version}"
bin/ego ops_manager_install_version --version ${version} --mongodb-version ${mongodb_version}
"install ops manager package":
- command: shell.exec
params:
working_dir: src
shell: bash
script: |
set -e
echo "==>"
echo "==> Installing Ops Manager Package: ${archive}"
bin/ego ops_manager_install_from_link --archive ${archive} --mongodb-version ${mongodb_version}
"install ops manager tgz":
- command: shell.exec
params:
working_dir: src
shell: bash
script: |
set -e
echo "==>"
echo "==> Installing Ops Manager ${version} (tgz)"
bin/ego ops_manager_install_version --version ${version} --mongodb-version ${mongodb_version} --tgz
"uninstall ops manager":
- command: shell.exec
params:
working_dir: src
shell: bash
script: |
set -e
echo "==>"
echo "==> Uninstalling Ops Manager"
bin/ego ops_manager_uninstall
"get logs":
- command: shell.exec
params:
type: system
shell: bash
script: |
echo "==>"
echo "==> Printing any existing Ops Manager Logs"
# Determine install directory
DIR=/opt/mongodb/mms
if [ -d "${workdir}/mongodb-mms" ]; then
DIR="${workdir}/mongodb-mms"
else
echo "==>"
echo "==> Service Status:"
ego service_command status mongodb-mms
fi
echo "==>"
echo "==> $DIR/logs/mms-migration.log"
cat "$DIR/logs/mms-migration.log" 2>/dev/null || echo "No logs found."
echo "==>"
echo "==> $DIR/logs/daemon.log"
cat "$DIR/logs/daemon.log" 2>/dev/null || echo "No logs found."
echo "==>"
echo "==> $DIR/logs/daemon-startup.log"
cat "$DIR/logs/daemon-startup.log" 2>/dev/null || echo "No logs found."
echo "==>"
echo "==> $DIR/logs/mms0-startup.log"
cat "$DIR/logs/mms0-startup.log" 2>/dev/null || echo "No logs found."
echo "==>"
echo "==> $DIR/logs/mms0.log"
cat "$DIR/logs/mms0.log" 2>/dev/null || echo "No logs found."
"clean":
- command: shell.exec
params:
type: system
shell: bash
script: |
echo "==>"
echo "==> Cleaning any pre-installed Ops Manager / MongoDB artifacts"
ego ops_manager_clean
# Ensure the Evergreen host is clean
pre:
- func: "fetch source"
- func: "merge in base branch"
- func: "ego install"
- func: "clean"
# Print logs and leave nothing behind
post:
- func: "get logs"
- func: "clean"
tasks:
- name: INSTALL_OPS_MANAGER_4.4
tags:
- install
commands:
- func: "install ops manager"
vars:
version: 4.4.17
mongodb_version: 4.4.9
- func: "uninstall ops manager"
- name: INSTALL_OPS_MANAGER_4.4_PACKAGE
tags:
- install_package_deb
- install_package_rpm
commands:
- func: "install ops manager package"
vars:
mongodb_version: 4.4.9
archive: ${archive}
- func: "uninstall ops manager"
- name: INSTALL_OPS_MANAGER_4.4_TGZ
tags:
- install
commands:
- func: "install ops manager tgz"
vars:
version: 4.4.17
mongodb_version: 4.4.9
- func: "uninstall ops manager"
- name: INSTALL_4.2-UPGRADE_4.4-UPGRADE_5.0
tags:
- upgrade
commands:
- func: "install ops manager"
vars:
version: 4.2.26
mongodb_version: 4.4.9
- func: "install ops manager"
vars:
version: 4.4.17
- func: "install ops manager"
vars:
version: 5.0.3
- func: "uninstall ops manager"
buildvariants:
- name: ubuntu-18.04
display_name: Ubuntu 18.04
run_on: ubuntu1804-large
expansions:
*package_deb
tasks:
- name: .install
- name: .install_package_deb
- name: .upgrade
- name: debian10
display_name: Debian 10
run_on: debian10-large
expansions:
*package_deb
tasks:
- name: .install
- name: .install_package_deb
- name: .upgrade
- name: rhel-7.6
display_name: RHEL 7.6
run_on: rhel76-large
expansions:
*package_rpm
tasks:
- name: .install
- name: .install_package_rpm
- name: .upgrade
- name: suse15
display_name: SUSE 15
run_on: suse15-large
expansions:
*package_rpm
tasks:
- name: .install
- name: .install_package_rpm
- name: .upgrade