summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2018-06-05 10:12:58 -0400
committerMathew Robinson <chasinglogic@gmail.com>2018-06-06 16:41:23 -0400
commit0b001ed1ab7e8443213db38030cf17d2a6f5be2c (patch)
treef1a74d9f2baf0ef81aa225239dfee43591a1ef0d /buildscripts
parent92c61392d3a0a31c39b0ed0712d964503e6c0e27 (diff)
downloadmongo-0b001ed1ab7e8443213db38030cf17d2a6f5be2c.tar.gz
SERVER-33000 Add Ubuntu 18.04 support
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/package_test/.kitchen.yml5
-rw-r--r--buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb18
-rwxr-xr-xbuildscripts/packager.py3
3 files changed, 21 insertions, 5 deletions
diff --git a/buildscripts/package_test/.kitchen.yml b/buildscripts/package_test/.kitchen.yml
index 8a17e30d45d..b3d87242dde 100644
--- a/buildscripts/package_test/.kitchen.yml
+++ b/buildscripts/package_test/.kitchen.yml
@@ -85,6 +85,11 @@ platforms:
image_id: ami-64140d0e
transport:
username: ubuntu
+ - name: ubuntu1804
+ driver:
+ image_id: ami-7ad76705
+ transport:
+ username: ubuntu
transport:
ssh_key: ~/.ssh/kitchen.pem
diff --git a/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb b/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
index e25ccad379a..739cc951064 100644
--- a/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
+++ b/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
@@ -15,7 +15,7 @@ describe command("#{service} mongod start") do
its('exit_status') { should eq 0 }
end
-# Inspec treats all amazon linux as upstart, we explicitly make it use
+# Inspec treats all amazon linux as upstart, we explicitly make it use
# systemd_service https://github.com/chef/inspec/issues/2639
if (os[:name] == 'amazon' and os[:release] == '2.0')
describe systemd_service('mongod') do
@@ -145,10 +145,18 @@ if deb
it { should be_directory }
end
- describe user('mongodb') do
- it { should exist }
- its('groups') { should include 'mongodb' }
- its('shell') { should eq '/bin/false' }
+ if os[:release] == '18.04'
+ describe user('mongodb') do
+ it { should exist }
+ its('groups') { should include 'mongodb' }
+ its('shell') { should eq '/usr/sbin/nologin' }
+ end
+ else
+ describe user('mongodb') do
+ it { should exist }
+ its('groups') { should include 'mongodb' }
+ its('shell') { should eq '/bin/false' }
+ end
end
end
diff --git a/buildscripts/packager.py b/buildscripts/packager.py
index d0bd5423e71..1e6644690af 100755
--- a/buildscripts/packager.py
+++ b/buildscripts/packager.py
@@ -294,6 +294,8 @@ class Distro(object):
return "trusty"
elif build_os == 'ubuntu1604':
return "xenial"
+ elif build_os == 'ubuntu1804':
+ return "bionic"
else:
raise Exception("unsupported build_os: %s" % build_os)
elif self.dname == 'debian':
@@ -337,6 +339,7 @@ class Distro(object):
"ubuntu1204",
"ubuntu1404",
"ubuntu1604",
+ "ubuntu1804",
]
elif self.dname == 'debian':
return ["debian81", "debian92"]