Skip to content

Instantly share code, notes, and snippets.

@mikesparr
Last active December 15, 2022 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikesparr/4fa9ef362b3418ca308c3b11c55d1c07 to your computer and use it in GitHub Desktop.
Save mikesparr/4fa9ef362b3418ca308c3b11c55d1c07 to your computer and use it in GitHub Desktop.
Testing out Kestra workflow orchestration tool on local Mac
#!/usr/bin/env bash
#####################################################################
# REFERENCES
# - https://kestra.io/docs/getting-started/
#####################################################################
# download kestra docker-compose.yml file
wget https://raw.githubusercontent.com/kestra-io/kestra/develop/docker-compose.yml
# pull down dependencies
docker-compose pull
# run the apps
docker-compose up -d
# visit browser: http://localhost:8080
id: webhook-response-print
namespace: com.example.demo.flows
description: |
This flow will post data to webhook tester, then take a return value (output) and echo in bash shell
tasks:
- id: seq1
type: io.kestra.core.tasks.flows.Sequential
tasks:
- id: t1
type: io.kestra.plugin.fs.http.Request
formData:
location: US
foo: bar
headers:
user-agent: kestra-io
method: POST
uri: https://webhook.site/<YOUR-SITE-ID-HERE>
- id: t2
type: io.kestra.core.tasks.scripts.Bash
commands:
- echo "webhook returned {{outputs.t1.headers.Server[0]}}"
- sleep 1
- id: last
type: io.kestra.core.tasks.debugs.Return
format: "{{task.id}} > {{taskrun.startDate}}"
errors:
- id: webhook-errors
type: io.kestra.core.tasks.debugs.Echo
format: Never happened {{task.id}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment