From f2482c39566898960fe85ae7a700594d08e126e3 Mon Sep 17 00:00:00 2001 From: Caroline Church Date: Thu, 31 May 2018 14:52:31 +0100 Subject: [PATCH] Send back urls to helios Update to send back the urls as part of the status update Signed-off-by: Caroline Church --- .bluemix/pipeline.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.bluemix/pipeline.sh b/.bluemix/pipeline.sh index f1d109a..398fe44 100755 --- a/.bluemix/pipeline.sh +++ b/.bluemix/pipeline.sh @@ -21,6 +21,7 @@ detect_exit() { update_status() { echo "Updating Deployment Status - ${NETWORKID}" + echo '{"app": "'"$CF_APP"'", "url": "'"$APP_URL"'", "completed_step": "'"$COMPLETED_STEP"'"}' \ echo curl -X PUT -s -S\ "$API_HOST/api/v1/networks/$NETWORKID/sample/vehicle_manufacture" \ @@ -28,13 +29,24 @@ update_status() { -H 'Content-Type: application/json' \ -u $USERID:$PASSWORD \ -d '{"app": "'"$CF_APP"'", "url": "'"$APP_URL"'", "completed_step": "'"$COMPLETED_STEP"'"}' - curl -X PUT -s -S\ + + if [ "$COMPLETED_STEP" == "6" ]; then + curl -X PUT -s -S\ + "$API_HOST/api/v1/networks/$NETWORKID/sample/vehicle_manufacture" \ + -H 'Cache-Control: no-cache' \ + -H 'Content-Type: application/json' \ + -u $USERID:$PASSWORD \ + -d '{"app": "'"$CF_APP"'", "url": "'"$APP_URL"'", "completed_step": "'"$COMPLETED_STEP"'", "meta": { "urls": {"playground": "https://'${REST_SERVER_URL}'", "rest": "https://'${PLAYGROUND_URL}'" }}' \ + | jq '.' || true + else + curl -X PUT -s -S\ "$API_HOST/api/v1/networks/$NETWORKID/sample/vehicle_manufacture" \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -u $USERID:$PASSWORD \ -d '{"app": "'"$CF_APP"'", "url": "'"$APP_URL"'", "completed_step": "'"$COMPLETED_STEP"'"}' \ | jq '.' || true + fi } get_connection_profile() {