Gitlab-CI

by appleboy

The Gitlab-ci plugin allows you to trigger Gitlab-ci job automatically. The below pipeline configuration demonstrates simple usage:

pipeline:
  gitlab:
    image: appleboy/drone-gitlab-ci
    host: https://gitlab.com
    token: xxxxxxxxxx
    ref: master
    id: gitlab-project-id

Example configuration for success builds:

pipeline:
  gitlab:
    image: appleboy/drone-gitlab-ci
    host: https://gitlab.com
    token: xxxxxxxxxx
    ref: master
    id: gitlab-project-id
+   when:
+     status: [ success ]

Example configuration with debug mode:

pipeline:
  gitlab:
    image: appleboy/drone-gitlab-ci
    host: https://gitlab.com
    token: xxxxxxxxxx
    ref: master
    id: gitlab-project-id
+   debug: true

Example configuration using credentials from secrets:

pipeline:
  gitlab:
    image: appleboy/drone-gitlab-ci
    host: https://gitlab.com
-   token: xxxxxxxxxx
    id: gitlab-project-id
+   secrets: [ gitlab_token ]

Secret Reference

gitlab_token
gitlab-ci user token

Parameter Reference

host
gitlab-ci server base url.
token
gitlab-ci user token
ref
valid refs are only the branches and tags
id
gitlab-ci project id
debug
enable debug mode

Is there a mistake on this page? Please let us know or edit this page.