Skip to content

Commit

Permalink
Merge pull request #1070 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 7.0.0
  • Loading branch information
evgeni authored Sep 29, 2023
2 parents 662420d + b6608c3 commit 6ace169
Show file tree
Hide file tree
Showing 20 changed files with 121 additions and 123 deletions.
11 changes: 7 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this
with:

```sh
BEAKER_setfile=debian11-64 bundle exec rake beaker
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
```

You can replace the string `debian10` with any common operating system.
You can replace the string `debian11` with any common operating system.
The following strings are known to work:

* ubuntu1804
* ubuntu2004
* debian10
* ubuntu2204
* debian11
* centos7
* centos8
* centos9
* almalinux8
* almalinux9
* fedora36

For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).

Expand Down
3 changes: 0 additions & 3 deletions .github/SECURITY.md

This file was deleted.

36 changes: 18 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

pkg/
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.librarian/
Puppetfile.lock
/pkg/
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.librarian/
/Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
/.yardoc/
/Guardfile
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '5.4.0'
modulesync_config_version: '7.0.0'
64 changes: 32 additions & 32 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

docs/
pkg/
Gemfile
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/
Rakefile
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.github/
.librarian/
Puppetfile.lock
/docs/
/pkg/
/Gemfile
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/
/Rakefile
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.github/
/.librarian/
/Puppetfile.lock
*.iml
.editorconfig
.fixtures.yml
.gitignore
.msync.yml
.overcommit.yml
.pmtignore
.rspec
.rspec_parallel
.rubocop.yml
.sync.yml
/.editorconfig
/.fixtures.yml
/.gitignore
/.msync.yml
/.overcommit.yml
/.pmtignore
/.rspec
/.rspec_parallel
/.rubocop.yml
/.sync.yml
.*.sw?
.yardoc/
.yardopts
Dockerfile
/.yardoc/
/.yardopts
/Dockerfile
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
inherit_from: .rubocop_todo.yml

inherit_gem:
voxpupuli-test: rubocop.yml

Expand Down
27 changes: 27 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-08-17 21:33:46 UTC using RuboCop version 1.50.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 9
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
Exclude:
- 'spec/unit/puppet/provider/jenkins_job/cli_spec.rb'
- 'spec/unit/puppet/x/jenkins/provider/cli_spec.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: .
# SupportedStyles: constant, string
RSpec/VerifiedDoubleReference:
EnforcedStyle: string

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SlicingWithRange:
Exclude:
- 'lib/puppet/jenkins/plugins.rb'
14 changes: 7 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 5.4', :require => false
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 2.0', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
gem 'retries', :require => false
end

Expand All @@ -17,19 +17,19 @@ group :development do
end

group :system_tests do
gem 'voxpupuli-acceptance', '~> 1.0', :require => false
gem 'voxpupuli-acceptance', '~> 2.0', :require => false
end

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
gem 'voxpupuli-release', '>= 1.2.0', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'voxpupuli-release', '~> 3.0', :require => false
gem 'faraday-retry', '~> 2.1', :require => false
end

gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24'
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
36 changes: 4 additions & 32 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ end
begin
require 'voxpupuli/release/rake_tasks'
rescue LoadError
# voxpupuli-release not present
else
GCGConfig.user = 'voxpupuli'
GCGConfig.project = 'puppet-jenkins'
end

desc "Run main 'test' task and report merged results to coveralls"
Expand All @@ -37,36 +41,4 @@ task test_with_coveralls: [:test] do
end
end

desc 'Generate REFERENCE.md'
task :reference, [:debug, :backtrace] do |t, args|
patterns = ''
Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace])
end

begin
require 'github_changelog_generator/task'
require 'puppet_blacksmith'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
metadata = Blacksmith::Modulefile.new
config.future_release = "v#{metadata.version}" if metadata.version =~ /^\d+\.\d+.\d+$/
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
config.user = 'voxpupuli'
config.project = 'puppet-jenkins'
end

# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
require 'rbconfig'
if RbConfig::CONFIG['host_os'] =~ /linux/
task :changelog do
puts 'Fixing line endings...'
changelog_file = File.join(__dir__, 'CHANGELOG.md')
changelog_txt = File.read(changelog_file)
new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
File.open(changelog_file, "w") {|file| file.puts new_contents }
end
end

