From ce11a7e6d88ef13f3400b0e459906e542b95c60e Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Sat, 8 Sep 2018 14:56:45 +0200 Subject: [PATCH] only run certain tests in travis and kitchen --- .kitchen.yml | 19 ++++++++++++++++++- .travis.yml | 5 +++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index b344e70..97831fd 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index 48c51f8..3102621 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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/