Skip to content

Commit

Permalink
Merge pull request #21 from rehanone/develop/update
Browse files Browse the repository at this point in the history
- Added support for CentOS 8.
  • Loading branch information
rehanone authored Feb 17, 2020
2 parents 6c86eb1 + acdba59 commit 456663f
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 56 deletions.
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ GetText/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- spec/**/*
Enabled: false
RSpec/BeforeAfterAll:
Description: Beware of using after(:all) as it may cause state to leak between tests.
A necessary evil in acceptance testing.
Expand Down Expand Up @@ -91,6 +92,12 @@ Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/StringMethods:
Enabled: true
GetText/DecorateFunctionMessage:
Enabled: false
GetText/DecorateStringFormattingUsingInterpolation:
Enabled: false
GetText/DecorateStringFormattingUsingPercent:
Enabled: false
Layout/EndOfLine:
Enabled: false
Layout/IndentHeredoc:
Expand Down
11 changes: 1 addition & 10 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- set: docker/debian-10
- set: docker/debian-9
- set: docker/debian-8
- set: docker/centos-8
- set: docker/centos-7
docker_defaults:

Expand Down Expand Up @@ -57,13 +58,3 @@ locales/config.yaml:
default_locale: 'en'
source_files:
- './lib/**/*.rb'

spec/acceptance/nodesets/centos-7-x64.yml:
spec/acceptance/nodesets/debian-8-x64.yml:
spec/acceptance/nodesets/default.yml:
spec/acceptance/nodesets/docker/centos-7.yml:
spec/acceptance/nodesets/docker/debian-8.yml:
spec/acceptance/nodesets/docker/debian-9.yml:
spec/acceptance/nodesets/docker/ubuntu-14.04.yml:
spec/acceptance/nodesets/docker/ubuntu-16.04.yml:
spec/acceptance/nodesets/docker/ubuntu-18.04.yml:
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ cache: bundler
before_install:
- bundle -v
- rm -f Gemfile.lock
- gem update --system $RUBYGEMS_VERSION
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
- "# See https://github.com/puppetlabs/pdk-templates/commit/705154d5c437796b821691b707156e1b056d244f for an example of how this was used"
- "# Ignore exit code of SIGPIPE'd yes to not fail with shell's pipefail set"
- '[ -z "$RUBYGEMS_VERSION" ] || (yes || true) | gem update --system $RUBYGEMS_VERSION'
- gem --version
- bundle -v
script:
Expand Down Expand Up @@ -77,6 +80,15 @@ matrix:
services: docker
stage: acceptance
sudo: required
-
bundler_args: --with system_tests
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/centos-8 BEAKER_TESTMODE=apply
rvm: 2.5.3
script: bundle exec rake beaker
services: docker
stage: acceptance
sudo: required
-
bundler_args: --with system_tests
dist: trusty
Expand Down
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ group :development do
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
Expand Down
15 changes: 13 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
Expand All @@ -15,8 +17,17 @@ end

def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['source'].match(%r{.*/([^/]*)})[1]
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?

returnVal = nil
returnVal ||= begin
metadata_source = JSON.load(File.read('metadata.json'))['source']
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})

metadata_source_match && metadata_source_match[1]
end

raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?

puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
end
Expand Down
39 changes: 20 additions & 19 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"5",
"6",
"7",
"8"
Expand All @@ -30,32 +29,33 @@
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"5",
"6",
"7"
"7",
"8"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"5",
"6",
"7"
"7",
"8"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"5",
"6",
"7"
"7",
"8"
]
},
{
"operatingsystem": "Fedora",
"operatingsystemrelease": [
"29",
"30"
"30",
"31",
"32"
]
},
{
Expand All @@ -79,31 +79,32 @@
"operatingsystemrelease": [
"14.04",
"16.04",
"17.10",
"18.04",
"18.10",
"19.04"
"19.04",
"19.10"
]
},
{
"operatingsystem": "FreeBSD",
"operatingsystemrelease": [
"9",
"10",
"11"
"11",
"12"
]
},
{
"operatingsystem": "DragonFly",
"operatingsystemrelease": [
"3.6",
"3.8",
"4.0",
"4.2",
"4.4",
"4.6",
"4.8",
"5.0"
"5.0",
"5.2",
"5.4",
"5.6"
]
},
{
Expand All @@ -123,7 +124,7 @@
"Public Key Infrastructure",
"Certificate Managment"
],
"pdk-version": "1.12.0",
"template-url": "pdk-default#1.12.0",
"template-ref": "1.12.0-0-g55d9ae2"
"pdk-version": "1.16.0",
"template-url": "pdk-default#1.16.0",
"template-ref": "tags/1.16.0-0-gaf44904"
}
10 changes: 0 additions & 10 deletions spec/acceptance/nodesets/centos-7-x64.yml

This file was deleted.

10 changes: 0 additions & 10 deletions spec/acceptance/nodesets/debian-8-x64.yml

This file was deleted.

12 changes: 12 additions & 0 deletions spec/acceptance/nodesets/docker/centos-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
HOSTS:
centos8-64:
docker_cmd:
- "/sbin/init"
image: centos:8
platform: el-8-x86_64
packaging_platform: el-8-x86_64
docker_image_commands:
- cp /bin/true /sbin/agetty
- dnf install -y crontabs initscripts iproute openssl tar wget
hypervisor: docker
roles: []
1 change: 1 addition & 0 deletions spec/default_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
# Facts specified here will override the values provided by rspec-puppet-facts.
---
ipaddress: "172.16.254.254"
ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
is_pe: false
macaddress: "AA:AA:AA:AA:AA:AA"
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puppetlabs_spec_helper/module_spec_helper'
require 'rspec-puppet-facts'

Expand Down

0 comments on commit 456663f

Please sign in to comment.