3 changes: 0 additions & 3 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ fixtures:
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: "https://github.com/gentoo/puppet-portage.git"
ref: "2.3.0"
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ You can install all needed gems for spec tests into the modules directory by
running:

```sh
bundle install --path .vendor/ --without development --without system_tests --without release
bundle install --path .vendor/ --without development system_tests release
```

If you also want to run acceptance tests:

```sh
bundle install --path .vendor/ --without development --with system_tests --without release
bundle install --path .vendor/ --with system_tests --without development release
```

Our all in one solution if you don't know if you need to install or update gems:

```sh
bundle install --path .vendor/ --without development --with system_tests --without release; bundle update; bundle clean
bundle install --path .vendor/ --with system_tests --without development release; bundle update; bundle clean
```

## Syntax and style
Expand Down
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Thank you for contributing to this project!
-->
#### Pull Request (PR) description
<!--
Replace this comment with a description of your pull request.
Replace this comment with a description of your pull request.
-->

#### This Pull Request (PR) fixes the following issues
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '2.3.1'
modulesync_config_version: '2.7.0'
50 changes: 12 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,52 @@
---
sudo: false
dist: trusty
dist: xenial
language: ruby
cache: bundler
before_install:
- rm -f Gemfile.lock
- gem update --system
- gem update bundler
- bundle --version
script:
- 'bundle exec rake $CHECK'
matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=12
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 6.0" CHECK=test_with_coveralls
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 6.0" CHECK=rubocop
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=ubuntu1404-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6-nightly BEAKER_debug=true BEAKER_setfile=centos7-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
- rvm: 2.5.3
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=centos6-64 BEAKER_HYPERVISOR=docker CHECK=beaker
services: docker
sudo: required
branches:
only:
- master
Expand Down
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@ 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.

## [v7.0.0](https://github.com/voxpupuli/puppet-r10k/tree/v7.0.0) (2019-06-18)

