Payload Input/Output


Within the Attini Runner job, you can access the deployment plan payload input via a JSON file available on the runner. The path to the JSON file is available to the job commands via the ATTINI_INPUT environment variable.


If you want the later steps in the deployment plan to access information from your job, you can save that data to a file on the runner. That file path is available through the ATTINI_OUTPUT environment variable.

The contents of the output file will be passed to the deployment plan payload under the path output.[StepName]. If the contents are valid JSON, it will be passed as-is. If the contents are not valid JSON it will be converted to a JSON object with the contents being present under the "result" field, for example {"result": "my-none-json-value"}.

Hint: jq is a good tool when you work with JSON using bash.

  Type: AttiniRunnerJob
    Runner: HelloWorldRunner
      - cat ${ATTINI_INPUT} # This will print the input as a string.
      - echo '{"MyKey":"MyValue"}' > ${ATTINI_OUTPUT} # This will add the JSON object to the output