Skip to content

Commit

Permalink
Introduce pdk as Puppet module build
Browse files Browse the repository at this point in the history
* Drop Puppet 4 support.
  • Loading branch information
cliffano committed Oct 19, 2018
1 parent 9233cbd commit 5d3b0b1
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 39 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ junit/
*.iml
.*.sw
.yardoc
bin/
29 changes: 29 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.git/
.*.sw[op]
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/Makefile
/pkg/
/Rakefile
/spec/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/test/integration/modules/
/test/
/tmp/
/vendor/
/convert_report.txt
/update_report.txt
.DS_Store
10 changes: 0 additions & 10 deletions .pmtignore

This file was deleted.

22 changes: 11 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
sudo: false
sudo: required

language: ruby
rvm:
- "ruby-2.2.5"
- "ruby-2.3.3"
env:
matrix:
- PUPPET_VERSION="~> 4.4.0"
- PUPPET_VERSION="~> 4.5.0"
- PUPPET_VERSION="~> 4.7.0"
- PUPPET_VERSION="~> 4.8.0"
- PUPPET_VERSION="~> 4.9.0"

services:
- docker

before_install:
- docker pull shinesolutions/aem-platform-buildenv

script:
- docker run --rm --workdir /opt/workspace -v `pwd`:/opt/workspace -i -t shinesolutions/aem-platform-buildenv bash -c "make ci"
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### 1.1.2
* Introducing new parameter to manage tomcat package installation #6
* Introduce pdk as Puppet module build
* Drop Puppet 4 support

### 1.1.1
* Exclude proxy-related client properties when value is empty #3
Expand Down
15 changes: 4 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ group :test do
end

group :development do
gem 'facter', '2.5.1', require: false
gem 'puppet', '5.5.6', require: false
gem 'puppet-lint', require: false
gem 'rubocop', require: false
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
Expand All @@ -54,21 +58,10 @@ group :system_tests do
gem 'beaker-puppet_install_helper', :require => false
end



if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion.to_s, :require => false, :groups => [:test]
else
gem 'facter', :require => false, :groups => [:test]
end

if hieraversion = ENV['HIERA_GEM_VERSION']
gem 'hiera', hieraversion.to_s, :require => false, :groups => [:test]
else
gem 'hiera', :require => false, :groups => [:test]
end

ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 4.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
26 changes: 20 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,27 @@ GENERATED_CLASSES := manifests/chaos_properties.pp \
manifests/simianarmy_properties.pp \
manifests/volume_tagging_properties.pp

ci: clean Gemfile.lock generated
ci: clean deps lint generated package
bundle exec rake

generated: $(GENERATED_CLASSES)

Gemfile.lock: Gemfile
bundle install
deps:
gem install bundler
bundle config --local path vendor/bundle
bundle install --binstubs

lint:
bundle exec puppet-lint \
--fail-on-warnings \
--no-140chars-check \
--no-autoloader_layout-check \
--no-documentation-check \
manifests/*/*.pp \
manifests/*.pp
# puppet epp validate templates/*.epp
# bundle exec rubocop --config .rubocop.yml Gemfile
pdk validate metadata

manifests/%.pp: generate/%.yaml
gen_java_properties_class $<
Expand All @@ -22,7 +36,7 @@ clean:
test-integration:
echo "TODO"

build:
bundle exec puppet module build .
package:
pdk build --force

.PHONY: ci clean test-integration build generated
.PHONY: ci clean deps lint test-integration package generated
13 changes: 12 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"license": "Apache-2.0",
"summary": "Puppet module for provisioning Netflix Simian Army",
"source": "http://github.com/shinesolutions/puppet-simianarmy",
"project_page": "https://github.com/shinesolutions/puppet-simianarmy",
"issues_url": "https://github.com/shinesolutions/puppet-simianarmy/issues/",
"dependencies": [
{ "name": "puppet/archive", "version_requirement": "1.3.x" },
{ "name": "puppetlabs/stdlib", "version_requirement": "4.x" }
Expand All @@ -13,5 +15,14 @@
"tags": [
"netflix-simianarmy"
],
"data_provider": "hiera"
"data_provider": "hiera",
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 5.0.0 < 7.0.0"
}
],
"pdk-version": "1.7.0",
"template-url": "file:///opt/puppetlabs/pdk/share/cache/pdk-templates.git",
"template-ref": "1.7.0-0-g57412ed"
}

0 comments on commit 5d3b0b1

Please sign in to comment.