public class AwsBatchBuilder
extends hudson.tasks.Builder
Builder.
This provides a minimum viable product for running jobs on AWS batch from jenkins.
| Modifier and Type | Class and Description |
|---|---|
static class |
AwsBatchBuilder.DescriptorImpl
Descriptor for
AwsBatchBuilder. |
| Constructor and Description |
|---|
AwsBatchBuilder(String jobname,
String jobdefinition,
List<String> command,
String jobqueue,
Integer vcpu,
Integer memory,
Integer retries,
Map<String,String> params,
Map<String,String> environment) |
AwsBatchBuilder(String jobname,
String jobdefinition,
String command,
String jobqueue,
Integer vcpu,
Integer memory,
Integer retries) |
AwsBatchBuilder(String jobname,
String jobdefinition,
String command,
String jobqueue,
String vcpu,
String memory,
String retries)
This annotation tells Hudson to call this constructor, with
values from the configuration form page with matching parameter names.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCommand() |
AwsBatchBuilder.DescriptorImpl |
getDescriptor()
Hudson defines a method
Builder.getDescriptor(), which
returns the corresponding Descriptor object. |
String |
getJobdefinition()
We'll use these from the config.jelly.
|
String |
getJobname() |
String |
getJobqueue() |
String |
getMemory() |
String |
getRetries() |
String |
getVcpu() |
boolean |
perform(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener) |
boolean |
prebuild(hudson.model.AbstractBuild<?,?> abstractBuild,
hudson.model.BuildListener buildListener) |
String |
toString() |
@DataBoundConstructor public AwsBatchBuilder(String jobname, String jobdefinition, String command, String jobqueue, String vcpu, String memory, String retries)
public AwsBatchBuilder(String jobname, String jobdefinition, String command, String jobqueue, Integer vcpu, Integer memory, Integer retries)
public String getJobdefinition()
public String getJobname()
public String getJobqueue()
public String getCommand()
public String getVcpu()
public String getMemory()
public String getRetries()
public boolean perform(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.model.BuildListener listener)
throws hudson.AbortException,
InterruptedException
perform in interface hudson.tasks.BuildStepperform in class hudson.tasks.BuildStepCompatibilityLayerhudson.AbortExceptionInterruptedExceptionpublic AwsBatchBuilder.DescriptorImpl getDescriptor()
Builder.getDescriptor(), which
returns the corresponding Descriptor object.
Since we know that it's actually AwsBatchBuilder.DescriptorImpl, override
the method and give a better return type, so that we can access
AwsBatchBuilder.DescriptorImpl methods more easily.
This is not necessary, but just a coding style preference.getDescriptor in interface hudson.model.Describable<hudson.tasks.Builder>getDescriptor in class hudson.tasks.Builderpublic boolean prebuild(hudson.model.AbstractBuild<?,?> abstractBuild,
hudson.model.BuildListener buildListener)
prebuild in interface hudson.tasks.BuildStepprebuild in class hudson.tasks.BuildStepCompatibilityLayerCopyright © 2017–2018. All rights reserved.