-
Notifications
You must be signed in to change notification settings - Fork 2
/
run.sh
38 lines (29 loc) · 1016 Bytes
/
run.sh
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
# Suffix for missing options.
error_suffix='Please add this option to the wercker.yml'
if [ ! -n "$WERCKER_IRON_WORKER_WORKER_NAME" ]
then
fail "Missing or empty option IRON_WORKER_WORKER_NAME. $error_suffix"
fi
if [ ! -n "$WERCKER_IRON_WORKER_CMD" ]
then
fail "Missing or empty option IRON_WORKER_CMD. $error_suffix"
fi
if [ ! -n "$WERCKER_IRON_WORKER_ARGS" ]
then
WERCKER_IRON_WORKER_ARGS=""
fi
# Install iron worker cli if needed
if ! type iron_worker &> /dev/null ;
then
info 'iron worker cli not found, installing it'
sudo apt-get update
sudo apt-get install -y ruby1.9.1
sudo gem install typhoeus
sudo gem install iron_worker_ng
info 'finished iron worker cli installation';
else
info 'iron worker cli is available, and will not be installed by this step'
fi
debug "type iron_worker: $(type iron_worker)"
debug "iron worker version: $(iron_worker --version)"
iron_worker $WERCKER_IRON_WORKER_CMD $WERCKER_IRON_WORKER_WORKER_NAME $WERCKER_IRON_WORKER_ARGS