A concourse pipeline validation tool
Project description
BagCheck
About
bagcheck
is a relatively simply command line utility developed to make validating Concourse pipelines simpler. To accomplish this, bagcheck
has the following functionality:
Checking a pipeline
To check your pipeline, simply run:
bagcheck check -f /path/to/your/concourse/pipeline.yaml
at which point bagcheck
will proceed to check for the following conditions:
- All git resources are pointed at the
main
branch - All PR resource puts in the same job have the same context
- All PR statuses are accounted for in a job (success, failure, error, pending)
- All jobs have a timeout set
Disabling Specific Checks
Sometimes you want to skip a check across the board (e.g. you don't want timeouts in a specific pipeline) or you only want to disable a check for a specific job/resource. To do this, you'll use a .bagcheck
file.
An example file looks something like this:
disable:
global:
- check-main-branch
- ...
local:
- path: '$.jobs[?(@.name = "job-name-1")]'
tests:
- check-pr-statuses
- ...
- path: '$.jobs[?(@.name = "job-name-2")]'
tests:
- check-timeout
- ...
- ...
with any check listed under the disable.global
key being completely disabled and the tests under each path being disabled when the job meets that JSONPath criteria (the ellipsis denote that you can include as many as you want in each section).
Currently the following tests are run and as a consequence can be disabled:
check-main-branch
check-timeout
check-pr-statuses
check-pr-contexts
One thing to note is that bagcheck
will first attempt to read a file located at ~/.bagcheck
and then will attempt to read one at the current working directory, combining the values with whatever is located in your ~/.bagcheck
file.
Summarizing a pipeline
Having to read through a 1000+ line YAML file can make it hard to understand what the pipeline is doing on a conceptual level as well as how everything ties together. To help with this, you can run:
bagcheck summary -f /path/to/your/concourse/pipeline.yaml
at which point bagcheck
will print out a summarized version of your pipeline which attempts to:
- List in plain English what each step of a job does
- Describe what resource changes will cause the job to trigger
- Describe which jobs will be triggered as a result
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bagcheck-0.1.2.tar.gz
.
File metadata
- Download URL: bagcheck-0.1.2.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.0 Linux/5.15.68.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3338ca3a386627ac0f6f41d465e273e3e5e601cb80048941a34131a3306cd990 |
|
MD5 | 0c883dafcd3540f281ac0287d74617c9 |
|
BLAKE2b-256 | 0a7c9067c303fa49b9c3ac2c34366ea31285739377673c4db0078d292670115f |
File details
Details for the file bagcheck-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: bagcheck-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.0 Linux/5.15.68.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bd2d838dc748f3ac717d2b39066e86a264d7a9fb905e6cf0a3807c07b03591b |
|
MD5 | 42042ac985f626a970b1695c2841e090 |
|
BLAKE2b-256 | ea8b09faf1fe3cfdd1845503230500313f5075063a177c559c628e5ec1eb05da |