public class QuickTaskBuilder
extends hudson.tasks.Builder
implements jenkins.tasks.SimpleBuildStep
Modifier and Type | Class and Description |
---|---|
static class |
QuickTaskBuilder.DescriptorImpl |
jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.tasks.SimpleBuildStep.LastBuildActionFactory
Constructor and Description |
---|
QuickTaskBuilder(String azureCredentialsId,
String resourceGroupName,
String registryName)
This annotation tells Jenkins to call this constructor, with values from
the configuration form page with matching parameter names.
|
Modifier and Type | Method and Description |
---|---|
QuickTaskBuilder.DescriptorImpl |
getDescriptor()
Jenkins defines a method
Builder.getDescriptor() , which returns
the corresponding Descriptor object. |
void |
perform(hudson.model.Run<?,?> run,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener) |
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
@DataBoundConstructor public QuickTaskBuilder(String azureCredentialsId, String resourceGroupName, String registryName)
azureCredentialsId
- Jenkins credential id.resourceGroupName
- ACR resource group name.registryName
- ACR name, which will run the build and the image will be default push to.public final void perform(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener) throws InterruptedException, IOException
perform
in interface jenkins.tasks.SimpleBuildStep
InterruptedException
IOException
public final QuickTaskBuilder.DescriptorImpl getDescriptor()
Builder.getDescriptor()
, which returns
the corresponding Descriptor
object.
Since we know that it's actually QuickTaskBuilder.DescriptorImpl
, override the
method and give a better return type, so that we can access
QuickTaskBuilder.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.Builder
Copyright © 2016–2021. All rights reserved.