Skip to content

Commit

Permalink
set the instance lifetime to 10 minutes on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
zoetrope committed Jan 31, 2020
1 parent 6500c40 commit 4607136
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ commands:
command: |
. ./bin/env
$GCLOUD compute instances delete ${INSTANCE_NAME} --zone ${ZONE}
- run:
name: Set the instance lifetime to 10 minutes
command: |
. ./bin/env
$GCLOUD compute instances add-metadata ${INSTANCE_NAME} --zone ${ZONE} \
--metadata shutdown-at=$(date -Iseconds -d+10minutes)
when: on_fail
jobs:
build:
docker:
Expand Down

0 comments on commit 4607136

Please sign in to comment.