20 changes: 10 additions & 10 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
fixtures:
repositories:
stdlib:
repo: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
ref: "4.13.1"
ruby: "git://github.com/puppetlabs/puppetlabs-ruby.git"
gcc: "git://github.com/puppetlabs/puppetlabs-gcc.git"
pe_gem: "git://github.com/puppetlabs/puppetlabs-pe_gem.git"
make: "git://github.com/voxpupuli/puppet-make.git"
inifile: "git://github.com/puppetlabs/puppetlabs-inifile.git"
vcsrepo: "git://github.com/puppetlabs/puppetlabs-vcsrepo.git"
git: "git://github.com/puppetlabs/puppetlabs-git.git"
repo: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
ref: "4.15.0"
ruby: "https://github.com/puppetlabs/puppetlabs-ruby.git"
gcc: "https://github.com/puppetlabs/puppetlabs-gcc.git"
pe_gem: "https://github.com/puppetlabs/puppetlabs-pe_gem.git"
make: "https://github.com/voxpupuli/puppet-make.git"
inifile: "https://github.com/puppetlabs/puppetlabs-inifile.git"
vcsrepo: "https://github.com/puppetlabs/puppetlabs-vcsrepo.git"
git: "https://github.com/puppetlabs/puppetlabs-git.git"
portage:
repo: "git://github.com/gentoo/puppet-portage.git"
repo: "https://github.com/gentoo/puppet-portage.git"
ref: "2.3.0"
symlinks:
r10k: "#{source_dir}"
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile
for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`.

The easiest way to debug in a docker container is to open a shell:

docker exec -it -u root ${container_id_or_name} bash
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '0.20.1'
modulesync_config_version: '0.21.1'
63 changes: 63 additions & 0 deletions .overcommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Managed by https://github.com/voxpupuli/modulesync_configs
#
# Hooks are only enabled if you take action.
#
# To enable the hooks run:
#
# ```
# bundle exec overcommit --install
# # ensure .overcommit.yml does not harm to you and then
# bundle exec overcommit --sign
# ```
#
# (it will manage the .git/hooks directory):
#
# Examples howto skip a test for a commit or push:
#
# ```
# SKIP=RuboCop git commit
# SKIP=PuppetLint git commit
# SKIP=RakeTask git push
# ```
#
# Don't invoke overcommit at all:
#
# ```
# OVERCOMMIT_DISABLE=1 git commit
# ```
#
# Read more about overcommit: https://github.com/brigade/overcommit
#
# To manage this config yourself in your module add
#
# ```
# .overcommit.yml:
# unmanaged: true
# ```
#
# to your modules .sync.yml config
---
PreCommit:
RuboCop:
enabled: true
description: 'Runs rubocop on modified files only'
command: ['bundle', 'exec', 'rubocop']
PuppetLint:
enabled: true
description: 'Runs puppet-lint on modified files only'
command: ['bundle', 'exec', 'puppet-lint']
YamlSyntax:
enabled: true
JsonSyntax:
enabled: true
TrailingWhitespace:
enabled: true

PrePush:
RakeTarget:
enabled: true
description: 'Run rake targets'
targets:
- 'test'
- 'rubocop'
command: [ 'bundle', 'exec', 'rake' ]
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ AllCops:
- .vendor/**/*
- pkg/**/*
- spec/fixtures/**/*
- Gemfile
- Rakefile
- Guardfile
Lint/ConditionPosition:
Enabled: True

Expand Down Expand Up @@ -519,6 +522,10 @@ RSpec/RepeatedDescription:
RSpec/NestedGroups:
Enabled: False

# this is broken on ruby1.9
Style/IndentHeredoc:
Enabled: False

# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs
Security/YAMLLoad:
Enabled: false
17 changes: 11 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ sudo: false
dist: trusty
language: ruby
cache: bundler
bundler_args: --without system_tests development
before_install:
- bundle -v
- rm Gemfile.lock || true
Expand All @@ -17,16 +16,22 @@ matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2.6
- rvm: 2.2.7
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.3
- rvm: 2.3.4
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.0
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.0
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
- rvm: 2.4.0
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
branches:
only:
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@ 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 impact the functionality of the module.

