Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1090 Stage plugin before deleting existing plugin #1091

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v4.0.0](https://github.com/voxpupuli/puppet-jenkins/tree/v4.0.0) (2023-09-29)

[Full Changelog](https://github.com/voxpupuli/puppet-jenkins/compare/v3.3.0...v4.0.0)

**Breaking changes:**

- Drop Ubuntu 18.04, add 20.04 and 22.04 support [\#1080](https://github.com/voxpupuli/puppet-jenkins/pull/1080) ([evgeni](https://github.com/evgeni))
- Drop Puppet 6 support [\#1074](https://github.com/voxpupuli/puppet-jenkins/pull/1074) ([bastelfreak](https://github.com/bastelfreak))

**Implemented enhancements:**

- Add support for EL9, document Alma/Oracle/Rocky support [\#1081](https://github.com/voxpupuli/puppet-jenkins/pull/1081) ([evgeni](https://github.com/evgeni))
- Allow puppetlabs/stdlib 9.x, puppetlabs/java 10.x, puppet/archive 7.x, puppet/zypprepo 5.x, puppet/systemd 6.x [\#1076](https://github.com/voxpupuli/puppet-jenkins/pull/1076) ([bastelfreak](https://github.com/bastelfreak))

## [v3.3.0](https://github.com/voxpupuli/puppet-jenkins/tree/v3.3.0) (2023-04-19)

[Full Changelog](https://github.com/voxpupuli/puppet-jenkins/compare/v3.2.1...v3.3.0)
Expand Down Expand Up @@ -71,6 +85,7 @@ These should not affect the functionality of the module.
- Should we include the puppet-jenkinstracking code? [\#110](https://github.com/voxpupuli/puppet-jenkins/issues/110)
- The module should support FreeBSD 10 and pkgng [\#105](https://github.com/voxpupuli/puppet-jenkins/issues/105)
- Install Java 11 JDK on Red Hat OSes [\#1054](https://github.com/voxpupuli/puppet-jenkins/pull/1054) ([ekohl](https://github.com/ekohl))
- Install Java 11 on Red Hat OSes [\#1053](https://github.com/voxpupuli/puppet-jenkins/pull/1053) ([ekohl](https://github.com/ekohl))
- Drop-in file systemd configuration [\#1044](https://github.com/voxpupuli/puppet-jenkins/pull/1044) ([jan-win1993](https://github.com/jan-win1993))
- Allow up-to-date dependencies [\#1019](https://github.com/voxpupuli/puppet-jenkins/pull/1019) ([smortex](https://github.com/smortex))
- puppet/archive: allow 5.x [\#1010](https://github.com/voxpupuli/puppet-jenkins/pull/1010) ([bastelfreak](https://github.com/bastelfreak))
Expand Down Expand Up @@ -133,7 +148,6 @@ These should not affect the functionality of the module.
**Merged pull requests:**

- Remove unused plugins\_from\_updatecenter [\#1056](https://github.com/voxpupuli/puppet-jenkins/pull/1056) ([ekohl](https://github.com/ekohl))
- Install Java 11 on Red Hat OSes [\#1053](https://github.com/voxpupuli/puppet-jenkins/pull/1053) ([ekohl](https://github.com/ekohl))
- Remove old RHEL 5 example [\#1052](https://github.com/voxpupuli/puppet-jenkins/pull/1052) ([ekohl](https://github.com/ekohl))
- Remove PIDFile workaround and deprecated code [\#1045](https://github.com/voxpupuli/puppet-jenkins/pull/1045) ([ekohl](https://github.com/ekohl))
- Fix acceptance tests [\#1041](https://github.com/voxpupuli/puppet-jenkins/pull/1041) ([ekohl](https://github.com/ekohl))
Expand Down
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
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-jenkins",
"version": "3.3.1-rc0",
"version": "4.0.0",
"author": "Vox Pupuli",
"license": "Apache-2.0",
"summary": "Manage the Jenkins continuous integration service with Puppet",
Expand Down
Loading
Loading