Created
January 22, 2014 08:44
-
-
Save daspilker/8555440 to your computer and use it in GitHub Desktop.
Update AMI of Jenkins EC2 Cloud Template
This file contains hidden or 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
import hudson.plugins.ec2.EC2Cloud | |
import hudson.plugins.ec2.SlaveTemplate | |
import jenkins.model.Jenkins | |
EC2Cloud cloud = Jenkins.instance.clouds.find { it instanceof EC2Cloud } | |
SlaveTemplate template = cloud.getTemplate("description") | |
template.ami = "ami-lalalala" | |
Jenkins.instance.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! This helped a lot! 👍