2
2
# Java Driver Config for Evergreen #
3
3
# ########################################
4
4
5
- java_driver_variables :
6
- # # Common download urls (merge in as hashes)
7
- mongo_download_url_prefixes :
8
- linux64 : &mongo_url_linux64
9
- mongo_url_prefix : " http://downloads.mongodb.org/linux/mongodb-linux-x86_64-"
10
- ubuntu1604 : &mongo_url_ubuntu1604
11
- mongo_url_platform : " ubuntu1604-"
12
- << : *mongo_url_linux64
13
5
14
6
# ######################################
15
7
# Functions #
@@ -21,53 +13,6 @@ functions:
21
13
params :
22
14
directory : " mongo-java-driver"
23
15
24
- " set topology standalone" :
25
- command : expansions.update
26
- params :
27
- updates :
28
- - key : " orchestration_file"
29
- value : " basic.json"
30
- - key : " topology_type"
31
- value : " server"
32
- - key : " mongodb_test_uri"
33
- value : " mongodb://localhost:27017"
34
- - key : " rs_enabled"
35
- value : " false"
36
-
37
-
38
- " set topology replica set" :
39
- command : expansions.update
40
- params :
41
- updates :
42
- - key : " orchestration_file"
43
- value : " basic.json"
44
- - key : " topology_type"
45
- value : " replica_set"
46
- - key : " mongodb_test_uri"
47
- value : " mongodb://localhost:27017,localhost:27018"
48
- - key : " rs_enabled"
49
- value : " true"
50
-
51
- " set topology sharded" :
52
- command : expansions.update
53
- params :
54
- updates :
55
- - key : " orchestration_file"
56
- value : " basic.json"
57
- - key : " topology_type"
58
- value : " sharded_cluster"
59
- - key : " mongodb_test_uri"
60
- value : " mongodb://localhost:27017"
61
- - key : " rs_enabled"
62
- value : " false"
63
-
64
- " set version latest" :
65
- command : expansions.update
66
- params :
67
- updates :
68
- - key : " mongo_url"
69
- value : ${mongo_url_prefix}${mongo_url_platform|}latest.${mongo_url_extension|tgz}
70
-
71
16
" fetch mongodb" :
72
17
command : shell.exec
73
18
params :
@@ -85,11 +30,25 @@ functions:
85
30
cp -r mongodb /cygdrive/c/mongodb
86
31
fi
87
32
33
+
34
+ " compile and analyze" :
35
+ command : shell.exec
36
+ params :
37
+ working_dir : " mongo-java-driver"
38
+ script : |
39
+ set -o verbose
40
+ set -o errexit
41
+
42
+ ./gradlew -PxmlReports.enabled=true --info -x test clean check jar testClasses
43
+
88
44
" run tests" :
89
45
command : shell.exec
90
46
params :
91
47
working_dir : " mongo-java-driver"
92
48
script : |
49
+ set -o verbose
50
+ set -o errexit
51
+
93
52
export ORCHESTRATION_FILE="orchestration_configs/${topology_type}s/${orchestration_file}"
94
53
95
54
mkdir -p $(dirname "$ORCHESTRATION_FILE")
@@ -106,13 +65,18 @@ functions:
106
65
107
66
${start_mongo_orchestration}
108
67
${start_topology}
109
- ./gradlew -Dorg.mongodb.test.uri=${mongodb_test_uri} -Prs.enabled=${rs_enabled} --stacktrace --info test
68
+
69
+
70
+ mongodb_test_uri="mongodb://${auth_uri_prefix}${hosts}"
71
+
72
+ ./gradlew -Dorg.mongodb.test.uri=$mongodb_test_uri --stacktrace --info test
110
73
111
74
" attach junit results" :
112
75
command : attach.xunit_results
113
76
params :
114
77
file : ./mongo-java-driver/*/build/test-results/TEST-*.xml
115
78
79
+
116
80
# ######################################
117
81
# Tasks #
118
82
# ######################################
@@ -121,48 +85,22 @@ tasks:
121
85
- name : compileAndAnalyze
122
86
commands :
123
87
- func : " fetch source"
124
- - command : git.apply_patch
125
- params :
126
- directory : " mongo-java-driver"
127
- - command : shell.exec
128
- params :
129
- working_dir : " mongo-java-driver"
130
- script : |
131
- ./gradlew -PxmlReports.enabled=true --info -x test clean check jar testClasses
132
- - name : test-standalone
88
+ - func : " compile and analyze"
89
+ - name : test
90
+ depends_on :
91
+ - name : compileAndAnalyze
92
+ variant : compile
133
93
commands :
134
94
- func : " fetch source"
135
- - command : git.apply_patch
136
- params :
137
- directory : " mongo-java-driver"
138
- - func : " set topology standalone"
139
- - func : " set version latest"
140
- - func : " fetch mongodb"
141
- - func : " run tests"
142
- - func : " attach junit results"
143
- - name : test-replica-set
144
- commands :
145
- - func : " fetch source"
146
- - command : git.apply_patch
147
- params :
148
- directory : " mongo-java-driver"
149
- - func : " set topology replica set"
150
- - func : " set version latest"
151
- - func : " fetch mongodb"
152
- - func : " run tests"
153
- - func : " attach junit results"
154
- - name : test-sharded
155
- commands :
156
- - func : " fetch source"
157
- - command : git.apply_patch
158
- params :
159
- directory : " mongo-java-driver"
160
- - func : " set topology sharded"
161
- - func : " set version latest"
162
95
- func : " fetch mongodb"
163
96
- func : " run tests"
164
97
- func : " attach junit results"
165
98
99
+
100
+ # ######################################
101
+ # Scripts #
102
+ # ######################################
103
+
166
104
scripts :
167
105
# # Scripts that are shared between buildvariants
168
106
scripts :
@@ -190,29 +128,83 @@ scripts:
190
128
./mongodb/bin/mongo $MONGO_SHELL_CONNECTION_FLAGS --eval 'printjson(db.adminCommand({getCmdLineOpts:1}))' admin
191
129
./mongodb/bin/mongo $MONGO_SHELL_CONNECTION_FLAGS --eval 'printjson(db.isMaster())' admin
192
130
131
+
193
132
# ######################################
194
- # Variants #
133
+ # Axes #
134
+ # ######################################
135
+
136
+ axes :
137
+ - id : mongodb_version
138
+ display_name : MongoDB Version
139
+ values :
140
+ - id : " 3.4"
141
+ display_name : " 3.4"
142
+ variables :
143
+ mongodb_full_version : " 3.4.0-rc0"
144
+ - id : " 3.2"
145
+ display_name : " 3.2"
146
+ variables :
147
+ mongodb_full_version : " 3.2.9"
148
+ - id : " 3.0"
149
+ display_name : " 3.0"
150
+ variables :
151
+ mongodb_full_version : " 3.0.11"
152
+ - id : " 2.6"
153
+ display_name : " 2.6"
154
+ variables :
155
+ mongodb_full_version : " 2.6.12"
156
+ - id : auth
157
+ display_name : Authentication
158
+ values :
159
+ - id : " enabled"
160
+ display_name : " Auth Enabled"
161
+ variables :
162
+ auth_uri_prefix : " bob:pwd123@"
163
+ orchestration_file : " auth.json"
164
+ - id : " disabled"
165
+ display_name : " Auth Disabled"
166
+ variables :
167
+ auth_uri_prefix : " "
168
+ orchestration_file : " basic.json"
169
+ - id : os
170
+ display_name : OS
171
+ values :
172
+ - id : ubuntu1604
173
+ display_name : Ubuntu 16.04
174
+ run_on : ubuntu1604-test
175
+ variables :
176
+ << : *start_topology_command
177
+ << : *mongo_orchestration_unix
178
+ mongo_url : " https://downloads.mongodb.org/linux/mongodb-linux-x86_64-${os}-${mongodb_full_version}.tgz"
179
+ - id : topology_type
180
+ display_name : Cluster Type
181
+ values :
182
+ - id : server
183
+ display_name : Standalone
184
+ variables :
185
+ hosts : " localhost:27017"
186
+ - id : replica_set
187
+ display_name : Replica Set
188
+ variables :
189
+ hosts : " localhost:27017,localhost:27018"
190
+ - id : sharded_cluster
191
+ display_name : Sharded
192
+ variables :
193
+ hosts : " localhost:27017"
194
+
195
+ # ######################################
196
+ # Variants #
195
197
# ######################################
196
198
197
199
buildvariants :
198
- - name : ubuntu-1604
199
- display_name : " Ubuntu-1604"
200
- expansions :
201
- << : *start_topology_command
202
- << : *mongo_url_ubuntu1604 # sets ${mongo_url_prefix}
203
- << : *mongo_orchestration_unix # sets start_topology and start_mongo_orchestration
204
- run_on :
205
- - ubuntu1604-test
206
- tasks :
207
- - name : compileAndAnalyze
208
- run_on :
209
- - ubuntu1604-build
210
- - name : test-standalone
211
- depends_on :
212
- - name : compileAndAnalyze
213
- - name : test-replica-set
214
- depends_on :
215
- - name : compileAndAnalyze
216
- - name : test-sharded
217
- depends_on :
218
- - name : compileAndAnalyze
200
+ - name : compile
201
+ display_name : " Compile and Analyze"
202
+ tasks :
203
+ - name : compileAndAnalyze
204
+ run_on :
205
+ - ubuntu1604-test
206
+ - matrix_name : " test"
207
+ matrix_spec : {os: "*", topology_type: "*", mongodb_version: ["3.2", "3.4"], auth: "*"}
208
+ display_name : " ${os} ${topology_type} ${mongodb_version} ${auth}"
209
+ tasks :
210
+ - name : test
0 commit comments