-
Notifications
You must be signed in to change notification settings - Fork 1
/
Docfile
46 lines (43 loc) · 960 Bytes
/
Docfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /usr/bin/env ruby
template "runShellScriptTemplate" do
content do
__dsl do
schemaVersion "2.0"
description "Run a shell script"
mainSteps do |*|
action "aws:runShellScript"
name "runShellScript"
inputs do
runCommand __script(context.commands)
TimeoutSeconds 10
end
end
end
end
end
Command "Test-Example-RunShellScript" do
account_ids []
include_template "runShellScriptTemplate", commands: "echo example >> /tmp/result.txt"
end
Command "My-RunShellScript-2" do
account_ids []
content do
__dsl do
schemaVersion "2.0"
description "Run a shell script"
mainSteps do |*|
action "aws:runShellScript"
name "runShellScript"
inputs do
runCommand __script(<<-'EOS')
#! /bin/bash
echo 1 >> /tmp/results.txt
echo 2 >> /tmp/results.txt
exit 1
EOS
TimeoutSeconds 10
end
end
end
end
end