diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e18ae3210ffdebbc21adc74e6e595a1fc5d77a88..b021b47d95a4678623741f2c1d9b07b2507d1b01 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -48,6 +48,21 @@ acceptance with Puppet5 Ubuntu1604: tags: - puppet-tests +acceptance with Puppet5 Ubuntu1804: + stage: 'acceptance' + variables: + RBENV_VERSION: '2.5.1' + PUPPET_INSTALL_TYPE: 'agent' + BEAKER_IS_PE: 'no' + BEAKER_PUPPET_COLLECTION: 'puppet5' + BEAKER_debug: 'true' + BEAKER_setfile: 'ubuntu1804-64' + BEAKER_HYPERVISOR: 'docker' + script: + - bundle exec rake beaker + tags: + - puppet-tests + acceptance with Puppet5 Debian8: stage: 'acceptance' variables: @@ -93,6 +108,21 @@ acceptance with Puppet6 Ubuntu1604: tags: - puppet-tests +acceptance with Puppet6 Ubuntu1804: + stage: 'acceptance' + variables: + RBENV_VERSION: '2.5.1' + PUPPET_INSTALL_TYPE: 'agent' + BEAKER_IS_PE: 'no' + BEAKER_PUPPET_COLLECTION: 'puppet6' + BEAKER_debug: 'true' + BEAKER_setfile: 'ubuntu1804-64' + BEAKER_HYPERVISOR: 'docker' + script: + - bundle exec rake beaker + tags: + - puppet-tests + acceptance with Puppet6 Debian8: stage: 'acceptance' variables: diff --git a/.sync.yml b/.sync.yml index e576e115dbc005dc087871fcec10862ea6874bbc..fe5747a80a2ba01ed72f4b7ab0d00dcf5bcfe550 100644 --- a/.sync.yml +++ b/.sync.yml @@ -44,6 +44,20 @@ appveyor.yml: - bundle exec rake beaker tags: - puppet-tests + acceptance with Puppet5 Ubuntu1804: + stage: acceptance + variables: + RBENV_VERSION: '2.5.1' + PUPPET_INSTALL_TYPE: 'agent' + BEAKER_IS_PE: 'no' + BEAKER_PUPPET_COLLECTION: 'puppet5' + BEAKER_debug: 'true' + BEAKER_setfile: 'ubuntu1804-64' + BEAKER_HYPERVISOR: 'docker' + script: + - bundle exec rake beaker + tags: + - puppet-tests acceptance with Puppet5 Debian8: stage: acceptance variables: @@ -86,6 +100,20 @@ appveyor.yml: - bundle exec rake beaker tags: - puppet-tests + acceptance with Puppet6 Ubuntu1804: + stage: acceptance + variables: + RBENV_VERSION: '2.5.1' + PUPPET_INSTALL_TYPE: 'agent' + BEAKER_IS_PE: 'no' + BEAKER_PUPPET_COLLECTION: 'puppet6' + BEAKER_debug: 'true' + BEAKER_setfile: 'ubuntu1804-64' + BEAKER_HYPERVISOR: 'docker' + script: + - bundle exec rake beaker + tags: + - puppet-tests acceptance with Puppet6 Debian8: stage: acceptance variables: diff --git a/metadata.json b/metadata.json index 81dc05fea62841cee774b2956ddcbd795797ee94..b721de6a7491c917b0ed81d7a036b110da28d70d 100644 --- a/metadata.json +++ b/metadata.json @@ -28,7 +28,8 @@ { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "16.04" + "16.04", + "18.04" ] } ], diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 85d7c2b90384174f8f00826c17b47ed5bb57dde7..8909f1ba2371719e17932ba5350a9d5b02aa3c5f 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -22,21 +22,45 @@ RSpec.configure do |c| on host, puppet('module', 'install', 'puppetlabs-apache') on host, puppet('module', 'install', 'puppet-archive') + # curl is used in tests to access at a wordpress newly installed if host[:platform] =~ %r{debian-8-amd64} # workaround the apache module try to install the following apache debs and fail. - # curl is used in tests to access at a wordpress newly installed - on(host, 'apt-get update', acceptable_exit_codes: [0]).stdout - on(host, 'apt install php5-cli php5-mysql --yes', acceptable_exit_codes: [0]).stdout - on(host, 'apt install curl libapache2-mod-php5 apache2-mpm-itk --yes', acceptable_exit_codes: [0]).stdout + pp_specific = <<-EOF + package { ['curl','php5-cli','php5-mysql','libapache2-mod-php5','apache2-mpm-itk'] : + ensure => present, + } + EOF + apply_manifest_on(agents, pp_specific, catch_failures: true) elsif host[:platform] =~ %r{ubuntu-16.04-amd64} - on(host, 'apt-get update', acceptable_exit_codes: [0]).stdout - # curl is used in tests to access at a wordpress newly installed - on(host, 'apt install curl php7.0-cli php7.0-mysql --yes', acceptable_exit_codes: [0]).stdout + pp_specific = <<-EOF + package { ['curl','php7.0-cli','php7.0-mysql'] : + ensure => present, + } + EOF + apply_manifest_on(agents, pp_specific, catch_failures: true) + elsif host[:platform] =~ %r{ubuntu-18.04-amd64} + # perl-modules-5.26 required by debconf: Can't locate Term/ReadLine.pm in @INC + pp_specific = <<-EOF + package { ['curl','tzdata','perl-modules-5.26','php7.2-cli','php7.2-mysql'] : + ensure => present, + } + EOF + apply_manifest_on(agents, pp_specific, catch_failures: true) end end pp = <<-EOS - include '::mysql::server' + case $facts['os']['distro']['codename'] { + 'jessie': { + $_dbpackage = 'mysql-server' + } + default: { + $_dbpackage = 'mariadb-server' + } + } + class { 'mysql::server': + package_name => $_dbpackage, + } $myfqdn = 'localhost' accounts::user { 'wp' :}