デプロイ プロジェクトの例

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

On this page:

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

The first step in creating a deployment project is to associate the project with an existing build plan. You can do it at the same time as creating the deployment project. To create a new deployment project, and associate an existing build plan with it:

  1. Select Create > Create deployment project in the dropdown menu from the top navigation bar.
  2. Complete the Name and Description fields as required.
  3. Select an existing build plan in Build plan. Bamboo will identify any relevant build plans in the menu. 
  4. If your build plan has a plan branch, Bamboo will detect it and offer an additional field for completion.
  5. Select Save deployment project. Your deployment project will be created, and will automatically be associated with the build plan you selected above.

Create deployment project screen

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

次のステップは、デプロイ プロジェクトのバージョン命名戦略を指定することです。ここでは、デプロイ プロジェクトにおいて現在のアーティファクト バンドルまたは今後生成されるアーティファクト バンドルに名前を割り当てる方法を定義します。詳細については、「デプロイ リリースのバージョンの命名」を参照してください。バージョン命名スキームを設定するには、次の手順に従います。

  1. From the deployment project configuration screen, select Release versioning.


  2.  Complete the required fields according to your naming scheme. In this example we can see that a simple naming scheme has been adopted - the next name will be release-1, and the subsequent release-2.
  3. 保存 を選択します。

Release versioning section of deployment project

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

Once we have defined our naming scheme, we need to create a deployment environment for the artifact(s) to be deployed into. Typically, deployment environments include Test, Staging, QA, and Production, however there's no limit to creating useful deployment environments. Let's look at how it's done:


  1. From the deployment project configuration screen, select Add environment.
  2. Enter the name of the deployment environment, and a brief description.
  3. Select Create.
    Deployment project environment setup

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

Tasks are activities that the deployment project will perform in order to run. These could be checking out some code from a repository, downloading an artifact from a server, or running a script. Let's have a look at how to add a couple of tasks to the deployment environment:

  1. From the deployment project configuration screen, select Set up tasks:
    Task setup screen
  2. Select Add task to display the list of tasks that are available to you:
    Task types screen
    In this example, we will add a simple script task to run as part of our build. Selecting the task we wish to add adds it to the set up tasks screen, and allows us to configure the individual task:
    Script task setup screen

  3. Select 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:
    A list of tasks for deployment project

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

Our sample deployment project now has all of the elements required to run. We can trigger the deployment project manually by selecting the appropriate deploy () icon on the Deployment projects page.

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

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

  • Automated triggering - Select to automatically deploy after a successful build plan completes, or at a scheduled time.
  • Agents - Assign specific agents, elastic agents, or image configurations to execute the deployment for the environment.
  • Variables - Incorporate variables for use when deploying versions to environments.
  • Permissions - Define what users are allowed to view, edit, and deploy in the environment.
  • Notifications (通知) - 環境のイベントに関する通知の対象と方法を定義します。



最終更新日 2021 年 7 月 18 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.