Just wanted to share what approach I'm following to test Pull Requests for the trulabs Asterisk Puppet module.
Run a docker container, choosing the base target distribution, e.g. one of:
Inside the Docker container, set up some preconditions:
Clone the git project:
Create a new branch:
Checkout the project from which the Pull Request is created:
Build and install the Asterisk Puppet module built with this Pull Request changes:
(You typically need the concat module as a dependency:)
Run puppet apply with the desired test manifest
Et voilá. (Note that this will use the stock Puppet version - more to follow about safely configure Puppet 3.7 on any host).
Run a docker container, choosing the base target distribution, e.g. one of:
docker run -i -t debian:wheezy /bin/bash
docker run -i -t ubuntu:precise /bin/bash
docker run -i -t ubuntu:trusty /bin/bash
Inside the Docker container, set up some preconditions:
apt-get update
apt-get install -y git
apt-get install -y puppet
apt-get install -y vim
Clone the git project:
mkdir -p git/trulabs
cd git/trulabs
git clone https://github.com/trulabs/puppet-asterisk.git
cd puppet-asterisk
Create a new branch:
git checkout -b PULL_REQUEST_BRANCH master
Checkout the project from which the Pull Request is created:
git pull https://github.com/CONTRIBUTOR/puppet-asterisk.git PULL_REQUEST_NAME
Build and install the Asterisk Puppet module built with this Pull Request changes:
puppet module build .
puppet module install pkg/trulabs-asterisk-VERSION.tar.gz --ignore-dependencies
(You typically need the concat module as a dependency:)
puppet module install puppetlabs-concat
Run puppet apply with the desired test manifest
puppet apply -v tests/TESTCASE.pp --modulepath modules/:/etc/puppet/modules --show_diff --noop
Et voilá. (Note that this will use the stock Puppet version - more to follow about safely configure Puppet 3.7 on any host).