Skip to content
Snippets Groups Projects
Commit 6d05e9ad authored by Recolic Keghart's avatar Recolic Keghart
Browse files

bug fix: report internal error while creating job

parent 7bc29155
No related branches found
No related tags found
No related merge requests found
......@@ -164,13 +164,13 @@ function cis_run_job () {
job_id=`curl_wrapped -s "https://beta-cps.trafficmanager.net/cis.client.svc/Public/$cis_namespace/GenericJob?workflowDefinitionName=$workflow_name" -H 'content-type: application/json' --data '{"JobType":"'"$cis_namespace"'","Workflow":"'"$workflow_name"'","ServiceHostCapability":"AzureJB","ServiceHostLocation":"Any","RuntimePackageId":"4dd32e8b-6bc7-478e-a1ab-48fcdc1bf3d3","PackageId":"'"$pkg_id"'","DisplayName":"Antidote-autosubmitted-WF","WorkflowParameters":{'"$workflow_params"'},"RuntimeSettings":{'"$runtime_settings"'},"WorkflowSettings":{"RuntimeSettings":{'"$runtime_settings"'}}}'` || ! echo2 "failed to get job_id" || return $?
[[ "$job_id" =~ ^[0-9][0-9]*_[0-9a-f-]*$ ]] || ! echo2 "Failed to create job. Invalid cookie or invalid workflow_name?" || return 3
echo2 "Waiting for CIS to create job... (job_id=$job_id, status at https://beta-cps.trafficmanager.net/Public/$cis_namespace/JobDetails/$job_id)"
echo2 "Waiting for CIS to create job... (job_id=$job_id)"
niddle_should_break='"DisplayStatus":"NotStarted"'
niddle_should_crash='"CustomState":"Internal Error"'
while true; do
resp=`curl_wrapped -s "https://beta-cps.trafficmanager.net/cis.client.svc/Public/$cis_namespace/GenericJob/$job_id/GetJobHierarchy?null"`
echo "$resp" | grep "$niddle_should_break" > /dev/null && break
echo "$resp" | grep "$niddle_should_crash" > /dev/null && echo2 "CIS reported 'Internal Error' while creating job. Please look into CIS page." && return 3
echo "$resp" | grep "$niddle_should_crash" > /dev/null && echo2 "CIS reported 'Internal Error' while creating job. https://beta-cps.trafficmanager.net/Public/$cis_namespace/JobDetails/$job_id" && return 3
echo2 -n .
sleep 5
done
......@@ -288,7 +288,7 @@ function subcmd_listver () {
}
# Initialization
antidote_version="1.1.03"
antidote_version="1.1.04"
subcmd="$1"
shift
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment