Skip to content

Commit

Permalink
Update supported platforms
Browse files Browse the repository at this point in the history
- Default to MariaDB 11.6 from 10.3
- Update URI for yum and apt repos and GPG keys

Signed-off-by: Lance Albertson <[email protected]>
  • Loading branch information
ramereth committed Nov 15, 2024
1 parent a7d37dd commit 7f4475b
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 127 deletions.
100 changes: 34 additions & 66 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,89 +22,57 @@ jobs:
matrix:
os:
- almalinux-8
# - amazonlinux-2023
- centos-7
- centos-stream-8
- debian-10
- almalinux-9
- amazonlinux-2023
- centos-stream-9
- debian-11
- debian-12
- rockylinux-8
- ubuntu-1804
- rockylinux-9
- ubuntu-2004
# Latest fedora (38 at time of writing) does not have any mariadb packages yet
# - fedora-latest
- ubuntu-2204
- ubuntu-2404
suite:
- "repository"
- "repository-10"
- "client-install"
- "client-install-10"
- "client-distro-install"
- "server-install"
- "server-install-1011"
- "server-install-10"
- "server-distro-install"
- "configuration"
- "server-configuration"
- "server-configuration-1011"
- "server-configuration-10"
- "resources"
- "resources-1011"
- "resources-10"
- "replication"
- "replication-1011"
- "replication-10"
- "datadir"
- "datadir-1011"
- "datadir-10"
- "port"
- "port-1011"
- "port-10"
- "galera-configuration"
- "galera-configuration-1011"
- "galera-configuration-10"
exclude:
- os: ubuntu-1804
suite: "server-install-1011"
- os: ubuntu-1804
suite: "server-configuration-1011"
- os: ubuntu-1804
suite: "resources-1011"
- os: ubuntu-1804
suite: "replication-1011"
- os: ubuntu-1804
suite: "datadir-1011"
- os: ubuntu-1804
suite: "port-1011"
- os: ubuntu-1804
suite: "galera-configuration-1011"
- os: centos-7
suite: "server-install-1011"
- os: centos-7
suite: "server-configuration-1011"
- os: centos-7
suite: "resources-1011"
- os: centos-7
suite: "replication-1011"
- os: centos-7
suite: "datadir-1011"
- os: centos-7
suite: "port-1011"
- os: centos-7
suite: "galera-configuration-1011"
- os: debian-11
suite: "repository"
- os: debian-11
suite: "client-install"
- os: debian-11
suite: "client-distro-install"
- os: debian-11
suite: "server-install"
- os: debian-11
suite: "server-distro-install"
- os: debian-11
suite: "configuration"
- os: debian-11
suite: "server-configuration"
- os: debian-11
suite: "resources"
- os: debian-11
suite: "replication"
- os: debian-11
suite: "datadir"
- os: debian-11
suite: "port"
- os: debian-11
suite: "galera-configuration"
- os: amazonlinux-2023
suite: repository-10
- os: amazonlinux-2023
suite: client-install-10
- os: amazonlinux-2023
suite: server-install-10
- os: amazonlinux-2023
suite: server-configuration-10
- os: amazonlinux-2023
suite: resources-10
- os: amazonlinux-2023
suite: replication-10
- os: amazonlinux-2023
suite: datadir-10
- os: amazonlinux-2023
suite: port-10
- os: amazonlinux-2023
suite: galera-configuration-10
fail-fast: false

steps:
Expand Down
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

## 5.5.5 - *2024-07-15*

Standardise files with files in sous-chefs/repo-management
- Update supported platforms
- Default to MariaDB 11.6 from 10.3
- Update URI for yum and apt repos and GPG keys

Standardise files with files in sous-chefs/repo-management
## 5.5.5 - *2024-07-15*

Standardise files with files in sous-chefs/repo-management
- Standardise files with files in sous-chefs/repo-management

## 5.5.4 - *2024-05-06*

Expand Down
80 changes: 31 additions & 49 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,40 @@ verifier:

platforms:
- name: almalinux-8
# - name: amazonlinux-2023
- name: debian-10
- name: almalinux-9
- name: amazonlinux-2023
- name: centos-stream-9
- name: debian-11
- name: centos-7
- name: centos-stream-8
# - name: fedora-latest
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: debian-12
- name: rockylinux-8
- name: rockylinux-9
- name: ubuntu-20.04
- name: ubuntu-22.04
- name: ubuntu-24.04

