The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

30 строки
794 B

  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. #
  6. # Delete test compute cloud instances
  7. #
  8. # Usage: new_bubble.sh config-file
  9. #
  10. # Environment variables
  11. #
  12. #
  13. SCRIPT="${0}"
  14. SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
  15. BUBBLE_ENV="/home/bubble/current/bubble-test.env"
  16. INSTANCES=aws ec2 describe-instances --filters "Name=tag:Test_instance,Values=${TEST_TAG_CLOUD}" --query "Reservations[].Instances[].InstanceId"
  17. INSTANCES_COUNT="${#INSTANCES[@]}"
  18. if [[ ${INSTANCES_COUNT} -gt 0 ]] ; then
  19. echo "Deleting ${INSTANCES_COUNT} test instances..."
  20. aws ec2 terminate-instances --instance-ids "$INSTANCES"
  21. else
  22. echo "No instances contains tag \"${TEST_TAG_CLOUD}\" to delete"
  23. fi