The following plugin provides functionality available through
Pipeline-compatible steps. Read more about how to integrate steps into your
Pipeline in the
Steps
section of the
Pipeline Syntax
page.
Destination bucket. It will be created if doesn't exist. Environment variable can be used, for example my-artifact-bucket/${JOB_NAME}-${BUILD_NUMBER}.
sourceFile : String
sourceFile : String
Files to be uploaded. This field follows the Ant glob syntax, such as **/build/test-reports/*.xml. The base directory is the workspace.
excludedFile : String
excludedFile : String
storageClass : String
storageClass : String
selectedRegion : String
selectedRegion : String
Region location of the Bucket. By default plugin uses value provided by system property "hudson.plugins.s3.DEFAULT_AMAZON_S3_REGION"
noUploadOnFailure : boolean
noUploadOnFailure : boolean
If Enabled, the artifacts won't be published if the build failed.
uploadFromSlave : boolean
uploadFromSlave : boolean
Upload directly from the slave, instead of proxying the upload to the master.
managedArtifacts : boolean
managedArtifacts : boolean
When enabled, this lets Jenkins fully manage the artifacts, exactly like it does when the artifacts are published to the master.
In this case, the artifacts are stored in the "jobs/[job]/[build-number]/" path in the selected bucket and prefix path. This means the following features are enabled:
artifacts are finger printed and linked to the build
artifacts can be downloaded directly from the build page in the S3 Artifact section
artifacts are automatically deleted when the build is deleted
the S3 Copy Artifact build step can be used to download artifacts from S3 automatically, helping build complex pipelines
useServerSideEncryption : boolean
useServerSideEncryption : boolean
Use S3 AES-256 server side encryption support.
flatten : boolean
flatten : boolean
When enabled, Jenkins will ignore the directory structure of the artifacts in the source project and copy all matching artifacts directly into the specified bucket. By default the artifacts are copied in the same directory structure as the source project.
gzipFiles : boolean
gzipFiles : boolean
When enabled, files will be compressed with GZIP and "Content-Encoding" header will be set to "gzip".
keepForever : boolean
keepForever : boolean
By default, artifacts will be cleaned up as part of job history rotation policy. If you want to keep artifacts after removing job history, you need to enable this option.
showDirectlyInBrowser : boolean
showDirectlyInBrowser : boolean
If option is enabled, content of artifact would be displayed directly in browser. Otherwise, it would be attached and user could download it.
userMetadata
userMetadata
Array / List of Nested Object
key : String
key : String
Metadata key for the files from this build. It will be prefixed by "x-amz-meta-" when uploaded to S3. Can contain macros (e.g. environment variables).
value : String
value : String
Metadata value for the files from this build. Can contain macros (e.g. environment variables).
userMetadata
Array / List of Nested Object
key : String
key : String
Metadata key for the files from this build. It will be prefixed by "x-amz-meta-" when uploaded to S3. Can contain macros (e.g. environment variables).
value : String
value : String
Metadata value for the files from this build. Can contain macros (e.g. environment variables).
dontWaitForConcurrentBuildCompletion : boolean
When disabled, only publish to S3 after completion of concurrent builds to prevent overriding published artifact. You can enable this to publish to S3 at the end of each concurrent build. Published artifact should then have a different name for each build to prevent unnecessary uploads.
consoleLogLevel : String
Allows filtering log messages by level of severity: INFO, WARNING and SEVERE.
pluginFailureResultConstraint : String
dontSetBuildResultOnFailure : boolean
When checked or selected, the build status will not get updated when a failure occurs. This is primarily useful when using this step in a pipeline. A failure would manifest itself as an exception thrown as opposed to a change in build status. Therefore, the pipeline author can choose to decide to handle the exception with a retry(), etc.
s3CopyArtifact: S3 Copy Artifact
projectName : String
buildSelector
Nested Choice of Objects
downstream
downstream
upstreamProjectName : String
Copy artifacts from a build that is a downstream of a build of the specified project. You can use variable expressions.
Downstream builds are found using fingerprints of files. That is, a build that is triggered from a build isn't always considered downstream, but you need to fingerprint files used in builds to let Jenkins track them.
Note: "Downstream build of" is applicable only to AbstractProject based projects (both upstream and downstream projects).
AbstractProject based projects:
Freestyle projects
Multi-configuration projects
Maven projects
Non AbstractProject based projects:
Pipeline jobs (aka. Workflow jobs)
upstreamBuildNumber : String
The number of the build to find its downstream build. You can also specify display names. You can use variable expressions.
lastWithArtifacts
lastWithArtifacts
lastCompleted
lastCompleted
$class: 'MultiJobBuildSelector'
$class: 'MultiJobBuildSelector'
buildParameter
buildParameter
parameterName : String
Name of the "build selector" parameter. A parameter with this name should be added in the build parameters section above. There is a special parameter type for choosing the build selector.
You can pass not only the parameter name, but also the parameter value itself. This is useful especially used with workflow-plugin.
permalink
permalink
id : String
$class: 'PromotedBuildSelector'
$class: 'PromotedBuildSelector'
level : int
latestSavedBuild
latestSavedBuild
specific
specific
buildNumber : String
While this selector is for build numbers (e.g. "22" for build #22), you can also resolve build parameters or environment variables (e.g. "${PARAM}"). The display name of a build and permalinks (e.g. "lastSuccessfulBuild", "lastBuild"...) can be used as well.
lastSuccessful
lastSuccessful
stable : boolean (optional)
upstream
upstream
allowUpstreamDependencies : boolean (optional)
fallbackToLastSuccessful : boolean (optional)
upstreamFilterStrategy (optional)
Jenkins launches only one build when multiple upstreams triggered the same project at the same time. This field specifies from which upstream build to copy artifacts in those cases. "Use the oldest" copies artifacts from the upstream build with the smallest build number (that is, oldest). "Use the newest" copies artifacts from the upstream build with the largest build number (that is, newest). The default value is "Use global setting", which behaves as configured in "Manage Jenkins" > "Configure System".