Skip to content

Commit 998dd42

Browse files
committed
CDRIVER-667: make dist on Evergreen
A dedicated task that creates a full release archive by running `make dist`, once. This archive is then uploaded as an artifact for the subsequent compile and test tasks for the rest of the variants. Note that all compile steps now depend on this task.
1 parent f48f148 commit 998dd42

File tree

2 files changed

+67
-7
lines changed

2 files changed

+67
-7
lines changed

.mci.yml

Lines changed: 65 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ c_driver_variables:
2020
- name: "integration-test-latest"
2121
- name: "integration-test-latest-with-MMAPv1"
2222

23+
release_archive: &release_archive_builder
24+
- name: "releasearchive"
25+
2326
topology_test_list: &topology_tests
2427
- name: "compile"
2528
- name: "integration-test-2.4"
@@ -114,11 +117,15 @@ c_driver_variables:
114117
mongo-orchestration --pidfile c:\\mo.pid stop
115118
rm -f $pidfile
116119
fi
120+
ls -la
117121
fsutil volume diskfree c:
118122
echo "Starting Mongo Orchestration..."
119123
echo "{ \"releases\": { \"default\": \"c:\\\\mongodb\\\\bin\" }}" > orchestration.config
120124
mongo-orchestration -f orchestration.config -e default -s wsgiref start --socket-timeout-ms=60000 --bind=127.0.0.1 --enable-majority-read-concern --pidfile c:\\mo.pid
121125
sleep 10
126+
cat c:\\mo.pid
127+
cat orchestration.config
128+
cat server.log
122129
curl -s http://localhost:8889/
123130
unix: &mongo_orchestration_unix
124131
start_mongo_orchestration: |
@@ -131,6 +138,7 @@ c_driver_variables:
131138
rm -f $pidfile
132139
fi
133140
df -h
141+
ls -la
134142
echo "Starting Mongo Orchestration..."
135143
echo "{ \"releases\": { \"default\": \"`pwd`/mongodb/bin\" } }" > orchestration.config
136144
TMPDIR=/data/db mongo-orchestration -f orchestration.config -e default start --socket-timeout-ms=60000 --bind=127.0.0.1 --enable-majority-read-concern --pidfile $pidfile
@@ -147,7 +155,7 @@ c_driver_variables:
147155
compile_script: |
148156
set -o errexit
149157
set -o verbose
150-
./autogen.sh --enable-optimizations --enable-man-pages --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
158+
./configure --enable-optimizations --enable-man-pages --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
151159
make -j8
152160
solaris64: &compile_solaris64
153161
compile_script: |
@@ -156,13 +164,13 @@ c_driver_variables:
156164
sudo /opt/csw/bin/pkgutil -y -i sasl_dev
157165
export SASL_CFLAGS="-I/opt/csw/include/"
158166
export SASL_LIBS="-L/opt/csw/lib/amd64/ -lsasl2"
159-
./autogen.sh --enable-optimizations --enable-man-pages --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
167+
./configure --enable-optimizations --enable-man-pages --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
160168
make
161169
solaris: &compile_solaris
162170
compile_script: |
163171
set -o errexit
164172
set -o verbose
165-
./autogen.sh --enable-optimizations --enable-man-pages --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
173+
./configure --enable-optimizations --enable-man-pages --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
166174
make
167175
msvc: &compile_msvc
168176
compile_script: |
@@ -171,9 +179,6 @@ c_driver_variables:
171179
set -o verbose
172180
cmake="/cygdrive/c/cmake/bin/cmake"
173181
dumpbin="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/dumpbin.exe"
174-
# In Autotools builds, autogen.sh does this, we must do it here.
175-
git submodule init
176-
git submodule update
177182
cd src/libbson
178183
echo "GENERATOR: $GENERATOR, CMAKE_DEFS: $CMAKE_DEFS"
179184
"$cmake" -G "$GENERATOR" "-DCMAKE_INSTALL_PREFIX=C:/mongo-c-driver"
@@ -311,6 +316,19 @@ c_driver_variables:
311316
#######################################
312317