## [v5.0.2](https://github.com/voxpupuli/puppet-r10k/tree/v5.0.2) (2017-04-06)
## [v6.0.0](https://github.com/voxpupuli/puppet-r10k/tree/v6.0.0) (2017-05-10)
[Full Changelog](https://github.com/voxpupuli/puppet-r10k/compare/v5.0.2...v6.0.0)

**Implemented enhancements:**

- Add slack\_proxy\_url parameter [\#368](https://github.com/voxpupuli/puppet-r10k/pull/368) ([alexjfisher](https://github.com/alexjfisher))

**Closed issues:**

- Support using webhook slack notifier through a proxy [\#367](https://github.com/voxpupuli/puppet-r10k/issues/367)
- webhook gems aren't installable [\#365](https://github.com/voxpupuli/puppet-r10k/issues/365)
- cachedir setting is not idempotent [\#351](https://github.com/voxpupuli/puppet-r10k/issues/351)
- webhook fails to auto-start on Systemd based systems [\#339](https://github.com/voxpupuli/puppet-r10k/issues/339)

**Merged pull requests:**

- BREAKING: Fix webhook installation by pinning sinatra gem [\#366](https://github.com/voxpupuli/puppet-r10k/pull/366) ([alexjfisher](https://github.com/alexjfisher))
- Webhook: ability to pass extra arguments to mco [\#363](https://github.com/voxpupuli/puppet-r10k/pull/363) ([nike38rus](https://github.com/nike38rus))
- use stdlib puppet facts for configuration [\#352](https://github.com/voxpupuli/puppet-r10k/pull/352) ([vchepkov](https://github.com/vchepkov))
- Added /heartbeat url endpoint to webhook [\#272](https://github.com/voxpupuli/puppet-r10k/pull/272) ([thebaron](https://github.com/thebaron))

## [v5.0.2](https://github.com/voxpupuli/puppet-r10k/tree/v5.0.2) (2017-04-07)
[Full Changelog](https://github.com/voxpupuli/puppet-r10k/compare/v5.0.1...v5.0.2)

**Closed issues:**
Expand All @@ -13,6 +34,7 @@ These should not impact the functionality of the module.

**Merged pull requests:**

- Release 5.0.2 [\#361](https://github.com/voxpupuli/puppet-r10k/pull/361) ([dhollinger](https://github.com/dhollinger))
- Add check to fix the ruby path on puppet 4.10.0 [\#360](https://github.com/voxpupuli/puppet-r10k/pull/360) ([dhollinger](https://github.com/dhollinger))
- Webhook: ignore deploying some environments [\#355](https://github.com/voxpupuli/puppet-r10k/pull/355) ([nike38rus](https://github.com/nike38rus))

Expand Down
16 changes: 8 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'puppetlabs_spec_helper', '~> 2.0.1', :require => false
gem 'parallel_tests', :require => false
gem 'puppetlabs_spec_helper', '~> 2.1.1', :require => false
gem 'rspec-puppet', '~> 2.5', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'rspec-puppet-utils', :require => false
Expand All @@ -26,10 +25,10 @@ group :test do
gem 'metadata-json-lint', :require => false
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
gem 'puppet-strings', '~> 1.0.0', :require => false
gem 'puppet-strings', '~> 1.0', :require => false
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.47.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop-rspec', '~> 1.10.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop', '~> 0.48.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'mocha', '>= 1.2.1', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
Expand All @@ -39,9 +38,10 @@ group :test do
end

group :development do
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
gem 'overcommit', '~> 0.39.1', :require => false
end

group :system_tests do
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,11 @@ class { '::r10k::webhook':
}
```

### Webhook sinatra gem installation

By default, the `r10k::webhook::package` class uses the `puppet_gem` provider to install the latest ruby 2.1 compatible version of sinatra ('~> 1.0').
If you are overriding `r10k::webhook::package::provider`, you will also need to override `r10k::webhook::package::sinatra_version`.

### Webhook Slack notifications

You can enable Slack notifications for the webhook. You will need a
Expand All @@ -502,9 +507,10 @@ Then configure the webhook to add your Slack Webhook URL.
```puppet
class { '::r10k::webhook::config':
. . .
slack_webhook => 'http://slack.webhook/webhook', # mandatory for usage
slack_channel => '#channel', # defaults to #default
slack_username => 'r10k', # the username to use
slack_webhook => 'http://slack.webhook/webhook', # mandatory for usage
slack_channel => '#channel', # defaults to #default
slack_username => 'r10k', # the username to use
slack_proxy_url => 'http://proxy.example.com:3128' # Optional. Defaults to undef.
}
```

Expand Down Expand Up @@ -550,6 +556,18 @@ class { '::r10k::webhook::config':
}
```

### Passing extra arguments to mco command

You can pass some additional arguments to mco command like `--no-progress` or `--timeout 60` or any others by specifying them
in the `r10k::webhook::config::mco_arguments` parameter as string:

```puppet
class { '::r10k::webhook::config':
. . .
mco_arguments => '--no-progress'
}
```

## Reference

####Class: `r10k`
Expand Down
2 changes: 0 additions & 2 deletions default_module_facts.yml

This file was deleted.

7 changes: 5 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
$sources = undef
$puppet_master = true

$r10k_basedir = $::settings::environmentpath
$r10k_cache_dir = "${::settings::vardir}/r10k"
$r10k_basedir = $facts['puppet_environmentpath']
$r10k_cache_dir = "${facts['puppet_vardir']}/r10k"
$r10k_config_file = '/etc/puppetlabs/r10k/r10k.yaml'
$r10k_binary = 'r10k'
$puppetconf_path = '/etc/puppetlabs/puppet'
Expand Down Expand Up @@ -143,10 +143,13 @@
$webhook_slack_webhook = undef
$webhook_slack_channel = undef
$webhook_slack_username = undef
$webhook_slack_proxy_url = undef
$webhook_configfile_owner = 'root'
$webhook_configfile_group = $root_group
$webhook_configfile_mode = '0644'
$webhook_ignore_environments = []
$webhook_mco_arguments = undef
$webhook_sinatra_version = '~> 1.0' # Sinatra 2 requires rack 2 which in turn requires ruby 2.2. Puppet 4 AIO ships with ruby 2.1

# Service Settings for SystemD in EL7
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '7' {
Expand Down
Loading