0

I've got a Chef repo that uses test-kitchen. I have a pretty good battery of tests, and when I run the tests and they're successful, I have a vendor.sh script that does some cleanup and a Berks vendor. What I'd like to be able to do is automatically run that script. I suppose I could just put kitchen test {box} into that script, but then I'd have to find a way to detect success (maybe this is easy) and deal with output and things like that; I'd rather just have Kitchen do it.

I googled and searched and found nothing. Does anyone know a way?

1 Answers1

3

I think what you are looking for is lifecycle hooks.

https://kitchen.ci/docs/reference/lifecycle-hooks/

For example, you could have this in you kitchen.yml file.


suites:
- name: default
  lifecycle:
    post_verify:
    - local: <script>
Paul B
  • 46
  • 2