Skip to content

Commit

Permalink
Simplifying and correcting pipeline scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Erika Pauwels committed Feb 18, 2016
1 parent 792f3ef commit 2fa9404
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions base/execute-step.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

echo "Execute step ${INIT_DAEMON_STEP} in pipeline"
until [ $(curl -s -X PUT $INIT_DAEMON_BASE_URI/execute?step=$INIT_DAEMON_STEP) = "true" ]; do
echo -n '.'
sleep 5
done
curl -X PUT $INIT_DAEMON_BASE_URI/execute?step=$INIT_DAEMON_STEP

5 changes: 1 addition & 4 deletions base/finish-step.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/bash

echo "Finish step ${INIT_DAEMON_STEP} in pipeline"
until [ $(curl -s -X PUT $INIT_DAEMON_BASE_URI/finish?step=$INIT_DAEMON_STEP) = "true" ]; do
echo -n '.'
sleep 5
done
curl -s -X PUT $INIT_DAEMON_BASE_URI/finish?step=$INIT_DAEMON_STEP
7 changes: 5 additions & 2 deletions base/wait-for-step.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash

echo "Validating if step ${INIT_DAEMON_STEP} can start in pipeline"
until [ $(curl -s $INIT_DAEMON_BASE_URI/canStart?step=$INIT_DAEMON_STEP) = "true" ]; do
echo -n '.'
while true; do
sleep 5
echo -n '.'
string=$(curl -s $INIT_DAEMON_BASE_URI/canStart?step=$INIT_DAEMON_STEP)
[ "$string" = "true" ] && break
done
echo "Can start step ${INIT_DAEMON_STEP}"

0 comments on commit 2fa9404

Please sign in to comment.