Skip to content

Instantly share code, notes, and snippets.

@pilhuhn
Created June 30, 2021 07:11
Show Gist options
  • Save pilhuhn/97cf0bfaec2d3d5a78ccaa13ee31581f to your computer and use it in GitHub Desktop.
Save pilhuhn/97cf0bfaec2d3d5a78ccaa13ee31581f to your computer and use it in GitHub Desktop.
#
# camel-k: dependency=mvn:com.github.pilhuhn:camel-ansible-tower:569f522d5c
#
- from:
uri: "knative:endpoint/tower"
steps:
- log:
message: "Got Message: ${body}"
- convert-body-to: "java.lang.String"
- choice:
when:
- simple: "${body} != null && ${body.length} > 0"
steps:
- set-header:
name: template
simple: "11"
- to:
uri: "tower:1.2.3.4?basicAuth=bla-bla-bla"
- log:
message: "Outcome::${body}"
- set-header:
name: "CE-Type"
constant: "tower.return"
- to:
uri: "knative:channel/return-channel"
otherwise:
steps:
- set-body:
constant: "no body received"
- set-header:
name: ContentType
simple: text/plain
- log:
message: "Otherwise::${body}"
@pilhuhn
Copy link
Author

pilhuhn commented Jun 30, 2021

[1] 2021-06-30 07:06:24,289 ERROR [io.qua.run.Application] (main) Failed to start application (with profile prod): java.lang.IllegalArgumentException: Unable to find a resource definition for channel/sink/return-channel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment