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
    • Type: String
  • entries
      Array/List
      Nested Object
    • bucket
      Destination bucket. It will be created if doesn't exist. Environment variable can be used, for example my-artifact-bucket/${JOB_NAME}-${BUILD_NUMBER}.
      • Type: String
    • sourceFile
      Files to be uploaded. This field follows the Ant glob syntax, such as **/build/test-reports/*.xml. The base directory is the workspace.
      • Type: String
    • excludedFile
      • Type: String
    • storageClass
      • Type: String
    • selectedRegion
      Region location of the Bucket. By default plugin uses value provided by system property "hudson.plugins.s3.DEFAULT_AMAZON_S3_REGION"
      • Type: String
    • noUploadOnFailure
      If Enabled, the artifacts won't be published if the build failed.
      • Type: boolean
    • uploadFromSlave
      Upload directly from the slave, instead of proxying the upload to the master.
      • Type: boolean
    • managedArtifacts
      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
      • Type: boolean
    • useServerSideEncryption
      Use S3 AES-256 server side encryption support.
      • Type: boolean
    • flatten
      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.
      • Type: boolean
    • gzipFiles
      When enabled, files will be compressed with GZIP and "Content-Encoding" header will be set to "gzip".
      • Type: boolean
    • keepForever
      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.
      • Type: boolean
    • showDirectlyInBrowser
      If option is enabled, content of artifact would be displayed directly in browser. Otherwise, it would be attached and user could download it.
      • Type: boolean
    • userMetadata
        Array/List
        Nested Object
      • key
        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).
        • Type: String
      • value
        Metadata value for the files from this build. Can contain macros (e.g. environment variables).
        • Type: String
  • userMetadata
      Array/List
      Nested Object
    • key
      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).
      • Type: String
    • value
      Metadata value for the files from this build. Can contain macros (e.g. environment variables).
      • Type: String
  • dontWaitForConcurrentBuildCompletion
    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.
    • Type: boolean
  • consoleLogLevel
    Allows filtering log messages by level of severity: INFO, WARNING and SEVERE.
    • Type: String
  • pluginFailureResultConstraint
    • Type: String

s3CopyArtifact: S3 Copy Artifact

  • projectName
    • Type: String
  • buildSelector
      Nested Choice of Objects
    • downstream
      • upstreamProjectName

        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)

        • Type: String
      • upstreamBuildNumber
        The number of the build to find its downstream build. You can also specify display names. You can use variable expressions.
        • Type: String
    • lastWithArtifacts
      • lastCompleted
        • $class: 'MultiJobBuildSelector'
          • buildParameter
            • parameterName
              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.

              • Type: String
          • permalink
            • id
              • Type: String
          • $class: 'PromotedBuildSelector'
            • level
              • Type: int
          • latestSavedBuild
            • specific
              • buildNumber
                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.
                • Type: String
            • lastSuccessful
              • stable (optional)
                • Type: boolean
            • upstream
              • allowUpstreamDependencies (optional)
                • Type: boolean
              • fallbackToLastSuccessful (optional)
                • Type: boolean
              • 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
              • Type: String
            • excludeFilter
              • Type: String
            • target
              • Type: String
            • flatten
              • Type: boolean
            • optional
              • Type: 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.