Skip to content

Commit 94a7c15

Browse files
p-mongop
authored andcommitted
RUBY-1827 Use distribitions for which 4.2 server is built for testing in Evergreen (#1377)
1 parent de04efe commit 94a7c15

File tree

4 files changed

+55
-16
lines changed

4 files changed

+55
-16
lines changed

.evergreen/.evg.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ buildvariants:
655655
topology: "*"
656656
display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
657657
run_on:
658-
- ubuntu1404-test
658+
- rhel70-small
659659
tasks:
660660
- name: "test"
661661

@@ -668,7 +668,7 @@ buildvariants:
668668
topology: "*"
669669
display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
670670
run_on:
671-
- ubuntu1404-test
671+
- rhel70-small
672672
tasks:
673673
- name: "test"
674674

@@ -681,7 +681,7 @@ buildvariants:
681681
topology: "*"
682682
display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
683683
run_on:
684-
- ubuntu1404-test
684+
- rhel70-small
685685
tasks:
686686
- name: "test"
687687

@@ -694,7 +694,7 @@ buildvariants:
694694
topology: "*"
695695
display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
696696
run_on:
697-
- ubuntu1404-test
697+
- rhel70-small
698698
tasks:
699699
- name: "test"
700700

@@ -707,7 +707,7 @@ buildvariants:
707707
topology: "*"
708708
display_name: "${mongodb-version} ${topology} ${retry-reads} ${ruby}"
709709
run_on:
710-
- ubuntu1404-test
710+
- rhel70-small
711711
tasks:
712712
- name: "test"
713713

@@ -720,7 +720,7 @@ buildvariants:
720720
topology: [replica-set, sharded-cluster]
721721
display_name: "${mongodb-version} ${topology} ${retry-writes} ${ruby}"
722722
run_on:
723-
- ubuntu1404-test
723+
- rhel70-small
724724
tasks:
725725
- name: "test"
726726

@@ -733,7 +733,7 @@ buildvariants:
733733
topology: [replica-set, sharded-cluster]
734734
display_name: "${mongodb-version} ${topology} ${lint} ${ruby}"
735735
run_on:
736-
- ubuntu1404-test
736+
- rhel70-small
737737
tasks:
738738
- name: "test"
739739

@@ -746,7 +746,7 @@ buildvariants:
746746
topology: "*"
747747
display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
748748
run_on:
749-
- ubuntu1404-test
749+
- rhel70-small
750750
tasks:
751751
- name: "test"
752752

@@ -759,7 +759,7 @@ buildvariants:
759759
topology: "*"
760760
display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
761761
run_on:
762-
- ubuntu1404-test
762+
- rhel70-small
763763
tasks:
764764
- name: "test"
765765

@@ -773,7 +773,7 @@ buildvariants:
773773
compressor: 'zlib'
774774
display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
775775
run_on:
776-
- ubuntu1404-test
776+
- rhel70-small
777777
tasks:
778778
- name: "test"
779779

@@ -787,7 +787,7 @@ buildvariants:
787787
compressor: 'zlib'
788788
display_name: "${compressor} ${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
789789
run_on:
790-
- ubuntu1404-test
790+
- rhel70-small
791791
tasks:
792792
- name: "test"
793793

@@ -808,7 +808,7 @@ buildvariants:
808808
as: as
809809
display_name: "AS ${mongodb-version} ${topology} ${ruby}"
810810
run_on:
811-
- ubuntu1404-test
811+
- rhel70-small
812812
tasks:
813813
- name: "test"
814814

@@ -821,7 +821,7 @@ buildvariants:
821821
topology: replica-set
822822
display_name: "3.6 Replica Set with 3.4 FCV"
823823
run_on:
824-
- ubuntu1404-test
824+
- rhel70-small
825825
tasks:
826826
- name: "test"
827827

@@ -832,7 +832,7 @@ buildvariants:
832832
ruby: ["ruby-2.6", "ruby-2.5", "jruby-9.1", "jruby-9.2"]
833833
display_name: "Enterprise Auth Ubuntu ${ruby}"
834834
run_on:
835-
- ubuntu1404-test
835+
- ubuntu1604-test
836836
tasks:
837837
- name: "enterprise-auth-tests"
838838

.evergreen/evg-atlas.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ buildvariants:
431431
matrix_spec: { ruby: '*' }
432432
#matrix_spec: { }
433433
run_on:
434-
- ubuntu1404-test
434+
- ubuntu1604-test
435435
tasks:
436436
- name: "test"
437437

.evergreen/functions.sh

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
host_arch() {
2+
local arch
3+
arch=
4+
if test -f /etc/debian_version; then
5+
# Debian or Ubuntu
6+
if lsb_release -i |grep -q Debian; then
7+
release=`lsb_release -r |awk '{print $2}'`
8+
arch="debian$release"
9+
elif lsb_release -i |grep -q Ubuntu; then
10+
release=`lsb_release -r |awk '{print $2}' |tr -d .`
11+
arch="ubuntu$release"
12+
else
13+
echo 'Unknown Debian flavor' 1>&2
14+
return 1
15+
fi
16+
elif test -f /etc/redhat-release; then
17+
# RHEL or CentOS
18+
if lsb_release -i |grep -q RedHat; then
19+
release=`lsb_release -r |awk '{print $2}' |tr -d .`
20+
arch="rhel$release"
21+
else
22+
echo 'Unknown RHEL flavor' 1>&2
23+
return 1
24+
fi
25+
else
26+
echo 'Unknown distro' 1>&2
27+
return 1
28+
fi
29+
echo $arch
30+
}
31+
132
set_fcv() {
233
if test -n "$FCV"; then
334
mongo --eval 'assert.commandWorked(db.adminCommand( { setFeatureCompatibilityVersion: "'"$FCV"'" } ));' "$MONGODB_URI"
@@ -56,10 +87,14 @@ setup_ruby() {
5687
if ! test "$RVM_RUBY" = ruby-1.9; then
5788

5889
# For testing toolchains:
59-
toolchain_url=https://s3.amazonaws.com//mciuploads/mongo-ruby-toolchain/ubuntu1404/8cd47ac2cf636710740a6d79167f055e4c0a0154/mongo_ruby_driver_toolchain_ubuntu1404_patch_8cd47ac2cf636710740a6d79167f055e4c0a0154_5c452b76e3c3312273591db4_19_01_21_02_16_23.tar.gz
90+
toolchain_url=https://s3.amazonaws.com//mciuploads/mongo-ruby-toolchain/`host_arch`/741a9eba5788e6d5254a09319d7d237b40a9f4d6/mongo_ruby_driver_toolchain_`host_arch`_patch_741a9eba5788e6d5254a09319d7d237b40a9f4d6_5cfa8ad0d6d80a02bbb45be7_19_06_07_16_03_30.tar.gz
6091
curl -fL $toolchain_url |tar zxf -
6192
export PATH=`pwd`/rubies/$RVM_RUBY/bin:$PATH
6293

94+
# Attempt to get bundler to report all errors - so far unsuccessful
95+
#curl -o bundler-openssl.diff https://github.com/bundler/bundler/compare/v2.0.1...p-mongo:report-errors.diff
96+
#find . -path \*/lib/bundler/fetcher.rb -exec patch {} bundler-openssl.diff \;
97+
6398
else
6499

65100
# Normal operation
@@ -103,6 +138,8 @@ EOH
103138

104139
install_deps() {
105140
echo "Installing all gem dependencies"
141+
which bundle
142+
bundle --version
106143
bundle install
107144
bundle exec rake clean
108145
}

.evergreen/run-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ setup_ruby
2929
install_deps
3030

3131
echo "Running specs"
32+
which bundle
33+
bundle --version
3234
bundle exec rake spec:ci
3335
test_status=$?
3436
echo "TEST STATUS"

0 commit comments

Comments
 (0)