See this example. I tend to prefer cat
over echo
as it reads cleaner.
In your pipeline.yml
file you need a Pipeline upload step:
steps:
- label: "Yada"
command: ".buildkite/pipeline.sh | buildkite-agent pipeline upload"
Then in your pipeline.sh
file have something like this:
#!/bin/bash
set -eu
cat << EOF
steps:
- label: "Tada"
command: "npm start"
EOF