Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
antidote-cis
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
msc
antidote-cis
Commits
716e1812
There was an error fetching the commit references. Please try again later.
Commit
716e1812
authored
2 years ago
by
Recolic K
Browse files
Options
Downloads
Patches
Plain Diff
detect plan error and aborted on job creation
parent
132919c3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
antidote-cis
+10
-5
10 additions, 5 deletions
antidote-cis
with
10 additions
and
5 deletions
antidote-cis
+
10
−
5
View file @
716e1812
...
@@ -210,14 +210,19 @@ function cis_run_job () {
...
@@ -210,14 +210,19 @@ function cis_run_job () {
echo2
"Waiting for CIS to create job... (job_id=
$job_id
)"
echo2
"Waiting for CIS to create job... (job_id=
$job_id
)"
niddle_should_break
=
'"DisplayStatus":"NotStarted"'
niddle_should_break
=
'"DisplayStatus":"NotStarted"'
niddle_should_crash
=
'"CustomState":"Internal Error"'
bad_states
=(
'PlanError'
'Internl Error'
'Aborted'
)
while
true
;
do
while
true
;
do
resp
=
`
curl_wrapped
"https://beta-cps.trafficmanager.net/cis.client.svc/Public/
$cis_namespace
/GenericJob/
$job_id
/GetJobHierarchy?null"
`
resp
=
`
curl_wrapped
"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_break
"
>
/dev/null
&&
break
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
for
bad_state
in
"
${
bad_states
[@]
}
"
;
do
echo
"
$resp
"
|
grep
"DisplayStatus.:.
$bad_state
"
>
/dev/null
&&
echo2
"CIS reported '
$bad_state
' while creating job. https://beta-cps.trafficmanager.net/Public/
$cis_namespace
/JobDetails/
$job_id
"
&&
return
3
done
echo2
-n
.
echo2
-n
.
sleep
5
sleep
5
;
[[
$?
=
130
]]
&&
echo2
"SIGINT received"
&&
return
130
[[
$?
=
130
]]
&&
echo2
"SIGINT received"
&&
return
130
done
done
echo2
"Starting job..."
echo2
"Starting job..."
...
@@ -396,7 +401,7 @@ function subcmd_xmldownload () {
...
@@ -396,7 +401,7 @@ function subcmd_xmldownload () {
}
}
# Initialization
# Initialization
antidote_version
=
"1.1.13-
1
"
antidote_version
=
"1.1.13-
2
"
subcmd
=
"
$1
"
subcmd
=
"
$1
"
shift
shift
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment