Class BuildGcsUploadReport
- java.lang.Object
-
- com.google.jenkins.plugins.storage.reports.AbstractGcsUploadReport
-
- com.google.jenkins.plugins.storage.reports.BuildGcsUploadReport
-
- All Implemented Interfaces:
Action
,ModelObject
public class BuildGcsUploadReport extends AbstractGcsUploadReport
A buildAction
to surface direct links of objects uploaded through theStdoutUpload
Listener to the Jenkins UI.
-
-
Constructor Summary
Constructors Constructor Description BuildGcsUploadReport(Run<?,?> run)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBucket(String bucketName)
void
addUpload(String relativePath, BucketPath bucket)
Set<String>
getBuckets()
Integer
getBuildNumber()
Set<String>
getStorageObjects()
static BuildGcsUploadReport
of(AbstractProject<?,?> project)
static BuildGcsUploadReport
of(Run<?,?> run)
-
Methods inherited from class com.google.jenkins.plugins.storage.reports.AbstractGcsUploadReport
getDisplayName, getIconFileName, getParent, getUrlName
-
-
-
-
Constructor Detail
-
BuildGcsUploadReport
public BuildGcsUploadReport(Run<?,?> run)
-
-
Method Detail
-
of
@Nullable public static BuildGcsUploadReport of(AbstractProject<?,?> project)
- Parameters:
project
- a project to getBuildGcsUploadReport
for.- Returns:
- the
BuildGcsUploadReport
of the last build, as returned byof(Run)
, or null of no build existed.
-
of
public static BuildGcsUploadReport of(Run<?,?> run)
- Parameters:
run
- the run to getBuildGcsUploadReport
for.- Returns:
- the existing
BuildGcsUploadReport
of a build. If none, create a newBuildGcsUploadReport
and return.
-
addBucket
public void addBucket(String bucketName)
- Parameters:
bucketName
- the name of the destination bucket.
-
addUpload
public void addUpload(String relativePath, BucketPath bucket)
- Parameters:
relativePath
- the relative path (to the workspace) of the uploaded file.bucket
- the directory location in the cloud
-
getBuckets
public Set<String> getBuckets()
- Specified by:
getBuckets
in classAbstractGcsUploadReport
- Returns:
- the buckets that were used as upload destinations.
-
getStorageObjects
public Set<String> getStorageObjects()
- Specified by:
getStorageObjects
in classAbstractGcsUploadReport
- Returns:
- the uploaded objects (qualified with bucket name).
-
getBuildNumber
public Integer getBuildNumber()
- Specified by:
getBuildNumber
in classAbstractGcsUploadReport
- Returns:
- the build number of this report.
-
-