From 62d3a19758a6bd90c5b7c3f9eb5c091b61492114 Mon Sep 17 00:00:00 2001 From: Konrad Wrzos Date: Mon, 15 May 2023 16:00:59 +0200 Subject: [PATCH] Bumping clang version and fixing mongodb --- .../travis_ci_ubuntu_2204/recipes/default.rb | 2 +- .../travis_ci_ubuntu_2204/recipes/mongodb.rb | 15 +++++++++------ packer-assets/ci-ubuntu-2204-packages.txt | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb index 200d90366..0d1c48d9a 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/default.rb @@ -58,6 +58,7 @@ #include_recipe 'travis_build_environment::redis' # include_recipe 'travis_build_environment::mongodb' include_recipe 'memcached' +include_recipe '::mongodb' # TODO: Uncomment when cassandra works on Java 8 again # https://github.com/travis-ci/packer-templates/issues/589 # include_recipe 'travis_build_environment::cassandra' @@ -73,7 +74,6 @@ if node['kernel']['machine'] != 'aarch64' include_recipe '::erlang' # include_recipe '::couchdb' - # include_recipe '::mongodb' include_recipe '::mysql' include_recipe '::postgresql' # include_recipe 'travis_build_environment::couchdb' diff --git a/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb b/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb index 94c79ce2d..8c1836474 100644 --- a/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb +++ b/cookbooks/travis_ci_ubuntu_2204/recipes/mongodb.rb @@ -1,19 +1,22 @@ # frozen_string_literal: true execute 'add_mongodb_gpg_key' do - command 'sudo wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -' + 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' end execute 'add_mongodb_repository' do - 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' + 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' end -apt_update +execute 'update_repositories' do + command 'sudo apt-get update -y' +end -package 'mongodb' do +package 'mongodb-org' do action :install end -service 'mongodb' do - action [:disable, :stop] +service 'mongod' do + action %i[stop disable] + not_if { node['travis_build_environment']['mongodb']['service_enabled'] } end diff --git a/packer-assets/ci-ubuntu-2204-packages.txt b/packer-assets/ci-ubuntu-2204-packages.txt index dc3ecd8c9..9a1162737 100644 --- a/packer-assets/ci-ubuntu-2204-packages.txt +++ b/packer-assets/ci-ubuntu-2204-packages.txt @@ -121,6 +121,7 @@ libltdl-dev libmcrypt-dev libmhash-dev libmysqlclient-dev +libncurses5 libncurses5-dev libncursesw5-dev libossp-uuid-dev