[Full Changelog](https://github.com/voxpupuli/puppet-r10k/compare/v6.8.0...v7.0.0)

**Breaking changes:**

- modulesync 2.7.0 and drop puppet 4 [\#482](https://github.com/voxpupuli/puppet-r10k/pull/482) ([bastelfreak](https://github.com/bastelfreak))

**Implemented enhancements:**

- \(Feature\) webhook should support github secrets [\#102](https://github.com/voxpupuli/puppet-r10k/issues/102)
- Add support for proxy settings [\#487](https://github.com/voxpupuli/puppet-r10k/pull/487) ([dhoppe](https://github.com/dhoppe))
- Adding BitBucket Server secret support. [\#464](https://github.com/voxpupuli/puppet-r10k/pull/464) ([venushka](https://github.com/venushka))

**Closed issues:**

- webhook swallowing r10k error messages [\#472](https://github.com/voxpupuli/puppet-r10k/issues/472)
- support the "proxy" general setting [\#468](https://github.com/voxpupuli/puppet-r10k/issues/468)
- \(Feature\) webhook should support BitBucket server's secrets [\#463](https://github.com/voxpupuli/puppet-r10k/issues/463)
- Using exec in run\_command replaces process and skips notify\_\* calls [\#441](https://github.com/voxpupuli/puppet-r10k/issues/441)
- Acceptance tests failing with permissions error: [\#346](https://github.com/voxpupuli/puppet-r10k/issues/346)
- failing beaker tests [\#310](https://github.com/voxpupuli/puppet-r10k/issues/310)

**Merged pull requests:**

- Wrap slack\_icon with colons [\#495](https://github.com/voxpupuli/puppet-r10k/pull/495) ([0x6d617474](https://github.com/0x6d617474))
- Remove support for providers yum, zypper [\#489](https://github.com/voxpupuli/puppet-r10k/pull/489) ([dhoppe](https://github.com/dhoppe))
- Allow `puppetlabs/stdlib` 6.x [\#486](https://github.com/voxpupuli/puppet-r10k/pull/486) ([alexjfisher](https://github.com/alexjfisher))
- Webhook improvements [\#485](https://github.com/voxpupuli/puppet-r10k/pull/485) ([0x6d617474](https://github.com/0x6d617474))
- Convert mocha to rspec-mocks [\#484](https://github.com/voxpupuli/puppet-r10k/pull/484) ([dhoppe](https://github.com/dhoppe))
- Allow puppetlabs/inifile 3.x [\#483](https://github.com/voxpupuli/puppet-r10k/pull/483) ([dhoppe](https://github.com/dhoppe))
- Unify docs [\#481](https://github.com/voxpupuli/puppet-r10k/pull/481) ([DavidS](https://github.com/DavidS))
- Remove Gentoo/portage related code as is it not supported. [\#480](https://github.com/voxpupuli/puppet-r10k/pull/480) ([ghoneycutt](https://github.com/ghoneycutt))
- Acceptance tests run requests in parallel commented [\#470](https://github.com/voxpupuli/puppet-r10k/pull/470) ([Dan33l](https://github.com/Dan33l))

## [v6.8.0](https://github.com/voxpupuli/puppet-r10k/tree/v6.8.0) (2018-12-23)

[Full Changelog](https://github.com/voxpupuli/puppet-r10k/compare/v6.7.0...v6.8.0)
Expand Down Expand Up @@ -246,6 +281,7 @@ These should not affect the functionality of the module.
- Use styleguide compliant syntax for sshkey example. [\#353](https://github.com/voxpupuli/puppet-r10k/pull/353) ([kallies](https://github.com/kallies))
- Fix webhook slack\_username parameter handling [\#350](https://github.com/voxpupuli/puppet-r10k/pull/350) ([alexbrett](https://github.com/alexbrett))
- Webhook Background mode [\#349](https://github.com/voxpupuli/puppet-r10k/pull/349) ([luckyraul](https://github.com/luckyraul))
- Cleanup webhook use case notes; specifically PE/FOSS split. [\#338](https://github.com/voxpupuli/puppet-r10k/pull/338) ([rnelson0](https://github.com/rnelson0))

## [v5.0.0](https://github.com/voxpupuli/puppet-r10k/tree/v5.0.0) (2017-03-07)

Expand All @@ -260,7 +296,6 @@ These should not affect the functionality of the module.
- r10k.yaml contents indentation is incorrect [\#345](https://github.com/voxpupuli/puppet-r10k/pull/345) ([Kotty666](https://github.com/Kotty666))
- Update yaml location for \>PE3 [\#343](https://github.com/voxpupuli/puppet-r10k/pull/343) ([rnelson0](https://github.com/rnelson0))
- replace all validate functions with datatypes [\#341](https://github.com/voxpupuli/puppet-r10k/pull/341) ([bastelfreak](https://github.com/bastelfreak))
- Cleanup webhook use case notes; specifically PE/FOSS split. [\#338](https://github.com/voxpupuli/puppet-r10k/pull/338) ([rnelson0](https://github.com/rnelson0))
- Remove support for Puppet 3 and Ruby \<2.0.0 [\#321](https://github.com/voxpupuli/puppet-r10k/pull/321) ([rnelson0](https://github.com/rnelson0))
- Ensure webhook run folder exists on redhat systemd environments [\#283](https://github.com/voxpupuli/puppet-r10k/pull/283) ([luisfdez](https://github.com/luisfdez))

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.5.1
FROM ruby:2.5.3

WORKDIR /opt/puppet

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

group :test do
gem 'puppetlabs_spec_helper', '>= 2.11.0', :require => false
gem 'puppetlabs_spec_helper', '>= 2.14.0', :require => false
gem 'rspec-puppet-facts', '>= 1.8.0', :require => false
gem 'rspec-puppet-utils', :require => false
gem 'puppet-lint-leading_zero-check', :require => false
Expand All @@ -20,16 +20,15 @@ group :test do
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'puppet-lint-absolute_classname-check', :require => false
gem 'metadata-json-lint', :require => false
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.49.1', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop', '~> 0.49.1', :require => false
gem 'rubocop-rspec', '~> 1.15.0', :require => false
gem 'mocha', '~> 1.4.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2'
gem 'parallel_tests', '2.24.0', :require => false if RUBY_VERSION < '2.2.0'
gem 'parallel_tests', :require => false if RUBY_VERSION >= '2.2.0'
gem 'parallel_tests', :require => false
end

group :development do
Expand Down Expand Up @@ -57,16 +56,16 @@ group :system_tests do
gem 'beaker-puppet', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'rbnacl', '>= 4', :require => false if RUBY_VERSION >= '2.2.6'
gem 'rbnacl-libsodium', :require => false if RUBY_VERSION >= '2.2.6'
gem 'rbnacl', '>= 4', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', :require => false
end

group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator' if RUBY_VERSION >= '2.2.2'
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
gem 'puppet-strings', '>= 1.0', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
end


Expand All @@ -77,7 +76,7 @@ else
gem 'facter', :require => false, :groups => [:test]
end

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

# vim: syntax=ruby
72 changes: 60 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,33 @@ _Note: It is recommended you migrate to using the `pe_r10k` module which is basi
a clone of this modules features and file tickets for anything missing._


## Usage
### Using an internal gem server

Installing using a proxy server
Create a global gemrc for Puppet Enterprise to add the local gem source. See http://projects.puppetlabs.com/issues/18053#note-12 for more information.

```puppet
file { '/opt/puppet/etc':
ensure => 'directory',
owner => 'root',
group => '0',
mode => '0755',
}
file { 'gemrc':
ensure => 'file',
path => '/opt/puppet/etc/gemrc',
owner => 'root',
group => '0',
mode => '0644',
content => "---\nupdate_sources: true\n:sources:\n- http://your.internal.gem.server.com/rubygems/\n",
}
class { 'r10k':
remote => 'git@github.com:someuser/puppet.git',
provider => 'pe_gem',
require => File['gemrc'],
}
```

### Mcollective Support
![alt tag](https://gist.githubusercontent.com/acidprime/7013041/raw/1a99e0a8d28b13bc20b74d2dc4ab60c7e752088c/post_recieve_overview.png)
Expand Down Expand Up @@ -202,6 +226,17 @@ An example post-receive hook is included in the files directory.
This hook can automatically cause code to synchronize on your
servers at time of push in git. More modern git systems use webhooks, for those see below.

#### Passing proxy info through mco

The mcollective agent can be configured to supply r10k/git environment `http_proxy`, `https_proxy` variables via the following example

```puppet
class { '::r10k::mcollective':
http_proxy => 'http://proxy.example.lan:3128',
git_ssl_no_verify => 1,
}
```

### Install mcollective support for post receive hooks
Install the `mco` command from the puppet enterprise installation directory i.e.
```shell
Expand Down Expand Up @@ -352,7 +387,7 @@ git_webhook { 'web_post_receive_webhook_for_module' :
### Webhook Bitbucket Example
This is an example of using the webhook with Atlassian Bitbucket (former Stash).
Requires the `external hooks` addon by https://marketplace.atlassian.com/plugins/com.ngs.stash.externalhooks.external-hooks/server/overview
and a specific Bitbucket user/pass.
and a specific Bitbucket user/pass.
Remember to place the `stash_mco.rb` on the bitbucket server an make it executable.
Enable the webhook over the repository settings `External Async Post Receive Hook`:
- Executable: e.g. `/opt/atlassian/bitbucket-data/external-hooks/stash_mco.rb` (see hook_exe)
Expand All @@ -362,9 +397,9 @@ Enable the webhook over the repository settings `External Async Post Receive Hoo
# Add deploy key
git_deploy_key { 'add_deploy_key_to_puppet_control':
ensure => present,
name => $::fqdn,
name => $::fqdn,
path => '/root/.ssh/id_rsa.pub',
username => 'api',
username => 'api',
password => 'pass',
project_name => 'project',
repo_name => 'puppet',
Expand All @@ -382,7 +417,7 @@ git_webhook { 'web_post_receive_webhook' :
repo_name => 'puppet',
server_url => 'https://git.example.com',
provider => 'stash',
hook_exe => '/opt/atlassian/bitbucket-data/external-hooks/stash_mco.rb',
hook_exe => '/opt/atlassian/bitbucket-data/external-hooks/stash_mco.rb',
}
```

Expand All @@ -402,6 +437,22 @@ class { 'r10k::webhook':
}
```

### BitBucket Server Secret Support
BitBucket webhooks allow the use of a secret value that gets hashed against the payload to pass a
signature in the request X-Hub-Signature header. To support the secret with the webhook do the
following type of configuration.

```puppet
class { 'r10k::webhook::config':
protected => false,
bitbucket_secret => 'THISISTHEBITBUCKETWEBHOOKSECRET',
}
class { 'r10k::webhook':
require => Class['r10k::webhook::config'],
}
```

### Webhook - remove webhook init script and config file.
For use when moving to Code Manager, or other solutions, and the webhook should be removed.
```puppet
Expand Down Expand Up @@ -701,6 +752,9 @@ Deprecated: declare a resource for managing `modulepath` in Puppet.conf
##### `manage_ruby_dependency`
When using system ruby , options on how to declare

##### `proxy`
A string setting the`r10k.yaml` configuration value of the same name

##### `r10k_basedir`
This module requires the [puppetlabs-ruby](https://github.com/puppetlabs/puppetlabs-ruby.git) module. In the event that your environment already includes
the module with some customization, you can use the `manage_ruby_dependency`
Expand All @@ -724,15 +778,9 @@ The name of the package to be installed via the provider
##### `provider`
The supported installation modes for this module

* portage
* yum
* bundle
* puppet_gem
* gem
* zypper

##### `gentoo_keywords`
See `r10k::install::portage` class for more information

##### `install_options`
Options to pass to the `provider` declaration
Expand Down
Loading