Skip to content

gitlabci-generic Plugin

This plugin creates Golang GitLab CI workflow.

It downloads a template of your choice, render it with provided parameters, and creates a GitLab CI file to your repo.

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:

YAML
tools:
  # name of the tool
  - name: gitlabci-generic
    # id of the tool instance
    instanceID: default
    # format: name.instanceID; If specified, dtm will make sure the dependency is applied first before handling this tool.
    dependsOn: [ ]
    # options for the plugin
    options:
      projectRepo:
        owner: YOUR_GITLAB_USERNAME
        repo: YOUR_GITLAB_REPO_NAME
        branch: YOUR_GITLAB_REPO_BRANCH
        baseURL: YOUR_GITLAB_HOST_ADDRESS
      ci:
        remoteURL : https://someplace.com/to/download/your/template
        vars:
          key1: value1
          key2: value2

Or, run dtm show config --plugin=gitlabci-generic to get the default config.

All parameters are mandatory.