Skip to content

Commit

Permalink
Merge pull request #20 from rehanone/develop/update
Browse files Browse the repository at this point in the history
- Added support for Debian 10.
  • Loading branch information
rehanone authored Aug 25, 2019
2 parents d48587e + 3178808 commit 0129c93
Show file tree
Hide file tree
Showing 19 changed files with 194 additions and 102 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
18 changes: 18 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,21 @@
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/appveyor.yml
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.gitlab-ci.yml
/.pdkignore
/Rakefile
/rakelib/
/.rspec
/.rubocop.yml
/.travis.yml
/.yardopts
/spec/
/.vscode/
1 change: 1 addition & 0 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--relative
8 changes: 6 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
require: rubocop-rspec
require:
- rubocop-rspec
- rubocop-i18n
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.1'
Expand All @@ -20,10 +22,12 @@ AllCops:
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
GetText:
Enabled: false
GetText/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- spec/*
- spec/**/*
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
3 changes: 2 additions & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
- set: docker/ubuntu-18.04
- set: docker/ubuntu-16.04
- set: docker/ubuntu-14.04
# - set: docker/debian-9
- set: docker/debian-10
- set: docker/debian-9
- set: docker/debian-8
- set: docker/centos-7
docker_defaults:
Expand Down
79 changes: 54 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,108 @@
---
sudo: false
dist: trusty
dist: xenial
language: ruby
cache: bundler
before_install:
- bundle -v
- rm -f Gemfile.lock
- gem update --system
- gem update --system $RUBYGEMS_VERSION
- gem --version
- bundle -v
script:
- 'bundle exec rake $CHECK'
bundler_args:
rvm:
- 2.5.1
env:
global:
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
- 2.5.3
stages:
- static
- spec
- acceptance
-
if: tag =~ ^v\d
name: deploy
matrix:
fast_finish: true
include:
-
bundler_args: --with system_tests
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/ubuntu-18.04 BEAKER_TESTMODE=apply
rvm: 2.5.1
rvm: 2.5.3
script: bundle exec rake beaker
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/ubuntu-16.04 BEAKER_TESTMODE=apply
rvm: 2.5.1
rvm: 2.5.3
script: bundle exec rake beaker
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/ubuntu-14.04 BEAKER_TESTMODE=apply
rvm: 2.5.1
rvm: 2.5.3
script: bundle exec rake beaker
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/debian-10 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
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/debian-9 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
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/debian-8 BEAKER_TESTMODE=apply
rvm: 2.5.1
rvm: 2.5.3
script: bundle exec rake beaker
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-7 BEAKER_TESTMODE=apply
rvm: 2.5.1
rvm: 2.5.3
script: bundle exec rake beaker
services: docker
stage: acceptance
sudo: required
-
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
-
env: CHECK=parallel_spec
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
stage: static
-
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
rvm: 2.4.4
rvm: 2.4.5
stage: spec
-
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
rvm: 2.5.3
stage: spec
-
env: DEPLOY_TO_FORGE=yes
stage: deploy
branches:
only:
- master
- /^v\d/
notifications:
email: false
deploy:
provider: puppetforge
user: puppet
password:
secure: ""
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"jpogran.puppet-vscode",
"rebornix.Ruby"
]
}
20 changes: 11 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '<= 2.0.4', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.4.4')
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
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]
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
Expand Down
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
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'
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
Expand All @@ -14,15 +15,15 @@ end

def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['name']
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?
puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
end

