I am trying to configure the EC2 Plugin via a Groovy script.  So far, it's 
been a complete failure.  Here is what I have so far:

I am trying to configure the Jenkins EC2-Plugin via Groovy. Plugin code: 
https://github.com/jenkinsci/ec2-plugin

I'm trying to setup the cloud with a name to get started

import hudson.model.*import jenkins.model.*import hudson.plugins.ec2.*import 
com.amazonaws.services.ec2.model.*
SlaveTemplate awsTemplate = new SlaveTemplate(
  'ami-1234567',
  '',
  '',
  'sg-1234567',
  't2.micro',
  true,
  'foo',
  '',
  'stuff',
  'run code',
  '/var/tmp',
  'more code',
  '4',
  '',
  '',
  '',
  false,
  'subnet-1234567',
  '',
  '60',
  false,
  '',
  'iam-profile',
  false,
  false,
  '',
  false,
  '',
  true,
  false)
def slaveTemplates = [awsTemplate]
def ec2Cloud = new AmazonEC2Cloud(
  'foo',
  true,
  '',
  'us-west-2',
  '',
  '10',
  slaveTemplates)
def cloudList = Jenkins.instance.clouds
cloudList.add(ec2Cloud)

Any ideas?

These are the error messages

Error: Could not find matching constructor for: hudson.plugins.ec2.SlaveTemplate

or

Error: Could not find matching constructor for: 
hudson.plugins.ec2.AmazonEC2Cloud

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/379138a6-de1a-42cf-a5b9-9803836b80b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to