Producer::ExternalProgram
Producer::ExternalProgram

This producer is a bridge to external programs
which then provide the resulting precondition
as YAML text.

An example could look like this as part of a
bigger precondition:

  - precondition_type: produce
    producer: ExternalProgram
    program: /home/ss5/.tapper/hello-world/producers/example_producer_builder.sh
    parameters:
      - -Dcc=gcc -Dprefix=/usr/local
    environment:
      CFLAGS: -O2 -march=k6 -mcpu=k6
      TARGETNAME: example-kernel-file

The hereby named program 'example_producer_builder.sh'
could print a resulting precondition snippet to STDOUT:

  ---
  capture: tap
  parameters:
    - /tmp/example-kernel-file-46.tgz
  precondition_type: testprogram
  program: /home/ss5/.tapper/hello-world/controlfiles/example_kernel_install.sh
  ---
  parameters:
    - 2
  precondition_type: testprogram
  program: /bin/sleep

which demonstrates you can create multiple preconditions
as YAML array separated by '---'.

You do not need to maintain the indent level of where the
resulting precondition is used. It is put automatically
in the place where the producer precondition originally was.

tapper/Tapper-Producer,tapper/Tapper-Producer