Class ClassicUpload

java.lang.Object
com.google.jenkins.plugins.storage.AbstractUpload
com.google.jenkins.plugins.storage.ClassicUpload
All Implemented Interfaces:
ExtensionPoint, Describable<AbstractUpload>, Serializable

public class ClassicUpload extends AbstractUpload
This upload extension implements the classical upload pattern where a user provides an Ant-style glob, e.g. ** / *.java relative to the build workspace, and those files are uploaded to the storage bucket.
See Also:
  • Constructor Details

    • ClassicUpload

      @DataBoundConstructor public ClassicUpload(String bucket, @Nullable UploadModule module, String pattern, @Deprecated @Nullable String bucketNameWithVars, @Deprecated @Nullable String sourceGlobWithVars)
      Construct the classic upload implementation from the base properties and the glob for matching files.
      Parameters:
      bucket - GCS bucket to upload files to.
      module - Helper class for connecting to the GCS API.
      pattern - The glob of files to upload, which potentially contains unresolved symbols, such as $JOB_NAME and $BUILD_NUMBER.
      bucketNameWithVars - Deprecated format for bucket.
      sourceGlobWithVars - Deprecated. Old name kept for deserialization.
  • Method Details

    • getDetails

      public String getDetails()
      Specified by:
      getDetails in class AbstractUpload
      Returns:
      Provide detail information summarizing this download for the GCS upload report.
    • getInclusions

      @Nullable protected AbstractUpload.UploadSpec getInclusions(Run<?,?> run, FilePath workspace, TaskListener listener) throws UploadException
      Implementations override this interface in order to surface the set of FilePaths the core logic should upload.
      Specified by:
      getInclusions in class AbstractUpload
      Parameters:
      run - Current job being run.
      workspace - Workspace of node running the job.
      listener - Listener for events of this job.
      Returns:
      Set of FilePaths to upload.
      Throws:
      UploadException - If there was an issue fetching the inclusions.
      See Also:
    • getPattern

      public String getPattern()
      Returns:
      The glob of files to upload, which potentially contains unresolved symbols, such as $JOB_NAME and $BUILD_NUMBER.