Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Adding a New Ansible Playbook Test

Jeremy Poulin edited this page May 2, 2018 · 7 revisions

Test Overview

The default template is set up to run all ansible tests that live in /tests/ansible-playbooks. The structure of these tests should be a directory containing a playbook.yml that will be called when the template runs.

Steps

  1. On you're local command line, clone the new repo.
$ git clone https://github.com/[github-username]/multiarch-ci-test-template
  1. Add the new ansible test to the /tests/ansible-playbooks directory.

  2. Commit and push the added test to the github.

$ git commit -am "Added new test to /tests/ansible-playbooks"
$ git push
  1. Run the test via the Jenkins UI.

Archiving Your Test Output

Most tests have some sort of output they'd like to save. For the test template, we set it up so that anything under the following structure will be archived when the test completes:

/tests/ansible-playbooks/[your-test-name]/artifacts

Generating JUnit Reports

Somes tests have output junit results xml. For the test template, we set it up so that any xml file under the following structure will be reported as junit xml when the test completes:

/tests/ansible-playbooks/[your-test-name]/reports