Getting started with Steampunk Spotter is simple.
To start using Steampunk Spotter, head over to the registration page, sign up for an account and verify your email.
With Spotter you can scan different Ansible content, such as Ansible Playbooks, collections, roles and task files.
Install the steampunk-spotter CLI tool as a Python package (Python 3 is required).
$ pip install steampunk-spotter
After the CLI is installed, you can explore all available commands and options of Spotter by running spotter --help.
To start checking Ansible content straight from the terminal, run the following command:
$ spotter scan /path/to/your/playbooks
The first time you run the scan command you will also have to provide your username and password for Steampunk Spotter:
- via --username/-u and --password/-p global optional
- by setting SPOTTER_USERNAME and SPOTTER_PASSWORD environment variables.
Running the scan command will show you the output that looks like this:
And if you get back nothing? Well, good for you. We found no issues with your playbooks ;)
For more information on how to use Steampunk Spotter, run spotter scan --help or explore further instructions in the README.md.
When you log in to the Spotter app, you will find that your personal organization with one default project has already been created for you.
The project acts as a container for user's code with Ansible content and allows separating individual scans. To track the progress of individual projects over time, separate them by creating a new project for each one.
You can either create an empty project or import your code from the Git repository (by pasting its URL into the form).
After the project from Git gets created, the Ansible content from repository will be automatically scanned. If the user has created an empty project, the scans can be initiated from the CLI.
Check your scan results and explore how to incorporate discovered HINTS, WARNINGS and ERRORS to improve your Ansible content.
Add users to your organization to create a shared workspace for your team so you can all keep up with the progress on shared projects and enable collaboration across projects. You can have one organization and include up to 3 users with one PRO subscription.
Steampunk Spotter GitHub Action enables scanning of Ansible content within the GitHub CI/CD workflows. When you have your Steampunk Spotter account, you can integrate Steampunk Spotter with your GitHub repository.
In your CI/CD pipeline you can specify the name of the Spotter GitHub Action xlab-steampunk/spotter-github-actions@master with a tag number as a step within your YAML workflow file.
Steampunk Spotter can be integrated with GitLab to display scan result as GitLab’s unit test reports. This means that you will be quickly able to see which checks have failed within your CI/CD pipeline.
This is done by using Spotter CLI tool directly in the CI/CD configuration and configuring it to output your scan result in JUnit XML format, which allows GitLab to display check results as green check marks for successful checks and red crosses for unsuccessful checks.
To do so, you should use spotter scan CLI command along with --junit-xml <path-junit-xml> optional argument that will create JUnit XML report at the specified location. Assuming that you already have your GitLab CI/CD configuration, you can create a new CI job, where you call the aforementioned CLI command and then upload the created JUnit report format XML file as an artifact to GitLab, which will then display it within your pipeline details page or merge request widget.
You can find more information on how to integrate Spotter with GitLab CI/CD in README.md.