313318
functions:
319+
"fetch releasearchive" :
320+
command: shell.exec
321+
params:
322+
script: |
323+
set -o verbose
324+
set -o errexit
325+
rm -rf mongo-c-driver*
326+
ls -la
327+
curl -s https://s3.amazonaws.com/mciuploads/mongo-c-driver/${revision}/${version_id}/artifacts/mongo-c-driver-archive.tar.gz --output mongo-c-driver-archive.tar.gz
328+
tar zxvf mongo-c-driver-archive.tar.gz
329+
rm mongo-c-driver-archive.tar.gz
330+
mv mongo-c-driver* mongo-c-driver
331+
314332
"fetch source" :
315333
command: git.get_project
316334
params:
@@ -323,6 +341,7 @@ functions:
323341
script: |
324342
set -o verbose
325343
set -o errexit
344+
ls -la
326345
curl -s ${mongo_url} --output mongo-archive.${ext|tgz}
327346
${decompress} mongo-archive.${ext|tgz}
328347
mv mongodb* mongodb
@@ -347,6 +366,7 @@ functions:
347366
script: |
348367
set -o verbose
349368
set -o errexit
369+
ls -la
350370
curl http://s3.amazonaws.com/mciuploads/mongo-c-driver/${build_variant}/${revision}/artifacts/mongo-${build_id}.tar.gz -o ${build_id}.tar.gz --silent --max-time 120
351371
tar -xzf ${build_id}.tar.gz
352372
@@ -527,12 +547,40 @@ post:
527547
#######################################
528548

529549
tasks:
530-
- name: compile
550+
- name: releasearchive
531551
commands:
532552
- func: "fetch source"
533553
- command: git.apply_patch
534554
params:
535555
directory: "mongo-c-driver"
556+
- command: shell.exec
557+
params:
558+
working_dir: "mongo-c-driver"
559+
script: |
560+
set -o errexit
561+
set -o verbose
562+
sudo apt-get update
563+
sudo apt-get install -y yelp-tools yelp-xsl
564+
./autogen.sh --enable-man-pages --enable-html-docs --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
565+
make dist
566+
mv mongo-c-driver*.tar.gz ../mongo-c-driver-archive.tar.gz
567+
ls -la
568+
- command: s3.put
569+
params:
570+
aws_key: ${aws_key}
571+
aws_secret: ${aws_secret}
572+
local_file: mongo-c-driver-archive.tar.gz
573+
remote_file: mongo-c-driver/${revision}/${version_id}/artifacts/mongo-c-driver-archive.tar.gz
574+
bucket: mciuploads
575+
permissions: public-read
576+
content_type: ${content_type|application/x-gzip}
577+
578+
- name: compile
579+
depends_on:
580+
- name: "releasearchive"
581+
variant: ubuntu-1404-64-release
582+
commands:
583+
- func: "fetch releasearchive"
536584
- func: "compile function"
537585
- command: shell.exec
538586
params:
@@ -889,6 +937,16 @@ buildvariants:
889937
# - rhel55-test
890938
# tasks: *topology_tests
891939

940+
- name: ubuntu-1404-64-release
941+
display_name: "Release Archive Creator"
942+
expansions:
943+
<<: *cflags_64
944+
<<: *mongo_url_ubuntu1404
945+
<<: *unix_common
946+
run_on:
947+
- ubuntu1404-build
948+
tasks: *release_archive_builder
949+
892950
## Ubuntu 1204
893951

894952
- name: ubuntu-1204-64

Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ EXTRA_DIST += \
5050
VERSION_CURRENT \
5151
VERSION_RELEASED
5252

53+
EXTRA_DIST += $(wildcard orchestration_configs/*/*)
54+
5355
dist-hook:
5456
@if test -d "$(srcdir)/.git"; then \
5557
(cd "$(srcdir)" && \

0 commit comments

Comments
 (0)