Tracks BitBucket Pull Requests made to a particular repo.
You need to add the resource type to your pipeline:
resource_types:
- name: bitbucket-pullrequest
type: docker-image
source:
repository: halternz/bitbucket-pullrequest-resource-
username: Required. BitBucket username. -
password: Required. BitBucket password. -
project: Required. BitBucket project. -
repository: Required. BitBucket repository. -
git: Required. configuration is based on the Git resource. The branch configuration from the original resource is ignored.
Resource configuration for pull requests against this repository:
resources:
- name: pull-request
type: bitbucket-pullrequest
source:
username: ((bitbucket-username))
password: ((bitbucket-password))
project: halternz
repository: bitbucket-pullrequest-resource
git:
uri: git@bitbucket.org:halternz/bitbucket-pullrequest-resource.git
private_key: ((bitbucket-ssh-private-key))
webhook_token: ((webhook-token))
check_every: 24hExample pull request build flow:
jobs:
- name: pull-request
serial: true
plan:
- aggregate:
- get: tasks
- get: pull-request
version: every
trigger: true
- put: pull-request
params:
state: INPROGRESS
name: concourse ci
path: pull-request
- do:
- task: unit-test
file: tasks/unit-test.yml
input_mapping: {src: pull-request}
on_failure:
put: pull-request
params:
state: FAILED
name: concourse ci
path: pull-request
on_success:
put: pull-request
params:
state: SUCCESSFUL
name: concourse ci
path: pull-requestOpen pull requests against the chosen repository are fetched from BitBucket. If new commits get added to the pull request a new version will be emitted.
Clones the repository to the destination, and locks it down to a given ref. It will return the same given ref as version.
Update the build status of pull request with desired state.
-
state: Required. The state to set on the pull request, must be one of:INPROGRESS,SUCCESSorFAILED -
path: Required. Path to the pull request input. -
name: Required. The name of the build result. -
description: Optional. Description of the build result.