1
0
mirror of https://github.com/dev-sec/ansible-nginx-hardening.git synced 2024-11-22 15:32:01 +01:00

only run certain tests in travis and kitchen

This commit is contained in:
Sebastian Gumprich 2018-09-08 14:56:45 +02:00
parent e62ec36755
commit ce11a7e6d8
2 changed files with 21 additions and 3 deletions

@ -86,7 +86,24 @@ verifier:
name: inspec
sudo: true
inspec_tests:
- https://github.com/dev-sec/nginx-baseline
- ../nginx-baseline
#- https://github.com/dev-sec/nginx-baseline
controls:
- nginx-01
- nginx-02
- nginx-03
- nginx-04
- nginx-05
- nginx-06
- nginx-07
- nginx-08
- nginx-09
- nginx-10
- nginx-12
- nginx-13
- nginx-14
- nginx-15
- nginx-17
suites:
- name: nginx

@ -54,13 +54,14 @@ script:
- 'docker run --detach --volume="${PWD}":/etc/ansible/roles/ansible-nginx-hardening:ro ${run_opts} rndmh3ro/docker-${distro}-ansible:${version} "${init}" > "${container_id}"'
# Install ansible galaxy requirements
- 'docker exec "$(cat ${container_id})" ansible-galaxy install -r /etc/ansible/roles/ansible-nginx-hardening/requirements.yml -p /etc/ansible/roles/'
- 'docker exec "$(cat ${container_id})" ansible-galaxy -c install -r /etc/ansible/roles/ansible-nginx-hardening/requirements.yml -p /etc/ansible/roles/'
# Test role.
- 'docker exec "$(cat ${container_id})" ansible-playbook /etc/ansible/roles/ansible-nginx-hardening/tests/test.yml -vv'
# Verify role
- 'inspec exec https://github.com/dev-sec/nginx-baseline/ -t docker://$(cat ${container_id})'
#- 'inspec exec https://github.com/dev-sec/nginx-baseline/ -t docker://$(cat ${container_id}) --controls=nginx-01 nginx-02 nginx-03 nginx-04 nginx-05 nginx-06 nginx-07 nginx-08 nginx-09 nginx-10 nginx-12 nginx-13 nginx-14 nginx-15 nginx-17 --no-distinct-exit'
- 'inspec exec https://github.com/dev-sec/nginx-baseline/ -t docker://$(cat ${container_id}) --controls=nginx-01 nginx-02 nginx-03 nginx-05 nginx-06 nginx-07 nginx-08 nginx-09 nginx-10 nginx-12 nginx-13 nginx-15 nginx-17 --no-distinct-exit'
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/