Sort the keys in a Concourse pipeline YAML file to be more human-readable.
Heavily based on humanize-manifest.
# cat fixtures/simple-pipeline-unordered.yml
jobs:
- plan:
- trigger: true
get: 2hours
name: nothing
resources:
- source:
interval: 2h
type: time
name: 2hours
# ./humanize-pipeline fixtures/simple-pipeline-unordered.yml
---
resources:
- name: 2hours
type: time
source:
interval: 2h
jobs:
- name: nothing
plan:
- get: 2hours
trigger: true
- Makes no attempt to validate the pipeline before or after reordering
- Does not preserve linebreaks between keys
in_parallel
must have nestedsteps
key- Tests do not cover all pipeline schema options (WIP)
go get github.com/EngineerBetter/humanize-pipeline
Build with
go build
Run tests with
ginkgo -r