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
  • Field Details

    • dockerFileDirectory

      public final String dockerFileDirectory
    • tag

      @Deprecated public String tag
      Deprecated.
    • 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 Details

    • 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 Details

    • 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()
    • getTags

      @CheckForNull public List<String> getTags()
    • setTags

      public void setTags(List<String> tags)
    • getTagsString

      @NonNull public String getTagsString()
    • setTagsString

      public void setTagsString(String tagsString)
    • getBuildArgs

      @CheckForNull public Map<String,String> getBuildArgs()
    • setBuildArgs

      @DataBoundSetter public void setBuildArgs(Map<String,String> buildArgs)
    • 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)
    • getDockerAPI

      protected DockerAPI getDockerAPI(Launcher launcher)
    • perform

      public void perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
      Specified by:
      perform in interface SimpleBuildStep
      Throws:
      InterruptedException
      IOException
    • getDescriptor

      public DockerBuilderPublisher.DescriptorImpl getDescriptor()
      Specified by:
      getDescriptor in interface Describable<Builder>
      Overrides:
      getDescriptor in class Builder