Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
4d15f18d
Commit
4d15f18d
authored
3 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
SL-15572 - retry logic for codeticket.py commands
parent
502afc5e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build.sh
+27
-10
27 additions, 10 deletions
build.sh
with
27 additions
and
10 deletions
build.sh
+
27
−
10
View file @
4d15f18d
...
@@ -16,6 +16,29 @@
...
@@ -16,6 +16,29 @@
# * The special style in which python is invoked is intentional to permit
# * The special style in which python is invoked is intentional to permit
# use of a native python install on windows - which requires paths in DOS form
# use of a native python install on windows - which requires paths in DOS form
retry_cmd
()
{
max_attempts
=
"
$1
"
;
shift
initial_wait
=
"
$1
"
;
shift
attempt_num
=
1
echo
"trying"
"
$@
"
until
"
$@
"
do
if
((
attempt_num
==
max_attempts
))
then
echo
"Last attempt
$attempt_num
failed"
return
1
else
wait_time
=
$((
$attempt_num
*
$initial_wait
))
echo
"Attempt
$attempt_num
failed. Trying again in
$wait_time
seconds..."
sleep
$wait_time
attempt_num
=
$((
$attempt_num
+
1
))
fi
done
echo
"succeeded"
return
0
}
build_dir_Darwin
()
build_dir_Darwin
()
{
{
echo
build-darwin-x86_64
echo
build-darwin-x86_64
...
@@ -443,7 +466,7 @@ then
...
@@ -443,7 +466,7 @@ then
succeeded
=
$build_coverity
succeeded
=
$build_coverity
else
else
# Upload base package.
# Upload base package.
python_cmd
"
$helpers
/codeticket.py"
addoutput Installer
"
$package
"
\
retry_cmd 4 30
python_cmd
"
$helpers
/codeticket.py"
addoutput Installer
"
$package
"
\
||
fatal
"Upload of installer failed"
||
fatal
"Upload of installer failed"
# Upload additional packages.
# Upload additional packages.
...
@@ -452,9 +475,7 @@ then
...
@@ -452,9 +475,7 @@ then
package
=
$(
installer_
$arch
"
$package_id
"
)
package
=
$(
installer_
$arch
"
$package_id
"
)
if
[
x
"
$package
"
!=
x
]
if
[
x
"
$package
"
!=
x
]
then
then
echo
"sleeping 30"
retry_cmd 4 30 python_cmd
"
$helpers
/codeticket.py"
addoutput
"Installer
$package_id
"
"
$package
"
\
sleep
30
python_cmd
"
$helpers
/codeticket.py"
addoutput
"Installer
$package_id
"
"
$package
"
\
||
fatal
"Upload of installer
$package_id
failed"
||
fatal
"Upload of installer
$package_id
failed"
else
else
record_failure
"Failed to find additional package for '
$package_id
'."
record_failure
"Failed to find additional package for '
$package_id
'."
...
@@ -467,9 +488,7 @@ then
...
@@ -467,9 +488,7 @@ then
if
[
"
${
RELEASE_CRASH_REPORTING
:-}
"
!=
"OFF"
]
if
[
"
${
RELEASE_CRASH_REPORTING
:-}
"
!=
"OFF"
]
then
then
# Upload crash reporter file
# Upload crash reporter file
echo
"sleeping 30"
retry_cmd 4 30 python_cmd
"
$helpers
/codeticket.py"
addoutput
"Symbolfile"
"
$VIEWER_SYMBOL_FILE
"
\
sleep
30
python_cmd
"
$helpers
/codeticket.py"
addoutput
"Symbolfile"
"
$VIEWER_SYMBOL_FILE
"
\
||
fatal
"Upload of symbolfile failed"
||
fatal
"Upload of symbolfile failed"
fi
fi
...
@@ -477,10 +496,8 @@ then
...
@@ -477,10 +496,8 @@ then
# *TODO: Make this an upload-extension
# *TODO: Make this an upload-extension
if
[
-r
"
$build_dir
/llphysicsextensions_package"
]
if
[
-r
"
$build_dir
/llphysicsextensions_package"
]
then
then
echo
"sleeping 30"
sleep
30
llphysicsextensions_package
=
$(
cat
$build_dir
/llphysicsextensions_package
)
llphysicsextensions_package
=
$(
cat
$build_dir
/llphysicsextensions_package
)
python_cmd
"
$helpers
/codeticket.py"
addoutput
"Physics Extensions Package"
"
$llphysicsextensions_package
"
--private
\
retry_cmd 4 30
python_cmd
"
$helpers
/codeticket.py"
addoutput
"Physics Extensions Package"
"
$llphysicsextensions_package
"
--private
\
||
fatal
"Upload of physics extensions package failed"
||
fatal
"Upload of physics extensions package failed"
fi
fi
fi
fi
...
...
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