suites:
- name: repository
run_list:
- recipe[test::repository]
excludes:
- debian-11
- name: repository-10
run_list:
- recipe[test::repository]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/repository
- name: client_install
run_list:
- recipe[test::client_install]
excludes:
- debian-11
- name: client_install-10
run_list:
- recipe[test::client_install]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/client_install
- name: client_distro_install
run_list:
- recipe[test::client_distro_install]
Expand All @@ -46,114 +59,83 @@ suites:
- recipe[test::server_install]
excludes:
- debian-11
- name: server_install_10.11
- name: server_install-10
run_list:
- recipe[test::server_install]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/server_install
excludes:
- ubuntu-18.04
- centos-7
- name: server_distro_install
run_list:
- recipe[test::server_distro_install]
- name: configuration
run_list:
- recipe[test::configuration]
excludes:
- debian-11
- name: server_configuration
run_list:
- recipe[test::server_configuration]
excludes:
- debian-11
- name: server_configuration_10.11
- name: server_configuration_10
run_list:
- recipe[test::server_configuration]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/server_configuration
excludes:
- ubuntu-18.04
- centos-7
- name: resources
run_list:
- recipe[test::user_database]
excludes:
- debian-11
- name: resources_10.11
- name: resources_10
run_list:
- recipe[test::user_database]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/resources
excludes:
- ubuntu-18.04
- centos-7
- name: replication
run_list:
- recipe[test::replication]
excludes:
- debian-11
- name: replication_10.11
- name: replication_10
run_list:
- recipe[test::replication]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/replication
excludes:
- ubuntu-18.04
- centos-7
- name: datadir
run_list:
- recipe[test::datadir]
excludes:
- debian-11
- name: datadir_10.11
- name: datadir_10
run_list:
- recipe[test::datadir]
verifier:
inspec_tests:
- path: test/integration/datadir
excludes:
- ubuntu-18.04
- centos-7
- name: port
run_list:
- recipe[test::port]
excludes:
- debian-11
- name: port_10.11
- name: port_10
run_list:
- recipe[test::port]
verifier:
inspec_tests:
- path: test/integration/port
excludes:
- ubuntu-18.04
- centos-7
- name: galera_configuration
run_list:
- recipe[test::galera_configuration]
excludes:
- debian-11
- name: galera_configuration_10.11
- name: galera_configuration_10
run_list:
- recipe[test::galera_configuration]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/galera_configuration
excludes:
- ubuntu-18.04
- centos-7
8 changes: 4 additions & 4 deletions resources/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
provides :mariadb_repository
unified_mode true

property :version, String, default: '10.3'
property :version, String, default: '11.6'
property :enable_mariadb_org, [true, false], default: true
property :yum_gpg_key_uri, String, default: 'https://yum.mariadb.org/RPM-GPG-KEY-MariaDB'
property :yum_gpg_key_uri, String, default: 'https://mirror.mariadb.org/yum/RPM-GPG-KEY-MariaDB'
property :apt_gpg_keyserver, String, default: 'keyserver.ubuntu.com'
property :apt_gpg_key, String, default: lazy {
if node['lsb']['codename'] == 'buster' || node['lsb']['codename'] == 'buster/sid'
Expand All @@ -32,7 +32,7 @@
end
}
property :apt_key_proxy, [String, false], default: false
property :apt_repository_uri, String, default: 'http://mariadb.mirrors.ovh.net/MariaDB/repo'
property :apt_repository_uri, String, default: 'https://mirror.mariadb.org/repo'

action :add do
case node['platform_family']
Expand All @@ -52,7 +52,7 @@
yum_repository "MariaDB #{new_resource.version}" do
repositoryid "mariadb#{new_resource.version}"
description "MariaDB.org #{new_resource.version}"
baseurl yum_repo_url('http://yum.mariadb.org')
baseurl yum_repo_url('https://mirror.mariadb.org/yum')
enabled new_resource.enable_mariadb_org
options opts
gpgcheck true
Expand Down
2 changes: 1 addition & 1 deletion test/cookbooks/test/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Which default MariaDB version to use for testing (can be overridden in kitchen.yml)
default['mariadb_server_test_version'] = '10.3'
default['mariadb_server_test_version'] = '11.6'
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
version = file('/tmp/mariadb_version').content

describe command('/usr/bin/mysql -V') do
its('stdout') { should match(%r{\/usr\/bin\/mysql Ver 15\.1 Distrib #{version}\.\d+-MariaDB}) }
case version.to_i
when 11
its('stdout') { should match(/mysql from #{version}\.\d+-MariaDB, client 15.2/) }
else
its('stdout') { should match(%r{\/usr\/bin\/mysql Ver 15\.1 Distrib #{version}\.\d+-MariaDB}) }
end
its('exit_status') { should eq 0 }
end
2 changes: 1 addition & 1 deletion test/integration/repository/controls/repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version = file('/tmp/mariadb_version').content

if os.debian?
describe apt("http://mariadb.mirrors.ovh.net/MariaDB/repo/#{version}/#{os.name}") do
describe apt("https://mirror.mariadb.org/repo/#{version}/#{os.name}") do
it { should exist }
it { should be_enabled }
end
Expand Down

0 comments on commit 7f4475b

Please sign in to comment.