[Bamboo Knowledge Base]
This page describes how to share artifacts. Bamboo allows artifact sharing between:
You can share artifacts between jobs in different stages using artifact dependencies. For example, you may want to run acceptance tests on a build, sharing the same WAR from one job to another without rebuilding it each time.
Each time the artifact is shared with a subsequent job, it is copied to the job's agent.
To share an artifact between two jobs in different stages:
Navigate to the job in a subsequent stage that will consume the artifact, and click the Artifacts tab. Click Create Dependency. Complete the fields on the screen (see screenshot below) and click Create.
On this page:
Atlassian Blogs:
Screenshot: Creating an artifact dependency
You can share artifacts between different build plans, however you need to use the 'Artifact downloader task' to do so. For example, you may want to run acceptance tests on a particular build from a different plan by sharing the same WAR from one plan to another without rebuilding it each time.
To share an artifact between two build plans:
Click the Add task button. The 'Task types' window will appear. Select Artifact Downloader Task to open the 'Artifact downloader task' configuration pane:
Complete the configuration using the following options:
Field | Description | Optional? |
---|---|---|
Task description | A brief description of the artifact downloader task | |
Disable this task | Check this box to disable the task | - |
Source Plan | The build plan that is the source of the artifact you need to download |
You can also share artifacts from a build plan into a deployment environment. For example, you may wish to share a particular build result from a plan with a deployment environment. To do this, you need to add the 'Artifact downloader task' to a deployment environment during or after the environment creation process.
To share an artifact from a build plan to a deployment environment:
Click Add task. The 'Task type' selection window will display. Select Artifact Downloader Task to open the 'Artifact downloader task configuration' pane:
Complete the configuration using the following options:
Field | Description | Optional? |
---|---|---|
Task description | A brief description of the artifact downloader task | |
Disable this task | Check this box to disable the task | - |
Artifact Name | Use the drop down menu to locate the name of the artifact that you want to download | |
Destination Path | The location of the working directory into which you want the artifact downloaded |