Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Bamboo-to-CCTray is a small Ruby proxy application that can expose Atlassian Bamboo continuous integration build statuses in CruiseControl's CCTray XML format

License

Notifications You must be signed in to change notification settings

chadlwilson/bamboo_cctray_proxy

Repository files navigation

Bamboo-to-CCTray Proxy

Build pipeline status badge License

Bamboo-to-CCTray is a small Ruby proxy application that can expose Atlassian Bamboo continuous integration build statuses in the CCTray XML format, originally inspired by CruiseControl, and still supported by most CI servers (cloud and non-cloud-based). But not Bamboo!

This allows the many tools written to support monitoring of builds to be used with Atlassian Bamboo builds. Examples of such tools are build radiator/monitor tools such as NeverGreen and user notification tools such as CCMenu

This was originally developed in 2010 by @amanking, and later ported to GitHub, moved to modern Ruby, Bamboo REST API (rather than RSS feeds), Dockerized and augmented to support monitoring entire Bamboo projects.

Examples

Bamboo builds on NeverGreen (with healthy builds showing; for clarity) Example Monitor page

Auto-detection of Bamboo builds: Example Tracking page

Example CCTray formatted output snippet driving the above

<Projects>
    <Project lastBuildLabel="69" lastBuildTime="2019-07-02T06:24:03Z" name="Server - Kubernetes 1.11 - 1.7.x"
             webUrl="https://build.spring.io/rest/api/latest/result/SCD-K8S19B15X-69" activity="Sleeping"
             lastBuildStatus="Success"/>
    <Project lastBuildLabel="101" lastBuildTime="2019-11-13T19:23:08Z" name="Spring Cloud Data Flow Samples"
             webUrl="https://build.spring.io/rest/api/latest/result/SCD-SCDFSAMPLES-101" activity="Sleeping"
             lastBuildStatus="Failure"/>
    <Project lastBuildLabel="175" lastBuildTime="2019-11-26T14:52:21Z" name="projectreactor.io"
             webUrl="https://build.spring.io/rest/api/latest/result/REACTOR-RSITE-175" activity="Sleeping"
             lastBuildStatus="Success"/>
    <!-- SNIPPED -->
</Projects>

You can see this example yourself in ./examples and run with

git clone git@github.com:chadlwilson/bamboo_cctray_proxy.git && cd bamboo_cctray_proxy.git/examples
docker-compose up

Usage

  1. Setup your configuration in config/bamboo.xml
  2. Run it by one of the mechanisms below
  3. Navigate to http://localhost:7001/dashboard/cctray.xml to view the feed; point your tools at this

Docker

mkdir -p config && touch config/bamboo.yml # Put your config here
docker run -p 7001:7001 -v $(pwd)/config:/app/config chadwilson/bamboo_cctray_proxy:latest

Running from source

git clone git@github.com:chadlwilson/bamboo_cctray_proxy.git && cd bamboo_cctray_proxy
bundle install --without=development
ruby dashboard.rb

Configuration

The Bamboo servers and builds to monitor are specified in config/bamboo.yml.

Example configuration:

# Monitor specific builds by their build plan keys
- spring_cloud_data_builds:
    url: https://build.spring.io
    build_keys:
      - SCD-K8S19B15X
      - SCD-SCDFSAMPLES

# Monitor entire projects with their project keys
- spring_reactor_project:
    url: https://build.spring.io
    projects:
      - REACTOR

# You can use either of the patterns above with a secured Bamboo server
# Note; the password is in plain-text.
- secured_bamboo:
    url: https://secret.bamboo.org
    basic_auth:
      username: username
      password: password
    build_keys:
      - ABC

# Returns ALL plans the user has permissions to view on the server.
# Be careful; this probably won't perform well; especially not on a public server!
- secured_bamboo_all_plans:
    url: https://secret.bamboo.org
    basic_auth:
      username: username
      password: password

Resources

About

Bamboo-to-CCTray is a small Ruby proxy application that can expose Atlassian Bamboo continuous integration build statuses in CruiseControl's CCTray XML format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published