https://github.com/tbe/gitlab-status-resource
Concocurse Gitlab commit status resource
https://github.com/tbe/gitlab-status-resource
Last synced: 12 months ago
JSON representation
Concocurse Gitlab commit status resource
- Host: GitHub
- URL: https://github.com/tbe/gitlab-status-resource
- Owner: tbe
- Created: 2019-08-25T21:03:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-25T21:04:00.000Z (almost 7 years ago)
- Last Synced: 2025-03-12T22:41:43.492Z (over 1 year ago)
- Language: Go
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gitlab Status Resource
Updates the status of an gitlab commit
## Source configuration
- `gitlab_url`: *Required.* The URL of the Gitlab Instance
- `api_key`: *Required.* The API Key for Gitlab. The Key must belong to a user with at least *Developer* privileges
- `group`: *Required.* The Gitlab group of the repository
- `project`: *Required.* The Project name of the repository
- `verify_ssl`: *Optional.* Verify the SSL Certificate of the Gitlab API Endpoint. Defaults to `true`
## Parameters
- `build_status`: *Required.* The desired build status. Must be one of `pending`, `running`, `success`, `canceled`, `failed`
- `repo`: *Required.* The asset name/ input path of the checked out git repository
- `status_name`: *Optional.* The name of the status. Defaults to `default`
## Example
```yaml
resource_types:
- name: gitlab-status
type: docker-image
source:
repository: tbede/gitlab-resource
tag: 0.1.0
resources:
- name: source
type: git
source:
branch: master
uri: https://gitlab.something.lan/mygroup/myrepo
username: buildbot
password: ((gitlabtoken))
- name: gitlab-status
type: gitlab-status
source:
api_key: ((gitlabtoken))
gitlab_url: https://gitlab.something.lan
verify_ssl: false
group: mygroup
project: myrepo
jobs:
- name: build
plan:
- get: source
trigger: true
- put: gitlab-status
params:
build_status: running
repo: source
- put: ....
# your build task is here
on_success:
put: gitlab-status
params:
build_status: success
repo: source
on_failure:
put: gitlab-status
params:
build_status: failed
repo: source
on_abort:
put: gitlab-status
params:
build_status: canceled
repo: source
```