Skip to content

Commit

Permalink
Add runner status inside the loop (privacy-scaling-explorations#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntampakas authored Jul 28, 2022
1 parent 9e4701e commit 08b7af9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/ciChecksScripts/wakeUpRunner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ runner_vpc_id="vpc-08ac0db4d8a7cce9e"

# Get runner status
runner=$(aws ec2 describe-instances --profile $profile --filters Name=tag:Name,Values=[ci-checks-runner] Name=network-interface.vpc-id,Values=[$runner_vpc_id] --query "Reservations[*].Instances[*][InstanceId]" --output text | xargs)
runner_status=$(aws ec2 describe-instances --profile $profile --instance-ids $runner --query "Reservations[*].Instances[*].State.[Name]" --output text)

while true; do
runner_status=$(aws ec2 describe-instances --profile $profile --instance-ids $runner --query "Reservations[*].Instances[*].State.[Name]" --output text)
if [ $runner_status = "stopped" ]; then
aws ec2 start-instances --profile $profile --instance-ids $runner
exit 0
Expand Down

0 comments on commit 08b7af9

Please sign in to comment.