Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.18 KB

File metadata and controls

30 lines (21 loc) · 1.18 KB

gitlabci-golang Plugin

This plugin creates Golang GitLab CI workflow.

Usage

This plugin depends on an environment variable "GITLAB_TOKEN", which is your GitLab personal access token.

TL;DR: if you are using gitlab.com (instead of a self-hosted GitLab), click here to create a token for DevStream (the scope contains API only.)

If you are using self-hosted GitLab, refer to the official doc here for more info.

Note: when creating the token, make sure you select "API" in the "scopes" section, as DevStream uses GitLab API to add CI workflow files.

Plugin config example:

tools:
- name: go-hello-world
  # name of the plugin
  plugin: gitlabci-golang
  # options for the plugin
  options:
    # owner/repo; "path with namespace" is only GitLab API's way of saying the same thing; please change the values below.
    pathWithNamespace: YOUR_GITLAB_USERNAME/YOUR_GITLAB_REPO_NAME
    # main branch of the repo (to which branch the plugin will submit the workflows)
    branch: main

All parameters are mandatory.