Skip to content

SemRels/condition-gitlab-ci

condition-gitlab-ci

Allows releases only when semrel is running inside GitLab CI.

This plugin is distributed as the standalone Go binary semrel-plugin-condition-gitlab-ci. Semrel executes the binary as a subprocess, provides plugin configuration through SEMREL_PLUGIN_* environment variables, provides release context through SEMREL_* environment variables, reads standard output, and treats exit code 0 as success and any non-zero exit code as failure. Install the binary in ~/.semrel/plugins/ or anywhere on your $PATH.

Installation

go install github.com/SemRels/condition-gitlab-ci/cmd/plugin@latest

Configuration

plugins:
  - name: condition-gitlab-ci
    path: ~/.semrel/plugins/semrel-plugin-condition-gitlab-ci
    env:
      {}

SEMREL_PLUGIN_* variables

Name Required Description Default
None - This plugin does not require any SEMREL_PLUGIN_* variables. It relies on CI-provided environment state. -

SEMREL_* release context used

This plugin does not consume any SEMREL_* release context variables directly.

Example behavior

The plugin checks the CI environment and succeeds when GITLAB_CI=true. Outside GitLab CI it exits non-zero to stop the release.

License

Apache-2.0

Packages

 
 
 

Contributors

Generated from SemRels/plugin-template