Skip to content

Commit

Permalink
Merge pull request voxpupuli#235 from bastelfreak/ubuntu1804
Browse files Browse the repository at this point in the history
add ubuntu 18.04 support
  • Loading branch information
dhollinger authored Aug 2, 2018
2 parents 2f21a9a + def0f69 commit 610ad14
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 3 deletions.
1 change: 1 addition & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
docker_sets:
- set: ubuntu1404-64
- set: ubuntu1604-64
- set: ubuntu1804-64
- set: debian8-64
- set: debian9-64
- set: centos7-64
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ matrix:
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1804-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04",
"16.04"
"16.04",
"18.04"
]
},
{
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/postgres_exporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

describe 'prometheus postgres exporter' do
it 'postgres_exporter works idempotently with no errors' do
if default[:platform] =~ %r{ubuntu-18.04-amd64}
pp = "package{'iproute2': ensure => present}"
apply_manifest(pp, catch_failures: true)
end
pp = "class{'prometheus::postgres_exporter': postgres_pass => 'password', postgres_user => 'username' }"
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/prometheus_exporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

describe 'prometheus exporter' do
it 'graphite_exporter works idempotently with no errors' do
if default[:platform] =~ %r{ubuntu-18.04-amd64}
pp = "package{'iproute2': ensure => present}"
apply_manifest(pp, catch_failures: true)
end
pp = 'include prometheus::graphite_exporter'
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/prometheus_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

describe 'prometheus server basics' do
it 'prometheus server via main class works idempotently with no errors' do
if default[:platform] =~ %r{ubuntu-18.04-amd64}
pp = "package{'iproute2': ensure => present}"
apply_manifest(pp, catch_failures: true)
end
pp = "class{'prometheus': manage_prometheus_server => true }"

# Run it twice and test for idempotency
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/redis_exporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

describe 'prometheus redis exporter' do
it 'redis_exporter works idempotently with no errors' do
if default[:platform] =~ %r{ubuntu-18.04-amd64}
pp = "package{'iproute2': ensure => present}"
apply_manifest(pp, catch_failures: true)
end
pp = 'include prometheus::redis_exporter'
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/prometheus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
'content' => File.read(fixtures('files', "prometheus#{prom_major}.sysv"))
)
}
elsif ['centos-7-x86_64', 'debian-8-x86_64', 'debian-9-x86_64', 'redhat-7-x86_64', 'ubuntu-16.04-x86_64', 'archlinux-4-x86_64'].include?(os)
elsif ['centos-7-x86_64', 'debian-8-x86_64', 'debian-9-x86_64', 'redhat-7-x86_64', 'ubuntu-16.04-x86_64', 'ubuntu-18.04-x86_64', 'archlinux-4-x86_64'].include?(os)
# init_style = 'systemd'

it { is_expected.to contain_class('systemd') }
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/daemon_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
%r{daemon --user=smurf_user \\\n --pidfile="\$PID_FILE" \\\n "\$DAEMON" '' &>> "\$LOG_FILE" &}
)
}
elsif ['centos-7-x86_64', 'debian-8-x86_64', 'debian-9-x86_64', 'redhat-7-x86_64', 'ubuntu-16.04-x86_64', 'archlinux-4-x86_64'].include?(os)
elsif ['centos-7-x86_64', 'debian-8-x86_64', 'debian-9-x86_64', 'redhat-7-x86_64', 'ubuntu-16.04-x86_64', 'ubuntu-18.04-x86_64', 'archlinux-4-x86_64'].include?(os)
# init_style = 'systemd'

it { is_expected.to contain_class('systemd') }
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def os_specific_facts(facts)
{ service_provider: 'upstart' }
when '16.04'
{ service_provider: 'systemd' }
when '18.04'
{ service_provider: 'systemd' }
end
when 'RedHat'
case facts[:os]['release']['major']
Expand Down

0 comments on commit 610ad14

Please sign in to comment.