Skip to end of banner
Go to start of banner

Using Slack for Bamboo Status Reporting

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Summary

Make build and testing status visible for your teams and management so failures can be identified, discussed in team SUs, and handled in a timely manner. In our case, we have hundreds of plans across multiple Bamboo build servers and need to summarize the status of critical plans for different teams. We automatically report on a customized list of specific plans to specific teams in the team's Slack channel or notification channel depending on the need. The automation is run with Bamboo plans that specify timing and content.

This is done with the Appfire Command Line Interface (CLI) combining actions from the Bamboo Command Line Interface (CLI) and the CLI for Slack. Requires Version 9.2 or higher.

Steps

StepDescription
Identify critical builds

Focus on the most critical builds that need timely attention. There are multiple ways to specify what build plans should be included in the report.

  1. Simple list of plan keys (fully qualified by project)
  2. Simple list of plan keys in a specific project
  3. Plans in a project with regex and other filtering criteria
Example
acli bamboo.examplegear -a getBuildReportList --project EXAMPLE --list PLAN1,PLAN2,PLAN3 --field notState=UNKNOWN -f @temp 
Choose columns to report

Select the minimum columns needed. getBuildReportList already minimizes the columns reported. In this example with a very targeted report, we remove the first 3 columns.

... --columns -1,2,3
Choose a date format

Specify a date format that best matches specific needs and being concise 

... --dateFormat "EEE HH:mm"
Modify data

Format the data to report. In this example, we are going to report as a text table, without wrapping, and with modified test result headings to minimize line length 

acli csv -a copyCsv --sourceFile @temp --outputType text --headingAugments ",,Succ,Fail,Skip,Quar" --options screenwidth=999
Send to Slack

Assume you already have slack configured for acli with appropriate token and access granted for your channel

  • See 

"slack_appfire -a sendMessage --channel ${bamboo.channel} -f @temp --options markdown=code " \

         

  • No labels