Skip to content

Commit 0aac684

Browse files
committed
examples: how to use a directory as a process payload
1 parent eef57b3 commit 0aac684

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed

examples/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@
7474
* [logback_config](logback_config) - overriding logging configuration;
7575
* [process_from_a_process](process_from_a_process) - starting a new subprocess from a flow using a payload archive;
7676
* [process_from_a_process2](process_from_a_process2) - using output variables, starting a new subprocess from a project.
77+
* [process_from_a_process2](process_from_a_process2) - starting a new subprocess using a directory as the payload.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
flows:
2+
default:
3+
# uses the specified directory as the process payload
4+
- task: concord
5+
in:
6+
action: start
7+
payload: example
8+
arguments:
9+
name: "Concord"
10+
sync: true
11+
- log: "Done! ${jobs[0]} is completed"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
flows:
2+
default:
3+
# use a local file and a process argument to create the message
4+
- log: "${resource.asString('file.txt')}, ${name}!"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
SERVER_ADDR="$1"
4+
5+
rm -rf target && mkdir target
6+
cp -R concord.yml example target/
7+
8+
cd target && zip -r payload.zip ./* > /dev/null && cd ..
9+
10+
read -p "Username: " CURL_USER
11+
curl -u ${CURL_USER} -F archive=@target/payload.zip http://${SERVER_ADDR}/api/v1/process

0 commit comments

Comments
 (0)