Skip to content

Commit

Permalink
Allow mutli-doc and go-patch pages in ci.yml
Browse files Browse the repository at this point in the history
[Improvements]

* Supports pages to ci.yml for better pipeline customizations.  These
  pages can be either overlay-style (spruce) or go-patch style.  These
  extra pages will be merged over the pipeline generated by Genesis.

  Because concourse syntax allows non-homogeneous structure, you can't
  always use spruce operators to overlay the right location (ie adding
  an additional param to a specific task config)  In these cases, you
  can use go-patch.

  Example:
  ```
  ---
  pipeline:
    <... all the normal ci.yml configuration values ...>

  ---
  - type: replace
    path: /jobs/name=<env>/plan/0/do/task=bosh-deploy/config/params/MY_ENV?
    value: some-value

  ```

  Note that the first page must be in overlay style, not go-patch,
  because it must stand as a valid yaml hash on its own.
  • Loading branch information
dennisjbell committed Dec 21, 2022
1 parent 985a180 commit 614c972
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Genesis/CI/Legacy.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,7 @@ EOF
close $OUT;

return run({ onfailure => 'Failed to merge Concourse pipeline definition', stderr => 0 },
'spruce', 'merge', '--prune', 'meta', '--prune', 'pipeline', "$dir/guts.yml", $pipeline->{file});
'spruce', 'merge', '--multi-doc', '--go-patch', '--prune', 'meta', '--prune', 'pipeline', "$dir/guts.yml", $pipeline->{file});
}

1;

0 comments on commit 614c972

Please sign in to comment.