[Bamboo OnDemand Docs]
[Bamboo Knowledge Base Home]
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.
アーティファクトが後続のジョブと共有されるたびに、ジョブのエージェントにコピーされます。
異なるステージにある 2 つのジョブ間でアーティファクトを共有する方法は次のとおりです。
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.
Screenshot: Creating an artifact dependency
異なるビルド計画間でアーティファクトを共有できますが、その共有には "アーティファクト ダウンローダー タスク" を使用する必要があります。たとえば、WAR を毎回再構築せずに、同じ WAR をある計画から別の計画へと共有することで、別の計画の特定ビルドで受け入れテストを実行するとします。
2 つのビルド計画でアーティファクトを共有する方法は次のとおりです。
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:
| フィールド | 説明 | Optional? |
|---|---|---|
| タスクの説明 | アーティファクト ダウンローダー タスクの簡単な説明 | |
| このタスクを無効化 | このボックスをチェックすると、タスクが無効になります | - |
| ソース計画 | ダウンロードする必要があるアーティファクトのソースであるビルド計画 | |
| アーティファクト名 | Use the drop down menu to locate the name of the artifact that you want to download | |
| パス | The location of the working directory into which you want the artifact downloaded |
ビルド計画からデプロイ環境へも、アーティファクトを共有できます。たとえば、計画の特定のビルド結果をデプロイ環境と共有するとします。そのためには、環境を作成中または作成後に "アーティファクト ダウンローダー タスク" をデプロイ環境に追加する必要があります。
ビルド計画からデプロイ環境へアーティファクトを共有する方法は次のとおりです。
Click on the Add task button. 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:
| フィールド | 説明 | Optional? |
|---|---|---|
| タスクの説明 | アーティファクト ダウンローダー タスクの簡単な説明 | |
| このタスクを無効化 | このボックスをチェックすると、タスクが無効になります | - |
| ソース計画 | The plan that is the source of the artifact you need downloading | |
| アーティファクト名 | Use the drop down menu to locate the name of the artifact that you want to download | |
| パス | The location of the working directory into which you want the artifact downloaded |