forked from privacy-scaling-explorations/zkevm-circuits
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ci self hosted runner (privacy-scaling-explorations#638)
* Change tag for self hosted runner * Create script that wakes up the new runner * Modify workflow to run specific job)s) on a self-hosted runner * Remove concurrency + add consecutiveness linked with self-hosted job(s)
- Loading branch information
Showing
4 changed files
with
105 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
profile="cirunner" | ||
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 | ||
if [ $runner_status = "stopped" ]; then | ||
aws ec2 start-instances --profile $profile --instance-ids $runner | ||
exit 0 | ||
elif [ $runner_status = "running" ]; then | ||
sleep 120 | ||
runner_status=$(aws ec2 describe-instances --profile $profile --instance-ids $runner --query "Reservations[*].Instances[*].State.[Name]" --output text) | ||
if [ $runner_status = "running" ]; then | ||
exit 0 | ||
fi | ||
else | ||
sleep 30 | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters