Files
actions-runner-controller/test/entrypoint/should_retry_configuring/config.sh
T

30 lines
542 B
Bash
Raw Normal View History

2021-08-02 10:11:48 +01:00
#!/bin/bash
set -euo pipefail
export LIGHTGREEN='\e[0;32m'
export LIGHTRED='\e[0;31m'
export WHITE='\e[0;97m'
export RESET='\e[0m'
log(){
printf "\t${WHITE}$@${RESET}\n" 2>&1
}
success(){
printf "\t${LIGHTGREEN}$@${RESET}\n" 2>&1
}
error(){
printf "\t${LIGHTRED}$@${RESET}\n" 2>&1
exit 1
}
2021-09-13 10:58:15 +01:00
echo "$*" > runner_config
2021-08-02 10:11:48 +01:00
success "I'm pretending the configuration is not successful"
# increasing a counter to measure how many times we restarted
count=`cat counter 2>/dev/null|| echo "0"`
count=$((count + 1))
echo ${count} > counter