Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdksync - update os support and workflow/testing environment #15

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
puppet_version: [7]

name: Check / Puppet ${{ matrix.puppet_version }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container: puppet/pdk:latest

steps:
Expand All @@ -39,11 +39,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['rocky8', 'ub2204', 'deb11']
os: ['rocky8', 'ub2004', 'ub2204', 'ub2404', 'deb11', 'deb12']
puppet_version: [7]

name: Acceptance / ${{ matrix.os }} / Puppet ${{ matrix.puppet_version }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs:
- check

Expand Down
10 changes: 10 additions & 0 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
group => $nextcloud::system_group,
}

if ($facts['os']['family'] == 'Debian') or ($facts['os']['family'] == 'Ubuntu') {
file { '/var/db':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
before => File['Create data statefile'],
}
}

# Record Nextcloud's datadirectory, so that it can be used by the custom fact.
file { 'Create data statefile':
ensure => file,
Expand Down
6 changes: 4 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"11"
"11",
"12"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"20.04",
"22.04"
"22.04",
"24.04"
]
},
{
Expand Down
16 changes: 11 additions & 5 deletions provision.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
---
default:
provisioner: docker_exp
images: ['waffleimage/centos7']
images: ['litmusimage/rockylinux:8']
vagrant:
provisioner: vagrant
images: ['centos/7', 'generic/ubuntu2004']
images: ['centos/8', 'generic/ubuntu2404']

deb_all:
provisioner: docker
images: ['litmusimage/debian:10', 'litmusimage/debian:11']
images: ['litmusimage/debian:11', 'litmusimage/debian:12']
el_all:
provisioner: docker
images: ['litmusimage/centos:7', 'litmusimage/centos:8']
images: ['litmusimage/centos:7', 'litmusimage/rockylinux:8']
# The most reliable workaround for the docker/systemd incompatibility.
# see https://github.com/docker/for-linux/issues/835
# see https://github.com/moby/moby/issues/38749
vars: '{docker_run_opts: ["-v /sys/fs/cgroup:/sys/fs/cgroup:ro"]}'
ub_all:
provisioner: docker
images: ['litmusimage/ubuntu:20.04', 'litmusimage/ubuntu:22.04']
images: ['litmusimage/ubuntu:20.04', 'litmusimage/ubuntu:22.04', 'litmusimage/ubuntu:24.04']

gha_deb10:
provisioner: docker
images: ['litmusimage/debian:10']
gha_deb11:
provisioner: docker
images: ['litmusimage/debian:11']
gha_deb12:
provisioner: docker
images: ['litmusimage/debian:12']
gha_el7:
provisioner: docker
images: ['litmusimage/centos:7']
Expand Down Expand Up @@ -53,3 +56,6 @@ gha_ub2004:
gha_ub2204:
provisioner: docker
images: ['litmusimage/ubuntu:22.04']
gha_ub2404:
provisioner: docker
images: ['litmusimage/ubuntu:24.04']
95 changes: 83 additions & 12 deletions spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ def create_remote_file(name, dest_filepath, file_content)
path: "common.yaml"
EOS

# rubocop:disable all
hiera_data_content = if os[:family].eql?('debian')
<<-EOS
if os[:family].eql?('debian')
if os[:release].to_i == 11
hiera_data_content = <<-EOS
---
# Created by puppet litmus
php::composer: true
php::extensions:
bcmath: {}
Expand All @@ -55,11 +54,60 @@ def create_remote_file(name, dest_filepath, file_content)
'PHP/memory_limit': '768M'
php::globals::php_version: '7.4'
mysql::server::root_password: 'strongpassword'
EOS
EOS
elsif os[:release].to_i == 12
hiera_data_content = <<-EOS
---
php::composer: true
php::extensions:
bcmath: {}
dba: {}
gd: {}
gmp: {}
intl: {}
ldap: {}
mbstring: {}
mysqlnd: {}
opcache: {}
pdo: {}
xml: {}
zip: {}
php::fpm: false
php::manage_repos: false
php::settings:
'PHP/memory_limit': '768M'
php::globals::php_version: '8.2'
mysql::server::root_password: 'strongpassword'
EOS
end
elsif os[:family].eql?('ubuntu')
<<-EOS
if os[:release].to_i == 20
hiera_data_content = <<-EOS
---
php::composer: true
php::extensions:
bcmath: {}
dba: {}
gd: {}
gmp: {}
intl: {}
ldap: {}
mbstring: {}
mysqlnd: {}
opcache: {}
pdo: {}
xml: {}
zip: {}
php::fpm: false
php::manage_repos: false
php::settings:
'PHP/memory_limit': '768M'
php::globals::php_version: '7.4'
mysql::server::root_password: 'strongpassword'
EOS
elsif os[:release].to_i == 22
hiera_data_content = <<-EOS
---
# Created by puppet litmus
php::composer: true
php::extensions:
bcmath: {}
Expand All @@ -80,11 +128,35 @@ def create_remote_file(name, dest_filepath, file_content)
'PHP/memory_limit': '768M'
php::globals::php_version: '8.1'
mysql::server::root_password: 'strongpassword'
EOS
EOS
elsif os[:release].to_i == 24
hiera_data_content = <<-EOS
---
php::composer: true
php::extensions:
bcmath: {}
dba: {}
gd: {}
gmp: {}
intl: {}
ldap: {}
mbstring: {}
mysqlnd: {}
opcache: {}
pdo: {}
xml: {}
zip: {}
php::fpm: false
php::manage_repos: false
php::settings:
'PHP/memory_limit': '768M'
php::globals::php_version: '8.3'
mysql::server::root_password: 'strongpassword'
EOS
end
else
<<-EOS
hiera_data_content = <<-EOS
---
# Created by puppet litmus
php::composer: true
php::extensions:
bcmath: {}
Expand All @@ -107,9 +179,8 @@ def create_remote_file(name, dest_filepath, file_content)
'PHP/memory_limit': '768M'
php::globals::php_version: '7.4'
mysql::server::root_password: 'strongpassword'
EOS
EOS
end
# rubocop:enable all

setup_php_pp = <<-EOS
if (($facts['os']['family'] == 'RedHat') and ($facts['os']['release']['major'] == '8')) {
Expand Down
Loading