GithubHelp home page GithubHelp logo

scottburch / bamboo-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sebarmeli/bamboo-api

0.0 2.0 0.0 96 KB

Node.js module wrapping the Atlassian Bamboo REST API

License: MIT License

PHP 7.66% JavaScript 92.34%

bamboo-api's Introduction

bamboo-api Build Status

Node.js module wrapping the Atlassian Bamboo REST API . This module gets some useful information from your Atalassian Bamboo CI, such as latest successful build number for a plan or JIRA issues associated to a specific build.

It can be used as command-line interface or can be included in your Node app.

Installation

After getting Node.js and npm:

npm install -g bamboo-api

Usage

You can require the module from your Node app.

var Bamboo = require('bamboo-api');

After that, you can instantiate the Bamboo function:

var bamboo = new Bamboo("http://www.host:8085");

and then you can use the avaialble mthods, e.g.:

bamboo.getAllPlans("PRJ_PLAN", function(result){
	// do something here
});

The module can be used from command-line and there are few comamnds available.

Get the status of a plan (you need to pass the plan key - visible in the URL when you access to a Bamboo plan):

bamboo-api status <planKey>

Get the build number of the latest successful build for a plan:

bamboo-api build_no <planKey>

Get the list of all the plans available:

bamboo-api plans

Get the list of JIRA issues (JIRA needs to be integrated with Bamboo) associated to a specific build:

bamboo-api jira_issue <plan> <build_no> [dependent_plan]

If you work with build pipelines, you know that builds are triggered by other builds. So you might need to find out the JIRA issues associated to the commits done on the build triggering the considered "plan".

Note: For the JIRA integration to work, you need to define the JIRA task in the message of your Git commit.

Get the content of an artifact associated to a specific build of a plan:

bamboo-api artifact <planKey> <build_no> <artifact_name>

Configuration

Define the Bamboo URL in BAMBOO_URL environment variable (defaults to http://localhost:8085):

(*nix)

export BAMBOO_URL=http://host:port

(Windows)

set BAMBOO_URL=http://host:port

Development

This module contains only a limited set of information available with the Bamboo API. Feel free to extend it. Test cases are located in the 'test' folder and you run them either through:

npm test

or

mocha

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.