mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
Merge pull request #4076 from inspec/lcg/kitchen-rake-testing
Add kitchen rake testing
This commit is contained in:
commit
76cc58c559
3 changed files with 40 additions and 0 deletions
4
kitchen/rake-tests/Gemfile
Normal file
4
kitchen/rake-tests/Gemfile
Normal file
|
@ -0,0 +1,4 @@
|
|||
source "https://www.rubygems.org"
|
||||
|
||||
gem "test-kitchen"
|
||||
gem "kitchen-docker"
|
12
kitchen/rake-tests/bootstrap.sh
Normal file
12
kitchen/rake-tests/bootstrap.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "STARTING PROVISIONER"
|
||||
|
||||
export PATH=/opt/inspec/embedded/bin:$PATH
|
||||
cd /inspec
|
||||
gem install bundler
|
||||
bundle install
|
||||
gem build inspec
|
||||
gem install ./inspec-*.gem
|
||||
|
||||
echo "ENDING PROVISIONER"
|
24
kitchen/rake-tests/kitchen.yml
Normal file
24
kitchen/rake-tests/kitchen.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
driver:
|
||||
name: docker
|
||||
|
||||
platforms:
|
||||
- name: ubuntu-18.04
|
||||
driver_config:
|
||||
image: ubuntu:18.04
|
||||
platform: ubuntu
|
||||
provision_command:
|
||||
- curl -L https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
|
||||
- apt-get -y install build-essential
|
||||
require_chef_omnibus: false
|
||||
volume: <%= File.expand_path("../..", File.dirname(__FILE__)) %>:/inspec
|
||||
|
||||
provisioner:
|
||||
name: shell
|
||||
|
||||
verifier:
|
||||
name: shell
|
||||
remote_exec: true
|
||||
command: cd /inspec && PATH=/opt/inspec/embedded/bin:$PATH bundle exec rake test
|
||||
|
||||
suites:
|
||||
- name: default
|
Loading…
Reference in a new issue