I'm trying to move my build environment to EC2 using Jenkins. I have a lot of source to check out each time, so I want to preserve the source persistently between builds.
This would be easy if Jenkins stopped/started the EC2 instances when it needed them (as I could just associate the AMI with a root EBS volume). But Jenkins terminates the instances when not being used.
I have tried making a separate EBS volume and attaching it to the EC2 instance using the startup commands with Jenkins and the problem there is it's possible for the EBS volume and EC2 instance to be in different availability zones. And Jenkins cannot control the availability zone when starting the instance.
So is there a way to keep the state between builds using the Jenkins/EC2 interface. Snapshots perhaps?
See this non-question from me for a bit more context.