Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Nov 18, 2019 17:35

This section guides you through the process of creating a Bamboo plan to run a Maven-enabled automation package.

1 | Store source code in a source code repository

To allow the Bamboo building agent to pull the source code of the automation package, you need to store the package in a version control system such as Bitbucket, Git, CVS, Microsoft Team Foundation Server (TFS), Perforce Helix Core, and so on. This section uses Bitbucket as an example.

2 | Create a Bamboo plan

  1. Log in to Bamboo.
  2. Click Create > Create plan to create a new Bamboo plan. 
  3. On the Configure plan page, link the repository to the place where the automation source code is located.
    image2019-9-17_12-53-47.png
  4. Click Configure Plan.
  5. On the Configure job page, select Agent environment to run your builds.
    image2019-9-17_12-55-53.png
  6. Click Create.

In this section:

3 | Add a Maven building agent to the Bamboo plan

For a Maven building agent to run the automation package, you need to add the Maven building agent to the Bamboo plan.

  1. When the plan creation completes, select Actions > Configure plan to continue the plan configuration.
    image2019-9-17_12-57-44.png
  2. On the Configuration page, under Stages & Jobs, select Default Stage > Default Job
  3. On the Tasks tab, click Add Task to add a new task.
    image2019-9-17_13-4-17.png
  4. In the Tasks types form, select the proper version of Maven.
    image2019-9-17_13-5-43.png
  5. On the task configuration page, provide the required Maven information. This includes the building goals and desired system properties that you want Maven to use.
    The passing values can be Bamboo built-in or customized variables.
    image2019-9-17_13-14-40.png
  6. Click Save to save the Maven task.

4 | Set Bamboo customized variables

Bamboo lets you set customized variables on the Variables tab. You can later refer to these variables with ${bamboo.<Variable_Name>}.

  1. On the Configuration page, on the Variables tab, provide the variable name and value for each variable you want to add.
  2. Click Add.
    image2019-9-17_13-21-27.png

5 | Set Bamboo plan triggers

You need to set the triggers that start a run of the Bamboo plan.

  1. On the Configuration page, on the Triggers tab, click Add trigger.
    image2019-9-17_13-23-19.png
  2. Configure the trigger as needed. The following triggers are the ones most often used:
    • Scheduled: If you want your automation package run at a specific time, select the Scheduled trigger type.
      In the Schedule editor form, specify the interval and time that you want your script to run.
      image2019-9-17_13-27-17.png
    • Repository polling: If you want your script to run whenever a designated repository is updated, select the Repository Polling trigger type.
      Select how often you want polling to occur and which repository is polled. You can also specify that polling should occur after any other plan has passed. 
      image2019-9-17_13-31-23.png

6 | Run the Bamboo plan manually at any time

  • Select Run > Run plan.
    image2019-9-17_13-33-45.png