Last active
December 15, 2022 05:31
-
-
Save mikesparr/4fa9ef362b3418ca308c3b11c55d1c07 to your computer and use it in GitHub Desktop.
Testing out Kestra workflow orchestration tool on local Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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