This repo is tied to the associated Docker image on Docker Hub, built from the master branch. The image is only rebuilt once the tests complete successfully, so you can be confident that the image you use on your Concourse has been tested and working successfully.
These items go in the
source fields of the resource type. Bold items are required:
bitbucket_url- base URL of the bitbucket instance, including a trailing slash. (example:
bitbucket_user- Login username of someone with rights to the repository being updated.
bitbucket_password- Password for the mentioned user
debug- When True, dump the JSON documents sent and received for troubleshooting. (default: false)
repository_type- The type of the repository, which can be either git or mercurial. (default: git)
verify_ssl- When False, ignore any HTTPS connection errors if generated. Useful if on an internal network. (default: True)
Update the status of a commit.
repo- Name of the git repo containing the SHA to be updated. This will come from a previous
gitresource. Make sure to use the git directory name, not the name of the resource.
build_status- the state of the status. Must be one of
INPROGRESS- case sensitive.
A typical use case is to update the status of a commit as it traverses your pipeline. The following example marks the commit as pending before unit tests start. Once unit tests finish, the status is updated to either success or failure depending on how the task completes.
resource_types: - name: bitbucket-notify type: docker-image source: repository: karunamon/concourse-resource-bitbucket resources: - name: testing-repo type: git source: uri: https://bitbucket.localnet/scm/~michael.parks/concourse-testing.git branch: master - name: bitbucket-notify type: bitbucket-notify source: bitbucket_url: https://bitbucket.localnet/ bitbucket_username: bbuser bitbucket_password: bbpass verify_ssl: false jobs: - name: integration-tests plan: - get: testing-repo trigger: true - put: bitbucket-notify params: build_status: INPROGRESS repo: testing-repo - task: tests file: testing-repo/task.yml on_success: put: bitbucket-notify params: build_status: SUCCESSFUL repo: testing-repo on_failure: put: bitbucket-notify params: build_status: FAILED repo: testing-repo
In this example, notice that the repo: parameter is set to the same name as the testing-repo resource. To reiterate: In your deployment, set the repo: field to the folder name of the git repo, or in other words, what you'd end up with if you ran a
git clone against the git URI.
This resource is not included with the standard Concourse release. Use one of the following methods to make this resource available to your pipelines.
To install on all Concourse workers, update your deployment manifest properties to include a new
properties: groundcrew: additional_resource_types: - image: "docker:///karunamon/concourse-resource-bitbucket#master" type: "bitbucket-notify"
To use on a single pipeline, update your pipeline to include a new
resource_types: - name: "bitbucket-notify" type: "docker-image" source: repository: "karunamon/concourse-resource-bitbucket" tag: "master"
- Danny Berger (aka dpb587) for his well-written and easy to follow github-status-resource, which was essential to understanding the ins and outs of Concourse resources, as well as providing the layout for this document.
- People of the Concourse Slack Channel, in specific,
vito, for patiently helping a clueless newbie understand a complex system.