Skip to content

Commit

Permalink
Major updates (read description)
Browse files Browse the repository at this point in the history
* Drop Puppet 5 support
* Add Puppet 7 support
* Drop Debian 8 support
* Support perfSONAR 4.3.x
  • Loading branch information
treydock committed Apr 6, 2021
1 parent 88d709c commit c94063d
Show file tree
Hide file tree
Showing 19 changed files with 175 additions and 224 deletions.
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fixtures:
firewall:
repo: https://github.com/puppetlabs/puppetlabs-firewall.git
epel:
repo: https://github.com/stahnma/puppet-module-epel.git
repo: https://github.com/voxpupuli/puppet-epel.git
httpauth:
repo: https://github.com/jamtur01/jamtur01-httpauth.git
symlinks:
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI

on:
push:
branches:
- main
- master
pull_request:

jobs:
unit:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow_failure }}
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.5.7
puppet: 6
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.7.0
puppet: 7
fixtures: .fixtures.yml
allow_failure: false
env:
BUNDLE_WITHOUT: system_tests:release
PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0"
FACTER_GEM_VERSION: "< 4.0"
FIXTURES_YML: ${{ matrix.fixtures }}
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
bundler: '2.1.0'
- name: Validate
run: bundle exec rake check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint
- name: Run tests
run: bundle exec rake parallel_spec
acceptance:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
set:
- "centos-7"
- "debian-9"
- "ubuntu-1604"
- "ubuntu-1804"
puppet:
- "puppet6"
- "puppet7"
env:
BUNDLE_WITHOUT: development:release
BEAKER_debug: true
name: ${{ matrix.puppet }} ${{ matrix.set }}
steps:
- name: Enable IPv6 on docker
run: |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
# https://github.com/actions/virtual-environments/issues/181#issuecomment-610874237
- name: apparmor
run: |
set -x
sudo apt-get remove mysql-server --purge
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
bundler: '2.1.0'
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
BEAKER_set: ${{ matrix.set }}
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- '*'

env:
BUNDLE_WITHOUT: system_tests

jobs:
deploy:
name: 'deploy to forge'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
bundler: '2.1.0'
- name: Build and Deploy
env:
# Configure secrets here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
run: bundle exec rake module:push
42 changes: 17 additions & 25 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
---
.travis.yml:
dist: xenial
docker_defaults:
dist: xenial
docker_sets:
- set: centos-7
collection: puppet5
- set: centos-7
collection: puppet6
- set: debian-9
collection: puppet5
- set: debian-9
collection: puppet6
- set: ubuntu-1604
collection: puppet5
- set: ubuntu-1604
collection: puppet6
- set: ubuntu-1804
collection: puppet5
- set: ubuntu-1804
collection: puppet6
user: treydock
secure: "muLzPZHN/E/gScJPe5Um2Nh5BqmQlT6KJumO92zlusSFLP8FOxwV7Nhc9HdoHPcUJ1feGto6Fkwgwqe+YycDGXqgwAtts3sOICvVqkV+2PjqQAmw2AIC9p8ppDCzMAdGPXDIBwKPs+0uhY/pIB1+EToRFvXELSj5Gl3UK49YRSNjtgIrNB1ALzHDWMobNjsk1uiJupyDoyDKytyQiX6xTbmE03SA96UuD7bN7IqIPDhCe8xzx+VGCiHPnlV9tSLwhXkzHslXwfCCd33N8VpmqpE+8/gXiiB3Ee3TBXd7+HlzbkmUperigPzyCC0uRTy8Ugvk8TGBDFcLfdZPN+UK6md1rAhWfrvSAoEpiPkZHtfnb6ziWLG7HzXPrC731h1/Ohd6ojEGEqxryGSFQNpjiapYqtiUg+usQgUGU26Jzs5ES6sNdE7Rp1Uy/cGnFH/+rYp5HYPiXmAgVQuwsd6sxi5fNIG+5f97bfhFcZ0QHmdNoG3S46XSwHC0Jc0z9WNQZjd4JsGD5QfD6GGlBv3ZkLu2Ob4bRmvfzpoy3ggxgfgdRngAX+z/RSaPdeDL5QcFBN8I7C8R5g6kAH15UwLE5/Tv9grXBb1CarhZblkqdbJkK9udiA7VBPYlsYa8C24K4f5Fiq9jIWcC0s5Spy6j0B9m1SjXtJhrKgjkOqLgmzQ="
.github/workflows/ci.yaml:
acceptance_matrix:
set:
- centos-7
- ---centos-8
- debian-9
- ubuntu-1604
- ubuntu-1804
.gitlab-ci.yml:
delete: true
appveyor.yml:
delete: true
spec/acceptance/nodesets/centos-6.yml:
delete: true
Gemfile:
required:
':development':
- gem: rspec-json_expectations
spec/acceptance/nodesets/centos-8.yml:
delete: true
spec/acceptance/nodesets/debian-10.yml:
delete: true
spec/acceptance/nodesets/ubuntu-2004.yml:
delete: true
spec/spec_helper.rb:
spec_overrides:
- "require 'rspec/json_expectations'"
133 changes: 0 additions & 133 deletions .travis.yml

This file was deleted.

13 changes: 7 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "facter", '< 4.0', require: false
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')
Expand All @@ -30,18 +29,18 @@ group :development do
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]
gem "puppet-lint-param-docs", require: false
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
gem "rspec-json_expectations"
gem "rspec-json_expectations", require: false
gem "github_changelog_generator", require: false
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-system-r#{minor_version}", '~> 0.5', require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", '~> 0.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.0')
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
gem "beaker-pe", require: false
gem "beaker-hostgenerator"
gem "beaker-rspec"
gem "beaker-docker"
gem "beaker-docker", *location_for(ENV['BEAKER_DOCKER_VERSION'] || '~> 0.7.0')
gem "beaker-puppet"
end

Expand All @@ -51,6 +50,8 @@ hiera_version = ENV['HIERA_GEM_VERSION']

gems = {}

gems['rake'] = [require: false]
gems['puppetlabs_spec_helper'] = [require: false]
gems['puppet'] = location_for(puppet_version)

# If facter or hiera versions have been specified via the environment
Expand Down
1 change: 1 addition & 0 deletions manifests/firewall.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
{'name' => 'ndt-test', 'dport' => '3001-3003', 'proto' => ['tcp']},
{'name' => 'ndt-control', 'dport' => '7123', 'proto' => ['tcp']},
{'name' => 'ndt-flash', 'dport' => '843', 'proto' => ['tcp']},
{'name' => 'simplestream', 'dport' => '5890-5900', 'proto' => ['tcp']},
]

($ipv4_firewall_rules + $firewall_rules).each |Integer $index, Hash $rule| {
Expand Down
4 changes: 2 additions & 2 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
assert_private()

if $facts['os']['family'] == 'RedHat' {
if $::perfsonar::manage_epel {
include ::epel
if $perfsonar::manage_epel {
contain 'epel'
}
yumrepo { 'perfSONAR':
descr => 'perfSONAR RPM Repository - software.internet2.edu - main',
Expand Down
Loading

0 comments on commit c94063d

Please sign in to comment.