When you register a Bamboo Server endpoint, you connect to a Bamboo server to start a build plan from a release pipeline. You can configure multiple artifacts from a particular plan.

About this task

The location of the artifacts produced by a Bamboo build can be exposed as an output parameter to allow other tasks to execute tests on the build and then deploy it.

Prerequisites

  • Verify that the Bamboo server endpoint is registered. See the Installation and Configuration guide.

  • Verify that the Bamboo server version is 5.9.7 or later.

Procedure

  1. Click the Code Stream tab.
  2. On the Pipelines tab, select an existing pipeline and click Edit to configure it.
  3. Click the Stages > button.
  4. Click Add Task.
  5. Select Bamboo from the Provider drop-down menu.
  6. Enter a name for the task and click OK.
  7. Select the new task in the stage.
  8. Confirm to save the pipeline.
  9. Select an Execute Task for the release pipeline.

    Option

    Description

    Always

    Runs the release pipeline task without conditions.

    On Condition(s)

    Runs the release pipeline task only if the defined condition is evaluated as true. If the condition is false, the task is skipped.

    A boolean expression using the following operands and operators is supported.

    • Pipeline variables such as, ${pipeline.variableName}. Curly brackets are reserved for specifying pipeline variables.

    • Task output variables such as, ${Stage1.task1.machines[0].value.hostIp[0]}

    • Default pipeline binding variables such as, ${releasePipelineName}

    • Case insensitive Boolean values such as, true, false, 'true', 'false'

    • Integer or decimal values without quotes

    • String values used with single or double quotes such as, "test", 'test'

    • String and Numeric types of values such as, == Equals and != Not Equals

    • Relational operators such as, > , >=, <, and <=

    • Boolean logic such as, && and ||

    • Arithmetic operators such as, +, -, *, and /

    • Nested expressions using round brackets

    • Strings with literal value ABCD is evaluated as false and the task is skipped.

    Unary operators are not supported.

    A sample condition, ${Stage1.task1.output} == “Passed” || ${pipeline.variableName} == 39

  10. (Optional) : Select the Continue Pipeline execution even if this task fails option.

    This option allows the release pipeline to bypass the failed task and continue with the execution process.

  11. Select the endpoint, project, and the Bamboo plan.
  12. Enter the Bamboo plan input properties.
  13. Click Save.

Output Format for a Bamboo Task

The following task output format is an example for a Bamboo task.

[
  {
    "name": "planKey",
    "type": "String",
    "value": “SAM-S2P1”
  },
  {
    "name": "resultUrl",
    "type": "String",
    "value": “http://xx.xxx.xx.xx:xxxx/browse/SAM-S2P1-101”
  },
  {
    "name": "buildNumber",
    "type": "String",
    "value": 101
  },
  {
    "name": "buildTestSummary",
    "type": "String",
    "value": “4 passed”
  },
  {
    "name": "triggerReason",
    "type": "String",
    "value": “Manual run by <USER>”
  },
  {
    "name": "successfulTestCount",
    "type": "String",
    "value": 0
  },
  {
    "name": "failedTestCount",
    "type": "String",
    "value": 0
  },
  {
    "name": "skippedTestCount",
    "type": "String",
    "value": 0
  }
]