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. The instructions on this page describe how to define which artifacts you want keep 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, share the WAR from one Job to another without rebuilding it each time. Artifact sharing is described on this page: Configuring Artifact Sharing between Jobs. |
On this page: |
Screenshot above: 'Artifacts Settings 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:
- Navigate to the desired Job, as described on Configuring a Job.
- Click the 'Artifacts' tab to display the Job's Artifacts settings (see screenshot above).
- Click the 'Create Definition' button.
- 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:- 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.
- If you want to share artifacts with other Jobs in the plan, you will need to mark the artifacts as shared. Sharing artifacts is described on this page: Configuring Artifact Sharing between Jobs.
Screenshot above: '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 in the Bamboo User's Guide).
Related Topics
Viewing a Build's Artifacts
Configuring Artifact Sharing between Jobs