1
- # Evergreen CI configuration
2
- # Derived from sample at https://github.com/evergreen-ci/evergreen/blob/master/config_dev/project/sample.yml
1
+ # ######################################################################################
2
+ # Compass Evergreen CI configuration
3
+ #
4
+ # References:
5
+ # https://github.com/evergreen-ci/evergreen/wiki/Project-Files
6
+ # https://github.com/evergreen-ci/evergreen/blob/master/config_dev/project/sample.yml
7
+ # ######################################################################################
3
8
4
9
stepback : false
5
10
@@ -21,95 +26,120 @@ functions:
21
26
- command : git.apply_patch
22
27
params :
23
28
directory : src
24
- " upgrade npm" :
29
+
30
+ " fetch npm tarball" :
25
31
- command : shell.exec
26
32
params :
27
33
working_dir : src
28
34
script : |
29
- set -o errexit
30
- set -o verbose
31
- export PATH="$PATH:${node_path|}"
32
- test -n "${add_environment|}" && export "${add_environment|}"
35
+ mkdir .deps
36
+ - command : s3.get
37
+ params :
38
+ aws_key : ${aws_key_evergreen_integrations}
39
+ aws_secret : ${aws_secret_evergreen_integrations}
40
+ bucket : mongodb-dx-public
41
+ remote_file : evergreen-deps/${fetch_npm_tarball}
42
+ local_file : src/.deps/${fetch_npm_tarball}
43
+ - command : shell.exec
44
+ params :
45
+ working_dir : src/.deps
46
+ script : |
47
+ set -ev
48
+ tar xzf ${fetch_npm_tarball} --strip-components=1
49
+ ls
33
50
51
+ # THIS COMMAND WORKS ON WINDOWS ONLY, SHOULD BE CONSIDERED OBSOLETE
52
+ " upgrade npm windows" :
53
+ - command : shell.exec
54
+ params :
55
+ working_dir : src
56
+ script : |
57
+ set -ev
58
+ test -n "${add_environment|}" && export "${add_environment|}"
59
+ export PATH="$PATH:${node_path|}"
34
60
if [ -z "${npm_version|}" ]
35
61
then
36
62
echo "upgrade_npm: npm_version is unset; skipping"
37
63
exit 0
38
64
fi
39
65
${npm|npm} install -g npm@${npm_version|xx}
66
+
40
67
" npm install" :
41
68
- command : shell.exec
42
69
params :
43
70
working_dir : src
44
71
script : |
45
- set -v -e
46
- export PATH="$PATH:${node_path|}"
72
+ set -ev
47
73
test -n "${add_environment|}" && export "${add_environment|}"
74
+ export PATH="$PATH:${node_path|}"
48
75
export PATH="`npm -g bin`:$PATH"
49
76
${node|node} --version
50
77
${npm|npm} --version
78
+ ${npm|npm} config set loglevel error
79
+ ${npm|npm} config -g list -l
51
80
${npm|npm} install
52
- " npm test" :
53
- - command : shell.exec
54
- params :
55
- working_dir : src
56
- script : |
57
- set -v -e
58
- export PATH="$PATH:${node_path|}"
59
- test -n "${add_environment|}" && export "${add_environment|}"
60
- export PATH="`npm -g bin`:$PATH"
61
- ${npm|npm} run test
62
- " npm check" :
81
+
82
+ " build" :
63
83
- command : shell.exec
64
84
params :
65
85
working_dir : src
66
86
script : |
67
- set -v -e
68
- export PATH="$PATH:${node_path|}"
87
+ set -ev
69
88
test -n "${add_environment|}" && export "${add_environment|}"
70
- export PATH="`npm -g bin`:$PATH"
71
- ${npm|npm} run check
72
- " npm release" :
73
- - command : shell.exec
74
- params :
75
- working_dir : src
76
- script : |
77
- set -v -e
78
89
export PATH="$PATH:${node_path|}"
79
- test -n "${add_environment|}" && export "${add_environment|}"
80
90
export PATH="`npm -g bin`:$PATH"
91
+ ${npm|npm} run ci
92
+ ${npm|npm} run test
81
93
${npm|npm} run release
82
94
95
+ " save release " :
96
+ - command : s3.put
97
+ params :
98
+ aws_key : ${aws_key}
99
+ aws_secret : ${aws_secret}
100
+ local_file : " src/dist/${installer_filename}"
101
+ remote_file : " mongodbjs-scout-master/${build_variant}/${revision}/${installer_filename}"
102
+ bucket : mciuploads
103
+ permissions : public-read
104
+ content_type : ${installer_content_type|application/octet-stream}
105
+ display_name : " Installer: ${installer_filename}"
106
+
83
107
# ######################################
84
108
# Tasks #
85
109
# ######################################
86
110
111
+ # FIXME: simplify to one "compile" task as soon as we can hammer out the irregularities
112
+ # between the platforms:
113
+ # - one way of installing Node
114
+ # - build artifacts for all platforms
115
+
87
116
tasks :
88
- - name : compile
117
+ - name : compile_osx
89
118
depends_on : []
90
119
commands :
91
120
- func : " fetch source"
92
- - func : " upgrade npm"
121
+ - func : " fetch npm tarball "
93
122
- func : " npm install"
94
- - func : " npm test"
95
- # - func: "npm check"
96
- - func : " npm release"
97
- - command : s3.put
98
- params :
99
- aws_key : ${aws_key}
100
- aws_secret : ${aws_secret}
101
- local_file : " src/dist/${installer_filename}"
102
- remote_file : " mongodbjs-scout-master/${build_variant}/${revision}/${installer_filename}"
103
- bucket : mciuploads
104
- permissions : public-read
105
- content_type : ${installer_content_type|application/octet-stream}
106
- display_name : " Installer: ${installer_filename}"
107
-
108
- # - name: test
109
- # depends_on:
110
- # - name: compile
111
- # commands:
112
- # - func: "npm test"
123
+ - func : " build"
124
+ - func : " save release"
125
+
126
+ - name : compile_windows
127
+ depends_on : []
128
+ commands :
129
+ - func : " fetch source"
130
+ - func : " upgrade npm windows"
131
+ - func : " npm install"
132
+ - func : " build"
133
+ - func : " save release"
134
+
135
+ - name : compile_linux
136
+ depends_on : []
137
+ commands :
138
+ - func : " fetch source"
139
+ - func : " fetch npm tarball"
140
+ - func : " npm install"
141
+ - func : " build"
142
+ # - func: "save release"
113
143
114
144
115
145
# ######################################
@@ -123,14 +153,13 @@ buildvariants:
123
153
run_on :
124
154
- " osx-108"
125
155
expansions :
126
- add_environment : " SCOUT_INSTALLER_UNSIGNED=1 "
127
- node_path : /opt/node/ bin
156
+ fetch_npm_tarball : node-v0.12.7-npm-3.3.5-darwin-x64.tgz
157
+ node_path : " $(pwd)/.deps/ bin"
128
158
installer_content_type : " application/x-apple-diskimage"
129
159
installer_filename : " MongoDB Compass.dmg"
130
160
num_cores : $(sysctl -n hw.logicalcpu)
131
161
tasks :
132
- - name : compile
133
- # - name: test
162
+ - name : compile_osx
134
163
135
164
- name : windows-64
136
165
display_name : Windows 64-bit
@@ -139,28 +168,23 @@ buildvariants:
139
168
- " windows-64-vs2013-test"
140
169
expansions :
141
170
add_environment : " APPDATA=C:\\ Program Files (x86)\\ nodejs\\ node_modules"
171
+ npm_version : " 3"
142
172
node_path : " /cygdrive/c/Program Files (x86)/nodejs"
143
173
installer_content_type : " application/octet-stream"
144
174
installer_filename : " MongoDBCompassSetup.exe"
145
- exe : " .exe"
146
- npm_version : " 3"
147
175
num_cores : $(grep -c ^processor /proc/cpuinfo)
148
176
tasks :
149
- - name : compile
150
- # - name: test
151
-
152
- # # ubuntu buildvariant is ready to go when we're ready to add tasks/linux.js
153
-
154
- # - name: ubuntu
155
- # display_name: Ubuntu
156
- # modules: ~
157
- # run_on:
158
- # - "ubuntu1404-test"
159
- # expansions:
160
- # add_environment: ""
161
- # node_path: "/opt/node/bin"
162
- # compile_env: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++
163
- # num_cores: $(grep -c ^processor /proc/cpuinfo)
164
- # tasks:
165
- # - name: compile
166
- # # - name: test
177
+ - name : compile_windows
178
+
179
+ - name : ubuntu
180
+ display_name : Ubuntu 14.04
181
+ modules : ~
182
+ run_on :
183
+ - " ubuntu1404-test"
184
+ expansions :
185
+ fetch_npm_tarball : node-v0.12.7-npm-3.3.5-linux-x64.tar.gz
186
+ node_path : " $(pwd)/.deps/bin"
187
+ compile_env : CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++
188
+ num_cores : $(grep -c ^processor /proc/cpuinfo)
189
+ tasks :
190
+ - name : compile_linux
0 commit comments