Skip to content

Commit 80a2100

Browse files
authored
Merge pull request #2085 from travis-ci/kw-new_mariadb
New MariaDB repository
2 parents ff7b8d9 + 75a0b55 commit 80a2100

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/travis/build/addons/mariadb.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class Mariadb < Base
99

1010
MARIADB_GPG_KEY_OLD = '0xcbcb082a1bb943db'
1111
MARIADB_GPG_KEY_NEW = '0xf1656f24c74cd1d8'
12-
MARIADB_MIRROR = 'nyc2.mirrors.digitalocean.com'
12+
# Archive mirror contains more versions than the main mirror, so we use it by default
13+
MARIADB_MIRROR = 'archive.mariadb.org'
1314

1415
def after_prepare
1516
sh.fold 'mariadb' do
@@ -21,7 +22,7 @@ def after_prepare
2122
sh.else do
2223
sh.cmd "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 #{MARIADB_GPG_KEY_NEW}", sudo: true
2324
end
24-
sh.cmd 'add-apt-repository --yes "deb http://%p/mariadb/repo/%p/ubuntu $TRAVIS_DIST main"' % [MARIADB_MIRROR, mariadb_version], sudo: true
25+
sh.cmd 'add-apt-repository --yes "deb http://%p/mariadb-%p/repo/ubuntu/ "$TRAVIS_DIST" main"' % [MARIADB_MIRROR, mariadb_version], sudo: true
2526
sh.cmd 'travis_apt_get_update', retry: true, echo: true
2627
sh.cmd "PACKAGES='mariadb-server-#{mariadb_version}'", echo: true
2728
sh.cmd "if [[ $(lsb_release -cs) = 'precise' ]]; then PACKAGES=\"${PACKAGES} libmariadbclient-dev\"; fi", echo: true

spec/build/addons/mariadb_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
it { should include_sexp [:cmd, "service mysql stop", sudo: true] }
2323
it { should include_sexp [:cmd, "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 #{Travis::Build::Addons::Mariadb::MARIADB_GPG_KEY_OLD}", sudo: true] }
24-
it { should include_sexp [:cmd, 'add-apt-repository --yes "deb http://%p/mariadb/repo/%p/ubuntu $TRAVIS_DIST main"' % [Travis::Build::Addons::Mariadb::MARIADB_MIRROR, config], sudo: true] }
24+
it { should include_sexp [:cmd, 'add-apt-repository --yes "deb http://%p/mariadb-%p/repo/ubuntu/ "$TRAVIS_DIST" main"' % [Travis::Build::Addons::Mariadb::MARIADB_MIRROR, config], sudo: true] }
2525
it { should include_sexp [:cmd, 'travis_apt_get_update', retry: true, echo: true] }
2626
it { should include_sexp [:cmd, "PACKAGES='mariadb-server-10.0'", echo: true] }
2727
it { should include_sexp [:cmd, "rm -rf /var/lib/mysql", sudo: true] }

0 commit comments

Comments
 (0)