-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixed lint errors - drop support for Ansible 2.2
- Loading branch information
1 parent
3648a56
commit 864d243
Showing
33 changed files
with
1,105 additions
and
195 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,12 @@ | ||
.bundle | ||
docker | ||
.dockerignore | ||
Gemfile* | ||
.git* | ||
.pre-commit-config.yaml | ||
*.md | ||
.travis.yml | ||
.kitchen* | ||
Rakefile | ||
test* | ||
vendor |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ build | |
.project | ||
.pydevproject | ||
.settings/ | ||
.venv/ | ||
|
||
# Mac OS X stuff... | ||
.DS_Store | ||
|
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 @@ | ||
system |
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,8 @@ | ||
--- | ||
# Convenience for Inspec tests | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
|
||
Metrics/LineLength: | ||
Enabled: false |
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 |
---|---|---|
@@ -1,60 +1,36 @@ | ||
--- | ||
dist: trusty | ||
sudo: required | ||
env: | ||
matrix: | ||
- distro: centos7 | ||
- distro: centos6 | ||
- distro: fedora27 | ||
- distro: ubuntu1804 | ||
- distro: ubuntu1604 | ||
- distro: debian9 | ||
- distro: debian8 | ||
|
||
language: ruby | ||
bundler_args: --without=development --binstubs=vendor/bin | ||
|
||
language: python | ||
services: | ||
- docker | ||
|
||
cache: | ||
bundler: true | ||
directories: | ||
- $HOME/.cache/pip | ||
- $HOME/.gilt/clone | ||
- $HOME/.inspec/cache | ||
|
||
before_cache: | ||
- rm -f $HOME/.cache/pip/log/debug.log | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
- sudo apt-get update | ||
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce | ||
|
||
environment: | ||
PIPENV_VENV_IN_PROJECT=1 | ||
|
||
install: | ||
- pip install pipenv | ||
- pipenv sync --dev | ||
- bundle install --without=development --binstubs=vendor/bin | ||
|
||
script: | ||
# Configure test script so we can run extra tests after playbook is run. | ||
- export container_id=$(date +%s) | ||
- export cleanup=false | ||
|
||
# Download test shim. | ||
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/ | ||
- chmod +x ${PWD}/tests/test.sh | ||
|
||
# Run tests. | ||
- ${PWD}/tests/test.sh | ||
- ${PWD}/vendor/bin/inspec exec tests/profile -t docker://${container_id} --color --reporter=cli | ||
|
||
# Cleanup | ||
- docker rm -f ${container_id} | ||
|
||
stages: | ||
- lint | ||
- test | ||
|
||
jobs: | ||
include: | ||
- stage: lint | ||
before_install: pip install --user pre-commit | ||
install: pre-commit install | ||
script: pre-commit run --all-files | ||
# Run tests | ||
- pipenv run molecule test --all | ||
|
||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ |
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,19 @@ | ||
extends: default | ||
ignore: | | ||
.pre-commit-config.yaml | ||
.travis.yml | ||
vendor/ | ||
|
||
rules: | ||
braces: | ||
max-spaces-inside: 1 | ||
level: error | ||
brackets: | ||
max-spaces-inside: 1 | ||
level: error | ||
comments: | ||
require-starting-space: false | ||
line-length: disable | ||
# NOTE(retr0h): Templates no longer fail this lint rule. | ||
# Uncomment if running old Molecule templates. | ||
# truthy: disable |
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 |
---|---|---|
|
@@ -2,5 +2,6 @@ source "https://rubygems.org" | |
|
||
group :test do | ||
gem 'inspec' | ||
gem 'rubocop' | ||
gem 'travis' | ||
end |
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
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,17 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
molecule = "*" | ||
ansible = "*" | ||
pre-commit = "*" | ||
yamllint = "*" | ||
docker = "*" | ||
python-gilt = "*" | ||
|
||
[packages] | ||
|
||
[requires] | ||
python_version = "2.7" |
Oops, something went wrong.