concourse merge request resource
1M+
A concourse resource to check for new merge requests on GitLab and update the merge request status.
resource_types:
- name: merge-request
type: docker-image
source:
repository: samcontesse/gitlab-merge-request-resource
resources:
- name: merge-request
type: merge-request
source:
uri: https://gitlab.com/myname/myproject.git
private_token: XXX
uri: (required) The location of the repository (required)private_token: (required) Your GitLab user's private token (required, can be found in your profile settings)insecure: When set to true, SSL verification is turned offskip_work_in_progress: When set to true, merge requests mark as work in progress (WIP) will be skipped. Default falseskip_not_mergeable: When set to true, merge requests not marked as mergeable will be skipped. Default falseonly_trigger_comment: When set, the build only be triggered as the merge request comment is the same with it. This will ignore skip_work_in_progress.also_trigger_comment: When set, the resource will look up for that to trigger builds. This will ignore skip_work_in_progress.concourse_url: When set, this url will be used to override ATC_EXTERNAL_URL during commit status updates. No set default.labels(string[]): Filter merge requests by label[]check: Check for new merge requestsChecks if there are new merge requests or merge requests with new commits.
in: Clone merge request source branchgit clones the source branch of the respective merge request.
out: Update a merge request's merge statusUpdates the merge request's merge_status which displays nicely in the GitLab UI and allows to only merge changes if they pass the test.
repository: The path of the repository of the merge request's source branch (required)status: The new status of the merge request (required, can be either pending, running, success, failed, or canceled)labels(string[]): The labels you want add to your merge requestcomment: Add a comment for MR. Could be an object with text/file fields. If just the file or text is specified it is used to populate the field, if both file and text are specified then the file is substituted in to replace $FILE_CONTENT in the text.jobs:
- name: sample-merge-request
plan:
- get: merge-request
trigger: true
- put: merge-request
params:
repository: merge-request
status: running
- task: unit-test
file: merge-request/ci/tasks/unit-test.yml
on_failure:
put: merge-request
params:
repository: merge-request
status: failed
on_success:
put: merge-request
params:
repository: merge-request
status: success
labels: ['unit-test', 'stage']
comment:
file: out/commt.txt
text: |
Add new comment.
$FILE_CONTENT
Content type
Image
Digest
Size
23 MB
Last updated
over 7 years ago
docker pull leadingsoft/gitlab-merge-request-resource