mirror of
https://github.com/ovh/the-bastion.git
synced 2025-09-07 21:44:28 +08:00
enh: install.inc: random delay under CI
This commit is contained in:
parent
be6a71afab
commit
b3af2933f9
1 changed files with 9 additions and 0 deletions
|
@ -212,6 +212,15 @@ install_main() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# in CI mode, delay a random amount of time, to avoid getting blocked
|
||||
# when several runs are started in parallel
|
||||
if [ "$CI" = true ]; then
|
||||
amount=$(( RANDOM % 10 * 3 ))
|
||||
action_doing "Sleeping $amount seconds in CI mode..."
|
||||
sleep $amount
|
||||
action_done
|
||||
fi
|
||||
|
||||
while getopts :sdrah arg; do
|
||||
case "$arg" in
|
||||
s) action_static; exit 0;;
|
||||
|
|
Loading…
Add table
Reference in a new issue