This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

You may want to trigger a Plan build when another Plan's build has successfully completed. This ensures that changes to any Job's source code associated with one Plan does not break the build of another dependent Plan (known in this context as a 'child' Plan).

For example, there could be two Plans in Bamboo:

  1. Acme – Core — アプリケーションのコア コードが含まれています。
  2. Acme – Plugin — アプリケーションのプラグインのコードが含まれています。

In this scenario, the Acme – Plugin Plan is a child of Acme – Core. Any changes to source code associated with the Acme – Core Plan should trigger a build of Acme – Plugin. In turn, every time a Acme – Plugin Plan build completes successfully, you may want to run builds for some additional Plans (e.g Acme – Functional Tests and Acme – Unit Tests). In this case, Acme – Plugin is a parent of the Acme – Functional Tests and Acme – Unit Tests Plans, as well as being a child of the Acme – Core Plan.

On this page:

Manual Dependency Management

To trigger a build when another build finishes:

  1. ダッシュボードをクリックし、すべてのプラン タブをクリックします。
  2. Locate the plan in the list and click the edit icon  to display the Plan's Configuration pages.
  3. 依存関係タブをクリックします。
  4. Locate the 'Manual Dependency Management' section — all Plans in your Bamboo system (other than the one you are configuring) are listed in the 'Child plans' and 'Parent plans' sections. Select Plans in the following subsections:
    • Child plans — Plans whose builds you want triggered as a result of successful completion of the Plan you are configuring.
    • Parent plans — Plans whose successful completion will trigger a build of the Plan you are configuring. Any other Plans in your Bamboo system that specify build dependencies, with the Plan you are configuring, will have their check boxes selected.
  5. 保存をクリックします。

Automatic Dependency Management with Maven 2

Automatic Dependency Management is a feature for users who use Maven 2 and wish for their Parent and Child dependencies to be setup according to the dependencies in the Maven pom.xml. Every time the plan is run, the Bamboo Automatic Dependencies are updated to reflect any additions or removals of Maven dependencies.

To setup Automatic Dependency Management:

  1. ダッシュボードをクリックし、すべてのプラン タブをクリックします。
  2. Locate the plan in the list and click the edit icon  to display the plan's configuration pages.
  3. Locate the job that contains the pom.xml you wish to use to automatically update plan dependencies by analysing a Maven pom file.
  4. アクション > ジョブの設定を選択します。
  5. タスク タブをクリックします。
  6. Click Add Task and add the Maven Dependency Processor task to the job. For best results, ensure that the task runs last by dragging it to the bottom of the task list. For more information on configuring tasks, see Configuring Tasks.

    設定注意
    プロジェクト ファイルのオーバーライドオプション。プロジェクト ファイル(pom.xml)のある作業ディレクトリまたはサブ作業ディレクトリに対する相対位置。
    Working Sub Directoryオプション。タスクがプロジェクト ファイル(pom.xml)を探すサブ ディレクトリ。
    別の settings.xml の場所オプション。タスクが特定の Maven リポジトリからの依存関係を解決する必要がある場合に使用される別の settings.xml を指定します。
    Maven ローカル リポジトリのパスオプション。依存関係の解決に使用するタスクのローカル Maven リポジトリのフル パスを指定します。
  7. 保存をクリックします。
  8. プラン ナビゲータを使用して、プランに戻ります。
  9. 依存関係タブをクリックします。
  10. 依存関係の自動管理を選択します。Maven 依存関係プロセッサを表示するように設定したジョブの名前が表示されます。
  11. 保存をクリックします。

Dependency Blocking

Dependency blocking is a advanced feature of dependent build triggering that can be used to manage Plan builds with parent build dependencies. This ensures that a "tree" of dependent builds always runs in tree hierarchy order, even if child Plan builds are triggered independently of their parents. For more information, see Dependency Blocking Strategies. Please note, dependency blocking only works when the Plan uses a build strategy based on source code updates.

注意

Build dependencies work together with the build strategies of plans to trigger builds of these plans. For example, you can set up Plan A to poll its repository for changes as well as configure a build dependency on a parent plan (Plan B). In this case, builds of Plan A will be triggered when code changes are detected in its repository and also when builds of Plan B complete successfully.
If you want your builds to only be triggered by successful parent builds from your build dependencies, you can do this by specifying Manual as the build strategy for your plan. See Triggering a Plan Build Manually.

  • 子ビルドが親ビルドと同じソースを使用する場合(Subversion URL が同じ場合など)、子ビルドは強制的に、親ビルドと同じリビジョンのソース コードをチェックアウトします。これによって、あるビルドから別のビルドをトリガする場合に、ビルドの整合性を保ちます。
  • Take care not to create circular dependencies, where your child build triggers one of its parent builds. Otherwise your plans may build continuously. See Triggering a Plan Build Manually.

4 Comments

  1. Anonymous

    Hmmm... am I the only one to think that these terms parent and child kind of oddly defined in Bamboo. I think they in other areas in sw development there meaning is vice-versa? And also maybe parent and child are not good terms to be used for dependencies.

  2. Anonymous

    I agree, these child and parent terms are confusing.

  3. Anonymous

    How do we get the Artifact Sharing to come up? I don't see that when I look and I'm on 3.2. Under Manual Dependency I only see a list of all the plans and I can choose plans to be a child or parent of the plan I'm on?

  4. Anonymous

    Is it possible for a plan to have two parents, but only be triggered on successful completion of both?

    Here's my scenario:

    Build Plan

    TestA Plan

    TestB Plan

    Publish Plan

     

    The "Build" plan triggers two children, "TestA" and "TestB". (These are different kinds of tests, and we want to run them in parallel for speed and resource reasons)

     

    Now, I only want "Publish" to run if the two "Test" plans succeed. I can see that I can make both "TestA" and "TestB" be parents of "Publish", but "Publish" gets run when the first of his parents completes, which isn't what I want.

    Any documentation on how to implement this kind of scheme in Bamboo 3.3?