Skip to content

Commit 651d41f

Browse files
committed
Adding MongoDB for Jammy
1 parent 6ec8e02 commit 651d41f

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

cookbooks/travis_ci_ubuntu_2204/recipes/default.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#include_recipe 'travis_build_environment::redis'
5959
# include_recipe 'travis_build_environment::mongodb'
6060
include_recipe 'memcached'
61+
include_recipe '::mongodb'
6162
# TODO: Uncomment when cassandra works on Java 8 again
6263
# https://github.com/travis-ci/packer-templates/issues/589
6364
# include_recipe 'travis_build_environment::cassandra'
@@ -73,7 +74,6 @@
7374
if node['kernel']['machine'] != 'aarch64'
7475
include_recipe '::erlang'
7576
# include_recipe '::couchdb'
76-
# include_recipe '::mongodb'
7777
include_recipe '::mysql'
7878
include_recipe '::postgresql'
7979
# include_recipe 'travis_build_environment::couchdb'
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
# frozen_string_literal: true
22

33
execute 'add_mongodb_gpg_key' do
4-
command 'sudo wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -'
4+
command 'sudo wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor | sudo tee /usr/share/keyrings/mongodb.gpg > /dev/null'
55
end
66

77
execute 'add_mongodb_repository' do
8-
command 'sudo echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list'
8+
command 'sudo echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list'
99
end
1010

11-
apt_update
11+
execute 'update_repositories' do
12+
command 'sudo apt-get update -y'
13+
end
1214

13-
package 'mongodb' do
15+
package 'mongodb-org' do
1416
action :install
1517
end
1618

17-
service 'mongodb' do
18-
action [:disable, :stop]
19+
service 'mongod' do
20+
action %i[stop disable]
21+
not_if { node['travis_build_environment']['mongodb']['service_enabled'] }
1922
end

0 commit comments

Comments
 (0)