Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use new job properties

Change-Id: Idb212c84f012dcd7602606fe224eea0d76cef0d9
  • Loading branch information...
commit ddf48f6ce190890ec258857d7f097e79fe07583e 1 parent e02678f
@pmenglund pmenglund authored
View
4 jobs/batarang/spec
@@ -1,6 +1,10 @@
---
name: batarang
+properties:
+ mbus:
+ description: Message bus (nats) URI
+
templates:
batarang_ctl: bin/batarang_ctl
drain: bin/drain
View
2  jobs/batarang/templates/batarang_ctl
@@ -22,7 +22,7 @@ case $1 in
echo $$ > $PIDFILE
- export NATS_URI='<%= properties.mbus %>'
+ export NATS_URI='<%= p("mbus") %>'
exec chpst -u $RUNAS:$RUNAS \
bundle exec $BIN_DIR/batarang <%= spec.index %> \
View
5 jobs/batlight/spec
@@ -1,6 +1,11 @@
---
name: batlight
+properties:
+ batlight.fail:
+ default: nope
+ description: Simulate failure at component
+
templates:
batlight_ctl.erb: bin/batlight_ctl
drain: bin/drain
View
10 jobs/batlight/templates/batlight_ctl.erb
@@ -14,12 +14,12 @@ PIDFILE=$RUN_DIR/$JOB.pid
RUNAS=vcap
-case $1 in
+if [ "<%= p('batlight.fail') %>" = "control" ]; then
+ echo "simulated $JOB control script failure" 1>&2
+ exit 1
+fi
- # simulate failure if properties.batlight.fail is set
- if [ ! -z "<%= properties.batlight.fail if properties.batlight %>" ]; then
- exit 1
- fi
+case $1 in
start)
mkdir -p $RUN_DIR $LOG_DIR $STORE_DIR
Please sign in to comment.
Something went wrong with that request. Please try again.