This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(GH-12) Add example spec puppet configuration
This commit mocks up a configuration file for pupetlabs_spec_helper. The accompanying Dockerfile demonstrates how this would be translated into a docker image.
- Loading branch information
Showing
3 changed files
with
48 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,26 @@ | ||
# based upon the work in https://github.com/da-ar/pcv-test/ | ||
# this file is a mock up of what a generated file based on the prm-config.yml | ||
# would have to contain in order to work. | ||
|
||
# build with: | ||
# docker build -t pdk:puppet-7.11.0-puppet_spec -f examples/tools/spec_puppet/Dockerfile . | ||
|
||
# run with: | ||
# needs_write_access: true | ||
# docker run -v ${PWD}:/module -w /module pdk:puppet-7.11.0-puppet_spec | ||
|
||
# gem - gems need ruby - so get puppet... | ||
FROM puppet/puppet-agent:7.11.0 | ||
# requires_git: true | ||
RUN apt update | ||
RUN apt install git -y | ||
# name: [puppetlabs_spec_helper, rspec-puppet-facts] | ||
RUN /opt/puppetlabs/puppet/bin/gem install puppetlabs_spec_helper --no-document | ||
RUN /opt/puppetlabs/puppet/bin/gem install rspec-puppet-facts --no-document | ||
COPY examples/tools/spec_puppet/content/Rakefile /tmp/Rakefile | ||
VOLUME [ "/module" ] | ||
|
||
# executable: rake | ||
ENTRYPOINT [ "/opt/puppetlabs/puppet/bin/rake" ,"-f", "/tmp/Rakefile"] | ||
# default_args: [spec] | ||
CMD [ "spec" ] |
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 @@ | ||
require 'puppetlabs_spec_helper/rake_tasks' |
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 @@ | ||
--- | ||
plugin: | ||
author: puppetlabs | ||
id: spec_puppet | ||
display: Spec Puppet | ||
version: 0.1.0 | ||
upstream_project_url: https://github.com/puppetlabs/puppetlabs_spec_helper | ||
|
||
gem: | ||
build_tools: false | ||
name: [puppetlabs_spec_helper, rspec-puppet-facts] | ||
executable: rake | ||
|
||
common: | ||
requires_git: true # suggested new | ||
can_validate: true | ||
needs_write_access: true | ||
default_args: [spec] | ||
help_arg: '--help' | ||
success_exit_code: 0 | ||
interleave_stdout_err: false |