This is the documentation for Bamboo 5.5. View this page for the

Unknown macro: {spacejump}

of Bamboo, or visit the latest Bamboo documentation.

このページでは、サンプル デプロイ プロジェクトを検討し、デプロイ プロジェクトを立ち上げて実行するために必要な手順を説明します。

On this page:

ステップ 1: デプロイ プロジェクトを作成する

デプロイ プロジェクトを作成する最初のステップは、プロジェクトを既存のビルド プランに関連付けることです。これは、デプロイ プロジェクトの作成と同時に行います。新しいデプロイ プロジェクトを作成し、それを既存のビルド プランに関連付けるには、次の手順に従います。

  1. ヘッダー バーのドロップダウン メニューで [Create (作成)] > [Create deployment project (デプロイ プロジェクトの作成)] の順にクリックします。[Set up deployment project (デプロイ プロジェクトのセットアップ)] 画面が表示されます。
  2. Use the Source build plan to select an existing build plan. Bamboo will identify any relevant build plans in the menu:

    In this example we can see that the associated build plan is the one for project Bonsai
  3. 必要に応じて、[Name (名前)] および [Description (説明)] フィールドに入力します。
  4. [Create deployment project (デプロイ プロジェクトの作成)] をクリックします。デプロイ プロジェクトが作成され、上記で選択したビルド プランに自動的に関連付けられます。

ステップ 2: リリース命名スキームを定義する

The next step is to provide a version naming strategy for the deployment project. This will define how the deployment project will ascribe names to current and subsequent artifact bundles that it generates. See Naming versions for deployment releases for more information. To configure your version naming scheme:

  1. From the deployment project configuration screen, click Release versioning to display the deployment project release versioning screen:


  2.  命名スキームに従って必須フィールドに入力します。この例では、単純な命名スキームが採用されていることがわかります。次の名前は 1.0 になり、その次は 1.1 になり、以降も同様です。
  3. [Save (保存)] をクリックして命名スキームを保存します。

ステップ 3: デプロイ環境を作成する

命名スキームを定義したら、アーティファクトをデプロイするためのデプロイ環境を作成する必要があります。通常、デプロイ環境にはテスト、ステージング、QA、本番が含まれますが、有用なデプロイ環境の作成に制限はありません。方法を見てみましょう。

  1. From the deployment project configuration screen, click Add environment to open the Set up environment screen:
  2. デプロイ環境の名前と簡単な説明を入力します。この例では、環境を「Dev Sandbox」と呼び、適切な説明を付加します。
  3. [Create and back (作成して戻る)] または [Continue to task setup (タスクのセットアップに進む)] をクリックして、環境を作成します。次のステップはいくつかのタスクを追加することですので、[Continue to task setup (タスクのセットアップに進む)] をクリックして次のステップに進みます。

ステップ 4: いくつかの環境タスクを追加する

タスクとは、デプロイ プロジェクトを実行するうえで必要なアクティビティのことです。リポジトリからコードをチェックアウトしたり、サーバーからアーティファクトをダウンロードしたり、スクリプトを実行したりすることが考えられます。デプロイ環境にいくつかのタスクを追加する方法を見てみましょう。

  1. If you continued to task setup from the environment creation process, then you will already be at the Set up tasks screen. alternatively, From the deployment project configuration screen, click Set up tasks:
  2. Click Add task to display the list of tasks that are available to you:

    In this example, we will add a simple script task to run as part of our build. Clicking on the task we wish to add adds it to the set up tasks screen, and allows us to configure the individual task:


  3. Click Save to save the individual task configuration, and then on Finish deployment project to complete configuration of the script task for the deployment environment. In reality, we would require a number of tasks, not least one to obtain an artifact for use in the deployment. The following task configuration for a production environment includes an artifact download, DB change script, a Tomcat deployment, source code checkout and a Maven 3.x task:

ステップ 5: デプロイを開始する

これで、サンプル デプロイ プロジェクトには、実行に必要な要素がすべて揃いました。プロジェクト ページで適切なデプロイ アイコンをクリックすると、デプロイ プロジェクトを手動でトリガーできます。

ステップ 7: その他のデプロイ環境オプション

デプロイはこれで終了ではありません。ここで紹介する単純な例は、デプロイ プロジェクトの設定方法と仕組みを示すスナップショットにすぎません。Bamboo デプロイ プロジェクトには、開発とデプロイのプロセスを管理するのに役立つ多くの追加機能が用意されています。以下はその例です。

  • Automated triggering (自動トリガー) - ビルド プランが正常に完了した後、またはスケジュールされた時間に自動的にデプロイする場合に選択します。
  • Agents (エージェント) - 特定のエージェント、エラスティック エージェント、またはイメージ設定を割り当てて、環境のデプロイを実行します。
  • Variables (変数) - バージョンを環境にデプロイするときに使用する変数を組み込みます。
  • Permissions (権限) - 環境で表示、編集、デプロイの各権限を持つユーザーを定義します。
  • Notifications (通知) - 環境のイベントに関する通知の対象と方法を定義します。
  • ラベルなし