Configuring a job's build artifacts

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Artifacts are files created by a job build (e.g. JAR files). Artifact definitions are used to specify which artifacts to keep from a build and are configured for individual jobs.

See Sharing artifacts.

This page describes how to define the artifacts that should be kept from a job's build. For example, you may wish to keep reports, websites or files (e.g. JAR files) generated by a job build.

You can also configure artifact sharing between jobs in a plan. For example, you may want to run acceptance tests on a build, and then share the WAR from one job to another, without rebuilding the WAR each time. See Sharing artifacts.

Atlassian blog posts:

Define the artifacts to keep for a job

You can specify which artifacts to keep by setting up an artifact definition for the job. The artifacts will be available after each build of a job.

To set up a new artifact definition for a job:

  1. Navigate to the desired job, as described on Configuring jobs.
  2. Select the Artifacts tab, and then Create artifact.
  3. Complete the fields on the screen (see screenshot below) and select Create. For example, if you want to keep the latest version of a JAR you have built, you could specify Copy Pattern to be '**/*.jar' and the Location to be target.
    • The location is relative to the build directory. Do not use the absolute path to refer to the location.
    • The copy pattern is relative to the location specified.
    • Asterisks are not supported for Location. For this field, provide the folder name where the file would be located.
    • If you want to share artifacts with other jobs in the plan, you will need to mark the artifacts as shared. See Sharing artifacts.
    • You can disable file compression that happens when the artifact is being transferred between the agent and the server.


Artifacts are copied to a subdirectory (/JOB_KEY/download-data/) under your Build directory folder (see Locating important directories and files). Artifacts which you define in the plan are listed in each build result as artifacts (see Viewing a build's artifacts).

Last modified on Aug 25, 2022

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.