Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8de3ea58a3 | ||
|
|
1b56da5a27 | ||
|
|
380b8d749d | ||
|
|
7cb684c3c0 | ||
|
|
2926bbcfcb | ||
|
|
a63f788394 | ||
|
|
58669e653c | ||
|
|
255406b30f | ||
|
|
a24f8f15ea | ||
|
|
5d07f08126 | ||
|
|
01b95d32c6 | ||
|
|
3c9f98d75e | ||
|
|
e0b0e1cd19 | ||
|
|
7067aed306 | ||
|
|
cb637faf83 | ||
|
|
66023e1a66 | ||
|
|
743006a16e | ||
|
|
d5d69ee5ac |
@@ -19,6 +19,10 @@ AllCops:
|
|||||||
Metrics/LineLength:
|
Metrics/LineLength:
|
||||||
Description: People have wide screens, use them.
|
Description: People have wide screens, use them.
|
||||||
Max: 200
|
Max: 200
|
||||||
|
GetText/DecorateString:
|
||||||
|
Description: We don't want to decorate test output.
|
||||||
|
Exclude:
|
||||||
|
- spec/*
|
||||||
RSpec/BeforeAfterAll:
|
RSpec/BeforeAfterAll:
|
||||||
Description: Beware of using after(:all) as it may cause state to leak between tests.
|
Description: Beware of using after(:all) as it may cause state to leak between tests.
|
||||||
A necessary evil in acceptance testing.
|
A necessary evil in acceptance testing.
|
||||||
|
|||||||
11
.sync.yml
11
.sync.yml
@@ -25,17 +25,6 @@ Gemfile:
|
|||||||
- mswin
|
- mswin
|
||||||
- mingw
|
- mingw
|
||||||
- x64_mingw
|
- x64_mingw
|
||||||
- gem: beaker
|
|
||||||
version: '~> 3.13'
|
|
||||||
from_env: BEAKER_VERSION
|
|
||||||
- gem: beaker-abs
|
|
||||||
from_env: BEAKER_ABS_VERSION
|
|
||||||
version: '~> 0.1'
|
|
||||||
- gem: beaker-pe
|
|
||||||
- gem: beaker-hostgenerator
|
|
||||||
from_env: BEAKER_HOSTGENERATOR_VERSION
|
|
||||||
- gem: beaker-rspec
|
|
||||||
from_env: BEAKER_RSPEC_VERSION
|
|
||||||
|
|
||||||
appveyor.yml:
|
appveyor.yml:
|
||||||
delete: true
|
delete: true
|
||||||
|
|||||||
21
.travis.yml
21
.travis.yml
@@ -13,26 +13,26 @@ script:
|
|||||||
- 'bundle exec rake $CHECK'
|
- 'bundle exec rake $CHECK'
|
||||||
bundler_args: --without system_tests
|
bundler_args: --without system_tests
|
||||||
rvm:
|
rvm:
|
||||||
- 2.4.4
|
- 2.5.0
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0"
|
- BEAKER_PUPPET_COLLECTION=puppet6 PUPPET_GEM_VERSION="~> 6.0"
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
-
|
-
|
||||||
bundler_args:
|
bundler_args:
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply
|
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply
|
||||||
rvm: 2.4.4
|
rvm: 2.5.0
|
||||||
script: bundle exec rake beaker
|
script: bundle exec rake beaker
|
||||||
services: docker
|
services: docker
|
||||||
sudo: required
|
sudo: required
|
||||||
-
|
-
|
||||||
bundler_args:
|
bundler_args:
|
||||||
dist: trusty
|
dist: trusty
|
||||||
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
|
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
|
||||||
rvm: 2.4.4
|
rvm: 2.5.0
|
||||||
script: bundle exec rake beaker
|
script: bundle exec rake beaker
|
||||||
services: docker
|
services: docker
|
||||||
sudo: required
|
sudo: required
|
||||||
@@ -40,14 +40,17 @@ matrix:
|
|||||||
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
|
env: CHECK="syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop"
|
||||||
-
|
-
|
||||||
env: CHECK=parallel_spec
|
env: CHECK=parallel_spec
|
||||||
|
-
|
||||||
|
env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec
|
||||||
|
rvm: 2.4.4
|
||||||
-
|
-
|
||||||
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
|
env: PUPPET_GEM_VERSION="~> 4.0" CHECK=parallel_spec
|
||||||
rvm: 2.1.9
|
rvm: 2.1.9
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- /^v\d/
|
- /^v\d/
|
||||||
- release
|
- release
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
deploy:
|
deploy:
|
||||||
|
|||||||
16
CHANGELOG.md
16
CHANGELOG.md
@@ -2,6 +2,22 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
|
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
|
||||||
|
|
||||||
|
## [3.2.0](https://github.com/puppetlabs/puppetlabs-java/tree/3.2.0) (2018-09-27)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/puppetlabs-java/compare/3.1.0...3.2.0)
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- pdksync - \(MODULES-6805\) metadata.json shows support for puppet 6 [\#317](https://github.com/puppetlabs/puppetlabs-java/pull/317) ([tphoney](https://github.com/tphoney))
|
||||||
|
|
||||||
|
## [3.1.0](https://github.com/puppetlabs/puppetlabs-java/tree/3.1.0) (2018-09-06)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/puppetlabs-java/compare/3.0.0...3.1.0)
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- pdksync - \(MODULES-7705\) - Bumping stdlib dependency from \< 5.0.0 to \< 6.0.0 [\#310](https://github.com/puppetlabs/puppetlabs-java/pull/310) ([pmcmaw](https://github.com/pmcmaw))
|
||||||
|
|
||||||
## [3.0.0](https://github.com/puppetlabs/puppetlabs-java/tree/3.0.0) (2018-08-13)
|
## [3.0.0](https://github.com/puppetlabs/puppetlabs-java/tree/3.0.0) (2018-08-13)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/puppetlabs/puppetlabs-java/compare/2.4.0...3.0.0)
|
[Full Changelog](https://github.com/puppetlabs/puppetlabs-java/compare/2.4.0...3.0.0)
|
||||||
|
|||||||
31
Gemfile
31
Gemfile
@@ -1,25 +1,18 @@
|
|||||||
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
||||||
|
|
||||||
def location_for(place_or_version, fake_version = nil)
|
def location_for(place_or_version, fake_version = nil)
|
||||||
if place_or_version =~ %r{\A(git[:@][^#]*)#(.*)}
|
git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
|
||||||
[fake_version, { git: Regexp.last_match(1), branch: Regexp.last_match(2), require: false }].compact
|
file_url_regex = %r{\Afile:\/\/(?<path>.*)}
|
||||||
elsif place_or_version =~ %r{\Afile:\/\/(.*)}
|
|
||||||
['>= 0', { path: File.expand_path(Regexp.last_match(1)), require: false }]
|
if place_or_version && (git_url = place_or_version.match(git_url_regex))
|
||||||
|
[fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
|
||||||
|
elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
|
||||||
|
['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
|
||||||
else
|
else
|
||||||
[place_or_version, { require: false }]
|
[place_or_version, { require: false }]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def gem_type(place_or_version)
|
|
||||||
if place_or_version =~ %r{\Agit[:@]}
|
|
||||||
:git
|
|
||||||
elsif !place_or_version.nil? && place_or_version.start_with?('file:')
|
|
||||||
:file
|
|
||||||
else
|
|
||||||
:gem
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
|
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
|
||||||
minor_version = ruby_version_segments[0..1].join('.')
|
minor_version = ruby_version_segments[0..1].join('.')
|
||||||
|
|
||||||
@@ -36,17 +29,11 @@ group :development do
|
|||||||
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 "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')
|
||||||
end
|
end
|
||||||
group :system_tests do
|
group :system_tests do
|
||||||
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
|
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-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
|
||||||
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 3.13')
|
|
||||||
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
|
|
||||||
gem "beaker-pe", require: false
|
|
||||||
gem "beaker-hostgenerator"
|
|
||||||
gem "beaker-rspec"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
puppet_version = ENV['PUPPET_GEM_VERSION']
|
puppet_version = ENV['PUPPET_GEM_VERSION']
|
||||||
puppet_type = gem_type(puppet_version)
|
|
||||||
facter_version = ENV['FACTER_GEM_VERSION']
|
facter_version = ENV['FACTER_GEM_VERSION']
|
||||||
hiera_version = ENV['HIERA_GEM_VERSION']
|
hiera_version = ENV['HIERA_GEM_VERSION']
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "puppetlabs-java",
|
"name": "puppetlabs-java",
|
||||||
"version": "3.0.0",
|
"version": "3.2.0",
|
||||||
"author": "puppetlabs",
|
"author": "puppetlabs",
|
||||||
"summary": "Installs the correct Java package on various platforms.",
|
"summary": "Installs the correct Java package on various platforms.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "puppetlabs/stdlib",
|
"name": "puppetlabs/stdlib",
|
||||||
"version_requirement": ">= 4.13.1 < 5.0.0"
|
"version_requirement": ">= 4.13.1 < 6.0.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "puppet/archive",
|
"name": "puppet/archive",
|
||||||
@@ -84,10 +84,10 @@
|
|||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
"name": "puppet",
|
"name": "puppet",
|
||||||
"version_requirement": ">= 4.7.0 < 6.0.0"
|
"version_requirement": ">= 4.7.0 < 7.0.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"template-url": "https://github.com/puppetlabs/pdk-templates",
|
"template-url": "https://github.com/puppetlabs/pdk-templates",
|
||||||
"template-ref": "1.6.1-0-g6b0d497",
|
"template-ref": "heads/master-0-g8fc95db",
|
||||||
"pdk-version": "1.6.1"
|
"pdk-version": "1.7.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Facts specified here will override the values provided by rspec-puppet-facts.
|
# Facts specified here will override the values provided by rspec-puppet-facts.
|
||||||
---
|
---
|
||||||
concat_basedir: "/tmp"
|
concat_basedir: ""
|
||||||
ipaddress: "172.16.254.254"
|
ipaddress: "172.16.254.254"
|
||||||
is_pe: false
|
is_pe: false
|
||||||
macaddress: "AA:AA:AA:AA:AA:AA"
|
macaddress: "AA:AA:AA:AA:AA:AA"
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
require 'puppetlabs_spec_helper/module_spec_helper'
|
require 'puppetlabs_spec_helper/module_spec_helper'
|
||||||
require 'rspec-puppet-facts'
|
require 'rspec-puppet-facts'
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
require 'beaker-pe'
|
||||||
|
require 'beaker-puppet'
|
||||||
require 'beaker-rspec'
|
require 'beaker-rspec'
|
||||||
require 'beaker/puppet_install_helper'
|
require 'beaker/puppet_install_helper'
|
||||||
require 'beaker/module_install_helper'
|
require 'beaker/module_install_helper'
|
||||||
|
|
||||||
run_puppet_install_helper
|
run_puppet_install_helper
|
||||||
|
configure_type_defaults_on(hosts)
|
||||||
install_module_on(hosts)
|
install_module_on(hosts)
|
||||||
install_module_dependencies_on(hosts)
|
install_module_dependencies_on(hosts)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user