A combination of factors:
- Our builds are fairly infrequent
- Our instance set up + build is a bit less than an hour (but instance set up + build + wait 30 minutes is more than an hour)
- It would be nice not have to trust the code we are building too much
mean that for our purposes we would like to start a fresh instance for each build we do.
I've had a bit of a look at this, and it seems that one approach would be to play with the RetentionStrategy used for the ec2 slaves, but I'm not sure that this would result in the slave being terminated if there was a build waiting when one finished.