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

Last updated: May 06, 2021 23:43

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.

     Click to view image
  4. Click Configure Plan.
  5. On the Configure job page, select Agent environment to run your builds.

     Click to view image
  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.

     Click to view image
  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.

     Click to view image
  4. In the Tasks types form, select the proper version of Maven.

     Click to view image
  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.

     Click to view image
  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.

     Click to view image

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.

     Click to view image
  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.

       Click to view image
    • 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. 

       Click to view image

6 | Run the Bamboo plan manually at any time

  • Select Run > Run plan.

     Click to view image