このページでは、ジョブのビルドによって生成されたアーティファクトのうち、保持すべきアーティファクトを定義する方法について説明します。たとえば、ジョブのビルドによって生成されたレポート、Web サイト、またはファイル (JAR ファイルなど) を保持する必要がある場合があります。

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.

アトラシアンのブログ投稿:

 


ジョブで保持するアーティファクトを定義する

ジョブのアーティファクト定義をセットアップすることで、保持するアーティファクトを指定できます。アーティファクトは、ジョブの各ビルド後に利用可能になります。

ジョブのアーティファクト定義をセットアップするには、次の手順に従います。

  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:

スクリーンショット: アーティファクト定義の作成

 

注意

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