Skip to content

Instantly share code, notes, and snippets.

@daspilker
Created January 22, 2014 08:44
Show Gist options
  • Save daspilker/8555440 to your computer and use it in GitHub Desktop.
Save daspilker/8555440 to your computer and use it in GitHub Desktop.
Update AMI of Jenkins EC2 Cloud Template
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()
@sun-mir
Copy link

sun-mir commented Oct 10, 2017

Thanks! This helped a lot! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment