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.

For a list of other such plugins, see the Pipeline Steps Reference page.

S3 publisher plugin

s3Upload: Publish artifacts to S3 Bucket

  • profileName : String
  • entries
      Array / List of Nested Object
    • bucket : String
      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
      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
    • storageClass : 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
      If Enabled, the artifacts won't be published if the build failed.
    • uploadFromSlave : boolean
      Upload directly from the slave, instead of proxying the upload to the master.
    • 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
      Use S3 AES-256 server side encryption support.
    • 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
      When enabled, files will be compressed with GZIP and "Content-Encoding" header will be set to "gzip".
    • 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
      If option is enabled, content of artifact would be displayed directly in browser. Otherwise, it would be attached and user could download it.
    • userMetadata
        Array / List of Nested Object
      • 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
        Metadata value for the files from this build. Can contain macros (e.g. environment variables).
  • userMetadata
      Array / List of Nested Object
    • 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
      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
      • 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
      • lastCompleted
        • $class: 'MultiJobBuildSelector'
          • 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
            • id : String
          • $class: 'PromotedBuildSelector'
            • level : int
          • latestSavedBuild
            • 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
              • stable : boolean (optional)
            • 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".
                • Values: UseGlobalSetting, UseOldest, UseNewest
            • workspace
            • filter : String
            • excludeFilter : String
            • target : String
            • flatten : boolean
            • optional : boolean

            Was this page helpful?

            Please submit your feedback about this page through this quick form.

            Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

                


            See existing feedback here.