Class StdoutUpload

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

public class StdoutUpload extends AbstractUpload
This upload extension allow the user to upload the build log for the Jenkins build to a given bucket, with a specified file name. By default, the file is named "build-log.txt".
See Also:
  • Constructor Details

    • StdoutUpload

      @DataBoundConstructor public StdoutUpload(@Nullable String bucket, @Nullable UploadModule module, String logName, @Deprecated @Nullable String bucketNameWithVars)
      Construct the Upload with the stock properties, and the additional information about how to name the build log file.
      Parameters:
      bucket - GCS bucket to upload build artifacts to.
      module - An UploadModule to use for execution.
      logName - Name of log file to store to GCS bucket.
      bucketNameWithVars - Deprecated format for bucket.
  • Method Details

    • getLogName

      public String getLogName()
      Returns:
      The name to give the file we upload for the build log.
    • getDetails

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

      public boolean forResult(Result result)
      Determine whether we should upload the pattern for the given build result.
      Overrides:
      forResult in class AbstractUpload
      Parameters:
      result - Result of the build run.
      Returns:
      Whether we should upload the pattern for the given build result.
    • 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: