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

Last updated: Oct 07, 2019 12:44

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.
  4. Click Configure Plan.
  5. On the Configure job page, select Agent environment to run your builds.
  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.
  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.
  4. In the Tasks types form, select the proper version of Maven.
  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.
  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.

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.
  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.
    • 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. 

6 | Run the Bamboo plan manually at any time

  • Select Run > Run plan.
  • No labels