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. Artifact sharing is described on this page: Configuring artifact sharing between jobs.

On this page:

Related pages:

Atlassian blog posts:

Screenshot: Artifact definitions for a job



Defining which 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 an artifact definition for a job:

  1. Navigate to the desired job, as described on Configuring jobs.
  2. Click the Artifacts tab, and then Create Definition.
  3. Complete the fields on the screen (see screenshot below) and click 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'.
    Please note:

Screenshot: Creating an artifact definition

 

Notes

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).