Skip to content

A CLI tool export or apply your gitlab variables.

Notifications You must be signed in to change notification settings

borgmon/gitlabvar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitlabvar

A CLI tool export or apply your gitlab variables.

Build

go build .

Install

With Go

go get github.com/borgmon/gitlabvar
gitlabvar

if you cannot find the command, add your ~/go/bin to your PATH

export PATH="$PATH:$HOME/go/bin"

Download binary

./gitlabvar

Usage

NAME:
   gitlabvar - Export and import your CI variable from gitlab

USAGE:
   gitlabvar [global options] command [command options] [arguments...]

DESCRIPTION:
   Example:   gitlabvar --token ABC -project 123 get
              gitlabvar -p 123 e -s qa
COMMANDS:
   apply, a  apply variable yaml to gitlab project
   get, g    get variable yaml from gitlab project
   env, e    export .env file, use --scope or -s to specify EnvironmentScope
   init, i   get a sample yaml file

GLOBAL OPTIONS:
   --import value, -i value   import yaml file path (default: ".gitlab-ci-var.yaml")
   --export value, -o value   export yaml file path (default: ".gitlab-ci-var.yaml")
   --token value, -t value    gitlab token. scope required: api. get it from here: https://gitlab.com/-/profile/personal_access_tokens. Token can also be loaded from env $GITLAB_TOKEN
   --project value, -p value  Project ID, get it from frontpage of the project
   --help, -h                 show help (default: false)

About

A CLI tool export or apply your gitlab variables.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages