Now that bitbucket has added native support for build statues, you may want to consider using codeship-bitbucket-buildstatus written by App Haus. This solution is similar to mine, but it utilizes the bitbucket build status API for a better integration.
Small app that will automatically update newly created pull requests in Bitbucket with the branch's Codeship build status.
First just deploy a free instance of the app on heroku using the button then just follow the steps below.
- Create an API Key in Bitbucket for your team and use your team name as the
usernameand the API Key as yourpasswordin the next step. - Set
BITBUCKET_USERNAMEandBITBUCKET_PASSWORDENV variables to match with theusernameandpasswordabove. - Add a
Pull Request POSThook in Bitbucket forCreate / Edit / Merge / Declinethat points to your instance of this app. The URL should look something like this:https://<BITBUCKET_USERNAME>:<BITBUCKET_PASSWORD>@<YOUR_APP_NAME_ON_HEROKU>.herokuapp.com/pull-request/<CODESHIP_PROJECT_UUID>/<CODESHIP_PROJECT_ID>- Which would look something like this:
https://username:password@bitbucket-codeship-status-example.herokuapp.com/pull-request/ee1399cc-b740-43da-812f-d17901f9efa7/52132
- Now whenever a pull request is created, it should (almost instantly) get updated to have the Codeship Status Badge in the description.
Server runs on port 8000 by default, but will use the port set
on the environment variable PORT if set.
- Run
npm installfor the initial setup. - Set
BITBUCKET_USERNAMEandBITBUCKET_PASSWORDENV variables. - Run
npm startto start the server.
To execute all the tests, just run:
npm test
To run all tests and watch for changes to re-run tests:
npm run watch


