aboutsummaryrefslogtreecommitdiffstats
path: root/screwdriver
diff options
context:
space:
mode:
Diffstat (limited to 'screwdriver')
-rwxr-xr-xscrewdriver/factory-command.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/screwdriver/factory-command.sh b/screwdriver/factory-command.sh
index edced1bf360..a00cc15a2f8 100755
--- a/screwdriver/factory-command.sh
+++ b/screwdriver/factory-command.sh
@@ -14,6 +14,7 @@ trap "rm -f $COOKIEJAR" EXIT
SESSION_TOKEN=null
WAIT_UNTIL=$(( $(date +%s) + 120 ))
+set +e
while [[ $SESSION_TOKEN == null ]]; do
SESSION_TOKEN=$(curl -s -H 'Content-Type: application/json' -H 'Accept: application/json' -d "{ \"username\": \"svc-okta-vespa-factory\", \"password\": \"$SVC_OKTA_VESPA_FACTORY_TOKEN\" }" https://ouryahoo.okta.com/api/v1/authn | jq -re '.sessionToken')
@@ -27,6 +28,7 @@ while [[ $SESSION_TOKEN == null ]]; do
fi
fi
done
+set -e
LOCATION=$(curl -s -i -c $COOKIEJAR "https://factory.vespa.aws-us-east-1a.vespa.oath.cloud/login" | grep location | awk '{print $2}' | tr -d '\r')
curl -sL -b $COOKIEJAR -c $COOKIEJAR "$LOCATION&sessionToken=$SESSION_TOKEN" &> /dev/null