Intro
CI/CD Fundamentals
git-vars package
Role Based Access Control
Protected Branches and Tags
Security Templates
Artifact Management
Pushing Environment Variables
Push environment variables from your local .env.project
file to a GitLab repository.
Prerequisites
Ensure you are in the base directory of your repository where the .env.project
file is located.
cd /path/to/your/repository
Push Command
git-vars push -f .env.project
# -f --file: Path of the file to be pushed from
The output of this command would be something like this:
New Variables:
<VARIABLE_NAME> = <VARIABLE_VALUE>
Updated Variables:
<VARIABLE_NAME> --> OLD: <OLD_VALUE>, NEW: <NEW_VALUE>
Deleted Variables:
<VARIABLE_NAME>
Do you want to apply these changes to GitLab? (yes/no):
After confirming that you want to apply those changes, this is the output of git-vars
:
ENV VARIABLE [ACTION] -> VARIABLE_NAME - success
This way, users can manage easily and straightforwardly the GitLab repository variables with local environment variables.