rescue LoadError
end
# vim: syntax=ruby
2 changes: 1 addition & 1 deletion lib/puppet/parser/functions/jenkins_port.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module Puppet::Parser::Functions
newfunction(:jenkins_port, type: :rvalue, doc: <<-'ENDHEREDOC') do |_args|
newfunction(:jenkins_port, type: :rvalue, doc: <<-ENDHEREDOC) do |_args|
Return the configurad Jenkins port value
(corresponds to /etc/defaults/jenkins -> JENKINS_PORT
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/parser/functions/jenkins_prefix.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

module Puppet::Parser::Functions
newfunction(:jenkins_prefix, type: :rvalue, doc: <<-'ENDHEREDOC') do |_args|
newfunction(:jenkins_prefix, type: :rvalue, doc: <<-ENDHEREDOC) do |_args|
Return the configured Jenkins prefix value
(corresponds to /etc/defaults/jenkins -> PREFIX)
Expand Down
2 changes: 0 additions & 2 deletions lib/puppet/provider/jenkins_authorization_strategy/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def self.get_authorization_strategy(catalog = nil)
end
private_class_method :get_authorization_strategy

# rubocop:disable Naming/AccessorMethodName
def set_jenkins_instance(input = nil)
input ||= to_hash

Expand All @@ -91,5 +90,4 @@ def set_strategy_unsecured
}
set_jenkins_instance(input)
end
# rubocop:enable Naming/AccessorMethodName
end
2 changes: 0 additions & 2 deletions lib/puppet/provider/jenkins_security_realm/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def self.get_security_realm(catalog = nil)
end
private_class_method :get_security_realm

# rubocop:disable Naming/AccessorMethodName
def set_jenkins_instance(input = nil)
input ||= to_hash

Expand All @@ -92,5 +91,4 @@ def set_security_none
}
set_jenkins_instance(input)
end
# rubocop:enable Naming/AccessorMethodName
end
12 changes: 6 additions & 6 deletions spec/acceptance/job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

describe 'jenkins::job' do
let(:test_build_job) do
example = <<~'EOS'
example = <<~EOS
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
Expand Down Expand Up @@ -39,7 +39,7 @@
# the historical assumption is that this will work without cli => true
# set on the jenkins class
jenkins::job { 'test-build-job':
config => \'#{test_build_job}\',
config => '#{test_build_job}',
}
EOS

Expand All @@ -65,14 +65,14 @@
pp_create = <<-EOS
include jenkins
jenkins::job {'test-noreplace-job':
config => \'#{test_build_job.gsub('<description>test job</description>', '<description>do not overwrite me</description>')}\',
config => '#{test_build_job.gsub('<description>test job</description>', '<description>do not overwrite me</description>')}',
}
EOS

pp_update = <<-EOS
include jenkins
jenkins::job {'test-noreplace-job':
config => \'#{test_build_job}\',
config => '#{test_build_job}',
replace => false,
}
EOS
Expand All @@ -97,7 +97,7 @@
pp = <<-EOS
include jenkins
jenkins::job { 'test-build-job':
config => \'#{test_build_job}\',
config => '#{test_build_job}',
}
EOS

Expand All @@ -108,7 +108,7 @@
include jenkins
jenkins::job { 'test-build-job':
ensure => 'absent',
config => \'#{test_build_job}\',
config => '#{test_build_job}',
}
EOS

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/plugin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class {'jenkins':
end
end

describe command("unzip -p #{PDIR}/jquery3-api.hpi META-INF/MANIFEST.MF | sed 's/Plugin-Version: \\\(.*\\\)/\\1/;tx;d;:x'") do
describe command("unzip -p #{PDIR}/jquery3-api.hpi META-INF/MANIFEST.MF | sed 's/Plugin-Version: \\(.*\\)/\\1/;tx;d;:x'") do
its(:stdout) { is_expected.to eq("3.6.0-3\n") }
end

Expand Down
Loading

0 comments on commit 6ace169

Please sign in to comment.