gitlab-vars

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

intro

gitlab ci requires some env variables, for diffent projects these env vars may be same. so we have this cmd tool -- gitlab-vars

install

simplely download the binary and placed it in $PATH. the file name, whatever you wish !

config

default config file: $HOME/.gitlab-vars.yaml

gitlab.private_token supports three level:

  • project level
  • group level
  • personal level

Note: access token is sensitive

vars refers: project variables

gitlab:
  private_token: <access token>
  server: <https://gitlab.xxx.com>

vars:
  - key: 'test_key' # required
    value: 'test_value' # required
    variable_type: 'env_var' # optional
    protected: true # optional
    masked: true # optional
    environment_scope: '*' # optional

usage

# create vars for project
# check vars here:
# settings -> ci_cd -> Variables

$ ./gitlab-vars -p <projectId> -a create
# as for help

$ ./gitlab-vars -h

build

Makefile tested with platform darwin amd64

# build for windows
$ make win

# build for linux
$ make linux

# build for mac
$ make mac

# build for current platform
$ make build

devlop

cmd framework cobra

gitlab api refered plouc/go-gitlab-client

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL