Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codeship-bitbucket

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codeship-bitbucket

Easy Codeship & Bitbucket integration

  • 0.0.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Easy Codeship and Bitbucket integration

Installation

Install the module as a dependency npm install codeship-bitbucket

Usage

codeship-bitbucket needs your username and password/API key in order to update build status on your behalf. These can be provided when importing the module.

var csbb = require('codeship-bitbucket')({
  username: 'username',
  password: 'password'
})

Here are the available initialization options:

  • username (required)

    Your BitBucket username

  • password (required if no API key is provided)

    Your Bitbucket password

  • apikey (required)

    Your BitBucket API Key (recommended for teams)

  • identifier (Optional):

    A unique identifier to distinguish between parallel builds. Useful when using Codeship's ParallelCI

Your project name is picked from your package.json file.

Either one of password or apikey is required. If both are provided, the apikey is used by default. If you have an API key, it is recommended to use it instead of a password.

Your password / API Key is safe. It is encrypted when stored and decrypted only when making requests using a randomly generated passkey.

Once the module is initialized, you can simply update Bitbucket build status using in-built methods.

  • csbb.start(callback)

  • csbb.success(callback)

  • csbb.failed(callback)

Examples:

csbb.start(function (err) {
  if(err) {
    console.log(err)
  } else {
    console.log('Started build')
  }
})
csbb.success(function (err) {
  if(err) {
    console.log(err)
  } else {
    console.log('Build successful')
  }
})
csbb.failed(function (err) {
  if(err) {
    console.log(err)
  } else {
    console.log('Build failed')
  }
})

Use these methods and their callbacks to drive your test and update Bitbucket status correspondingly. Needless to say, the module will only work on Codeship's CI (and not locally) as it uses environment variables specific to Codeship. Use callbacks wisely in such cases.

Future Plans

  • Fallback to environment variables for username & password
  • A CLI interface to accomplish the same functionality

Pull Requests are welcome

FAQs

Package last updated on 28 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc