-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #36 - add acceptance test for puppet4 environment use case
- Loading branch information
Showing
7 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
#require 'vagrant-vmware-workstation' | ||
puts ENV | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.box = "vagrantr10kspec" | ||
config.vm.network "private_network", type: "dhcp" | ||
|
||
# r10k plugin to deploy puppet modules | ||
config.r10k.puppet_dir = "environments/myenv" | ||
config.r10k.puppetfile_path = "environments/myenv/Puppetfile" | ||
config.r10k.module_path = "environments/myenv/modules" | ||
|
||
# Provision the machine with the appliction | ||
config.vm.provision "puppet" do |puppet| | ||
puppet.environment = "myenv" | ||
puppet.environment_path = "environments" | ||
end | ||
end |
Empty file.
12 changes: 12 additions & 0 deletions
12
spec/acceptance/skeletons/puppet4/environments/myenv/Puppetfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This is currently a noop but will be supported in the future. | ||
forge 'forge.puppetlabs.com' | ||
|
||
# v1.0.1 -> cdb8d7a186846b49326cec1cfb4623bd77529b04 | ||
mod 'reviewboard', | ||
:git => 'https://github.com/jantman/puppet-reviewboard.git', | ||
:ref => 'v1.0.1' | ||
|
||
# 0.1.0 -> 3a504b5f66ebe1853bda4ee065fce18118958d84 | ||
mod 'nodemeister', | ||
:git => 'https://github.com/jantman/puppet-nodemeister.git', | ||
:ref => '0.1.0' |
1 change: 1 addition & 0 deletions
1
spec/acceptance/skeletons/puppet4/environments/myenv/manifests/site.pp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
notify {'vagrant-r10k puppet run': } |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# helper script to determine if a git clone is checked out to a | ||
# PR, tag, or branch, and then output some information about the status | ||
if [ $# -gt 0 ]; then | ||
cd $1 | ||
fi | ||
origin=$(git remote show -n origin | grep 'Fetch URL:' | awk '{print $3}') | ||
if tmp=$(git status | grep "refs/pull/origin"); then | ||
foo=$(echo "$tmp" | awk '{print $4}' | awk -F / '{print $4}') | ||
echo "PR: ${foo} @ $(git rev-parse HEAD) (origin: ${origin})" | ||
elif tagname=$(git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null); then | ||
echo "tag: ${tagname} @ $(git rev-parse HEAD) (origin: ${origin})" | ||
elif git symbolic-ref -q HEAD &>/dev/null; then | ||
branch_name=$(git symbolic-ref -q HEAD) | ||
branch_name=${branch_name##refs/heads/} | ||
branch_name=${branch_name:-HEAD} | ||
echo "branch: ${branch_name} @ $(git rev-parse HEAD) (origin: ${origin})" | ||
else | ||
echo "sha: $(git rev-parse HEAD) (origin: ${origin})" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters