A Buildkite plugin for setting the status on a GitLab commit (It's currently an MVP).
This plugin requires that the agent has a gitlab access token (personal, group, project or OAuth2) configured with api
scope.
The following pipeline just set the status to success
steps:
- command: "echo 'OK'"
key: "success"
plugins:
- gitlab-status#v1.2.0: ~
Technically, there are no required options for this plugin to work. It is to note that defaults will cause failures in the following situations:
check-name
: if the step does not have akey
token-var-name
: if the access token is not available in the variableGITLAB_ACCESS_TOKEN
gitlab-host
: if you are not usinggitlab.com
Name of the variable that contains the value of the gitlab access token to authenticate with its API. Default: GITLAB_ACCESS_TOKEN
The name of the check status being reported.
If the step does not have a key
, you have to provide a non-empty value or it will cause the step to fail.
Whether to show the arguments for the curl
command to execute (exluding the access token). Default: false
The host to communicate with gitlab. Should be the same as the one in BUILDKITE_REPO
. Default: gitlab.com
You can run existing development tools with the following commands:
- tests:
docker run --rm -ti -v "$PWD":/plugin buildkite/plugin-tester:v4.0.0
- linter:
docker run --rm -ti -v "$PWD":/plugin buildkite/plugin-linter --id gitlab-status
- shellcheck:
docker run -v "$PWD":/mnt --rm -ti koalaman/shellcheck:stable hooks/* lib/*