add Raw option/flag into glab variable set
Problem to solve
add Raw option/flag into glab variable set, because variable with "$" sign make some issues when we launch the pipeline
Proposal
╰─$ glab variable set --help
Create a new project or group variable
USAGE
glab variable set <key> <value> [flags]
ALIASES
new, create
FLAGS
+ -r, --raw bool Whether the variable is raw
-g, --group string Set variable for a group
-m, --masked Whether the variable is masked
-p, --protected Whether the variable is protected
-s, --scope string The environment_scope of the variable. All (*), or specific environments (default "*")
-t, --type string The type of a variable: {env_var|file} (default "env_var")
-v, --value string The value of a variable
INHERITED FLAGS
--help Show help for command
-R, --repo OWNER/REPO Select another repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format or full URL or git URL
EXAMPLES
glab variable set WITH_ARG "some value"
glab variable set FROM_FLAG -v "some value"
glab variable set FROM_ENV_WITH_ARG "${ENV_VAR}"
glab variable set FROM_ENV_WITH_FLAG -v"${ENV_VAR}"
glab variable set FROM_FILE < secret.txt
cat file.txt | glab variable set SERVER_TOKEN
cat token.txt | glab variable set GROUP_TOKEN -g mygroup --scope=prod
LEARN MORE
Use 'glab <command> <subcommand> --help' for more information about a command.
Further details
glab --version 1.32.0
Links / references
Raw
is a parameter of the API and is available in go-gitlab
.
Edited by Kai Armstrong