def changelog_future_release
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = JSON.load(File.read('metadata.json'))['version']
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator future_release:#{returnVal}"
returnVal
Expand Down
9 changes: 1 addition & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: 1.1.x.{build}
branches:
only:
- master
- release
skip_commits:
message: /^\(?doc\)?.*/
clone_depth: 10
Expand All @@ -17,14 +18,6 @@ environment:
-
RUBY_VERSION: 24-x64
CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
-
PUPPET_GEM_VERSION: ~> 4.0
RUBY_VERSION: 21
CHECK: parallel_spec
-
PUPPET_GEM_VERSION: ~> 4.0
RUBY_VERSION: 21-x64
CHECK: parallel_spec
-
PUPPET_GEM_VERSION: ~> 5.0
RUBY_VERSION: 24
Expand Down
8 changes: 4 additions & 4 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"Public Key Infrastructure",
"Certificate Managment"
],
"pdk-version": "1.8.0",
"template-url": "file:///opt/puppetlabs/pdk/share/cache/pdk-templates.git",
"template-ref": "1.8.0-0-g0d9da00"
}
"pdk-version": "1.12.0",
"template-url": "pdk-default#1.12.0",
"template-ref": "1.12.0-0-g55d9ae2"
}
19 changes: 10 additions & 9 deletions spec/acceptance/nodesets/docker/centos-7.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
HOSTS:
centos-7-x64:
platform: el-7-x86_64
hypervisor: docker
centos7-64:
docker_cmd:
- "/sbin/init"
image: centos:7
docker_preserve_image: true
docker_cmd: '["/usr/sbin/init"]'
# install various tools required to get the image up to usable levels
platform: el-7-x86_64
packaging_platform: el-7-x86_64
docker_image_commands:
- 'yum install -y crontabs tar wget openssl sysvinit-tools iproute which initscripts'
CONFIG:
trace_limit: 200
- cp /bin/true /sbin/agetty
- yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget
which ss
hypervisor: docker
roles: []
13 changes: 13 additions & 0 deletions spec/acceptance/nodesets/docker/debian-10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
HOSTS:
debian10-64:
docker_cmd:
- "/sbin/init"
image: debian:10
platform: debian-10-amd64
packaging_platform: debian-10-amd64
docker_image_commands:
- cp /bin/true /sbin/agetty
- rm -f /usr/sbin/policy-rc.d
- apt-get update && apt-get install -y cron locales-all net-tools wget systemd-sysv
gnupg
hypervisor: docker
17 changes: 9 additions & 8 deletions spec/acceptance/nodesets/docker/debian-8.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
HOSTS:
debian-8-x64:
platform: debian-8-amd64
hypervisor: docker
debian8-64:
docker_cmd:
- "/sbin/init"
image: debian:8
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
platform: debian-8-amd64
packaging_platform: debian-8-amd64
docker_image_commands:
- 'apt-get update && apt-get install -y net-tools wget locales strace lsof && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen'
CONFIG:
trace_limit: 200
- cp /bin/true /sbin/agetty
- rm -f /usr/sbin/policy-rc.d
- apt-get update && apt-get install -y cron locales-all net-tools wget
hypervisor: docker
18 changes: 10 additions & 8 deletions spec/acceptance/nodesets/docker/debian-9.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
HOSTS:
debian-9-x64:
platform: debian-9-amd64
hypervisor: docker
debian9-64:
docker_cmd:
- "/sbin/init"
image: debian:9
docker_preserve_image: true
# docker_cmd: '["/sbin/init"]'
platform: debian-9-amd64
packaging_platform: debian-9-amd64
docker_image_commands:
- 'apt-get update && apt-get install -y net-tools wget locales strace lsof && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen'
CONFIG:
trace_limit: 200
- cp /bin/true /sbin/agetty
- rm -f /usr/sbin/policy-rc.d
- apt-get update && apt-get install -y cron locales-all net-tools wget systemd-sysv
gnupg
hypervisor: docker
21 changes: 12 additions & 9 deletions spec/acceptance/nodesets/docker/ubuntu-14.04.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
HOSTS:
ubuntu-1404-x64:
platform: ubuntu-14.04-amd64
hypervisor: docker
ubuntu1404-64:
docker_cmd:
- "/sbin/init"
image: ubuntu:14.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
platform: ubuntu-14.04-amd64
packaging_platform: ubuntu-14.04-amd64
docker_image_commands:
# ensure that upstart is booting correctly in the container
- 'rm /usr/sbin/policy-rc.d && rm /sbin/initctl && dpkg-divert --rename --remove /sbin/initctl && apt-get update && apt-get install -y net-tools wget && locale-gen en_US.UTF-8'
CONFIG:
trace_limit: 200
- cp /bin/true /sbin/agetty
- rm /usr/sbin/policy-rc.d
- rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl
- apt-get install -y net-tools wget apt-transport-https
- locale-gen en_US.UTF-8
- echo LANG=en_US.UTF-8 > /etc/default/locale
hypervisor: docker
Loading

0 comments on commit 0129c93

Please sign in to comment.