Class DockerBuilderPublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- com.nirima.jenkins.plugins.docker.builder.DockerBuilderPublisher
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
public class DockerBuilderPublisher extends Builder implements SimpleBuildStep
Builder extension to build / publish an image from a Dockerfile. TODO automatic migration to CloudBees Docker Build and Publish
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DockerBuilderPublisher.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
Fields Modifier and Type Field Description boolean
cleanImages
boolean
cleanupWithJenkinsJobDelete
String
cloud
String
dockerFileDirectory
boolean
noCache
boolean
pull
boolean
pushOnSuccess
String
tag
Deprecated.usesetTags(List)
and/orgetTags()
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description DockerBuilderPublisher(String dockerFileDirectory, org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint fromRegistry, String cloud, String tagsString, boolean pushOnSuccess, String pushCredentialsId, boolean cleanImages, boolean cleanupWithJenkinsJobDelete)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Map<String,String>
getBuildArgs()
String
getBuildArgsString()
DockerBuilderPublisher.DescriptorImpl
getDescriptor()
protected DockerAPI
getDockerAPI(Launcher launcher)
org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint
getFromRegistry()
String
getPullCredentialsId()
Deprecated.String
getPushCredentialsId()
org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint
getRegistry(com.github.dockerjava.api.model.Identifier identifier)
Deprecated.List<String>
getTags()
String
getTagsString()
boolean
isNoCache()
boolean
isPull()
void
perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener)
void
setBuildArgs(Map<String,String> buildArgs)
void
setBuildArgsString(String buildArgsString)
void
setNoCache(boolean noCache)
void
setPull(boolean pull)
void
setTags(List<String> tags)
void
setTagsString(String tagsString)
-
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Field Detail
-
dockerFileDirectory
public final String dockerFileDirectory
-
tag
@Deprecated public String tag
Deprecated.usesetTags(List)
and/orgetTags()
-
pushOnSuccess
public final boolean pushOnSuccess
-
cleanImages
public final boolean cleanImages
-
cleanupWithJenkinsJobDelete
public final boolean cleanupWithJenkinsJobDelete
-
cloud
@CheckForNull public final String cloud
-
noCache
public boolean noCache
-
pull
public boolean pull
-
-
Constructor Detail
-
DockerBuilderPublisher
@DataBoundConstructor public DockerBuilderPublisher(String dockerFileDirectory, @Nullable org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint fromRegistry, @Nullable String cloud, @Nullable String tagsString, boolean pushOnSuccess, @Nullable String pushCredentialsId, boolean cleanImages, boolean cleanupWithJenkinsJobDelete)
-
-
Method Detail
-
getRegistry
@Deprecated public org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint getRegistry(com.github.dockerjava.api.model.Identifier identifier)
Deprecated.
-
getPullCredentialsId
@Deprecated @CheckForNull public String getPullCredentialsId()
Deprecated.- Returns:
- old field no longer in use
-
getPushCredentialsId
@CheckForNull public String getPushCredentialsId()
-
getTagsString
@NonNull public String getTagsString()
-
setTagsString
public void setTagsString(String tagsString)
-
getBuildArgsString
@NonNull public String getBuildArgsString()
-
setBuildArgsString
@DataBoundSetter public void setBuildArgsString(String buildArgsString)
-
getFromRegistry
@CheckForNull public org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint getFromRegistry()
-
isNoCache
public boolean isNoCache()
-
setNoCache
@DataBoundSetter public void setNoCache(boolean noCache)
-
isPull
public boolean isPull()
-
setPull
@DataBoundSetter public void setPull(boolean pull)
-
perform
public void perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
getDescriptor
public DockerBuilderPublisher.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Builder>
- Overrides:
getDescriptor
in classBuilder
-
-