Skip to content

Using the composition step

Nikolai edited this page Aug 5, 2016 · 4 revisions

Described with the format of:

step-name:
  type: composition
  working-directory: ${{some-clone-step}}
  composition: [compose file contents]
               -or-
               path/to/compose.yml
               -or-
               composition-name
  composition-candidates:
    [composition service contents]
    main:
      [composition service contents]
  composition-variables:
    - key=value

Because the composition is run as means to execute finite commands, the user must specify at least one composition-candidate. A composition candidate is the component that executes these commands. It accepts as input a single service component of the normal Docker composition YAML. The composition candidate will be merged into the given composition and will be monitored for successful execution. In case of multiple candidates the syntax will provide a way to mark the “master” candidate. The composition-variables field acts in the exact manner that the composition variables work through the UI.

Codefresh.yml example

cf-composition with name 'yaml-composition'

Clone this wiki locally