https://github.com/grahammitchell/spin-prereq-cheq
Walks through stages in a Spinnaker JSON pipeline to make sure all your requisiteStageRefIds are real.
https://github.com/grahammitchell/spin-prereq-cheq
spinnaker
Last synced: about 1 year ago
JSON representation
Walks through stages in a Spinnaker JSON pipeline to make sure all your requisiteStageRefIds are real.
- Host: GitHub
- URL: https://github.com/grahammitchell/spin-prereq-cheq
- Owner: grahammitchell
- License: mit
- Created: 2022-06-28T17:58:46.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-28T18:17:02.000Z (almost 4 years ago)
- Last Synced: 2025-02-15T07:51:21.911Z (over 1 year ago)
- Topics: spinnaker
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spin-prereq-cheq
I don't know if you've ever tried to modify a Spinnaker pipeline by hand, but I have.
The most common mistake I make is renaming some stages (`refId`) and then forgetting to also change those names in the stages that depend on them (`requisiteStageRefIds`).
This is a tiny utility that walks through the stages, collecting a list of all the valid `refId`s and then makes sure all of your `requisiteStageRefIds` match up.
Use it like
```
$ ./spin-prereq-cheq.py path/to/pipeline.json
Checking 'path/to/pipeline.json'...
All good!
```
You can provide multiple files at a time if you want:
```
$ ./spin-prereq-cheq.py path/to/pipeline.json pipeline-branch.json
Checking 'path/to/pipeline.json'...
All good!
Checking 'pipeline-branch.json'...
Stage with refId 'foo' has requisiteStageRefId 'bar', which is not found.
```