Bamboo Integration

Introduction

This article provides instructions on how to integrate Bamboo with the Unified Agent via a Windows PowerShell Interpreter or Linux shell commands.

Option 1: Bamboo Script Task Using Windows PowerShell Interpreter

Setup

  1. Create a project and fill in the fields:



  2. Create a new plan:

     

  3. Fill in the fields and select 'None' for a repository in order to work on a local workspace.



  4. Select 'Enable Plan':



  5. Run this job in an Agent environment and add a task:



  6. Select a 'Script' task type:



  7. Enter a description for the task, select a 'Windows PowerShell' interpreter, and an 'Inline' script location.



  8. Enter the following in the 'Script body' text box:

The first command downloads the latest version of WhiteSource Unified Agent Jar file to the job folder.
The second command downloads the latest version of WhiteSource Unified Agent configuration file to the job folder.
The third command runs the Jar with regular command line arguments of the Unified Agent.

Save the job.

Make sure to edit the Unified Agent configuration file to match your needs.
Make sure that Background Intelligent Transfer Service (BITS) is enabled on your project job.

Running the Job

  1.  Go to the Configuration page of the plan select 'Run plan':



  2. The Build Result Summary is then displayed:

Option 2: Bamboo Script Task Using Shell or the 'cmd.exe' Interpreter 

Setup

  1. Download CURL, add it to your PATH environment variable and restart Bamboo.
  2. Create a project via the same steps that were described in the previous section.
  3. In the new 'Script Body' window add the following commands: 

The first command downloads the 'wss_agent.sh' script file to the job folder.
The second command runs the script 'wss_agent.sh'. This script downloads the latest version of WhiteSource Unified Agent jar file and configuration file to your Bamboo job 'workspace' folder.
The script runs the jar with regular command line arguments of the Unified Agent.
Make sure to edit the Unified Agent configuration file to match your needs.

Running the Job

Save , Enable job and run it in the way that is described in the previous section.