No project description provided
Project description
GitLab Manager
Overview
gitlab-manager is a Python script that provides a command-line interface for managing GitLab variables. It includes two subcommands: create_variable and create_variable_from_file. These subcommands allow users to create variables directly or from an environment file, simplifying the process of managing project variables on GitLab.
Prerequisites
Before using gitlab-manager, ensure that you have the necessary dependencies installed. You can install them using the following:
sudo pip install gitlab-manager==0.11
Usage
Subcommands
- create_variable This subcommand creates a GitLab variable with the specified parameters.
python gitlab_manager.py create_variable --api_url --project_id --private_token --key --value --type --masked --protected --environment_scope
- --api_url: GitLab API URL.
- --project_id: Project ID where the variable will be created.
- --private_token: Private Token for authentication.
- --key: Key for the variable.
- --value: Value for the variable.
- --type: Variable Type (default: 'env_var').
- --masked: Flag to indicate if the variable should be masked.
- --protected: Flag to indicate if the variable should be protected.
- --environment_scope: Environment Scope for the variable (default: '*').
Example
python gitlab_manager.py create_variable_from_file --api_url https://gitlab.example.com/api/v4 --project_id 123 --private_token ABC123 --key PathToFile --masked --protected
- create_variable_from_file This subcommand creates GitLab variables from an environment file.
python gitlab_manager.py create_variable_from_file --api_url --project_id --private_token --file --type --masked --protected --environment_scope
- --api_url: GitLab API URL.
- --project_id: Project ID where the variables will be created.
- --private_token: Private Token for authentication.
- --file: Path to the environment file containing variables.
- --type: Variable Type (default: 'env_var').
- --masked: Flag to indicate if the variables should be masked.
- --protected: Flag to indicate if the variables should be protected.
- --environment_scope: Environment Scope for the variables (default: '*').
Example
python gitlab_manager.py create_variable_from_file --api_url https://gitlab.example.com/api/v4 --project_id 123 --private_token ABC123 --key PathToFile --masked --protected
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gitlab-manager-0.13.tar.gz
.
File metadata
- Download URL: gitlab-manager-0.13.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcca7484bb61232490730e4f016c1d844d4012b7f21ae97244f1a3939bce762d |
|
MD5 | 775a8c76fe5dbc5a9f6113b7ab223bc5 |
|
BLAKE2b-256 | d8d690a2f60fed05d02af5e3c8f5961cf3617d8dec3b45b91da209969e941dd0 |
File details
Details for the file gitlab_manager-0.13-py3-none-any.whl
.
File metadata
- Download URL: gitlab_manager-0.13-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cdb1dd920c5bbc615c119ed8e73db66aa32de7a2f7dc61b07d3404e2ae92cbb |
|
MD5 | f200c08f9172a79111005c9b85cba807 |
|
BLAKE2b-256 | ad96292be9298de241d53a7a226e022c2ea5e5d4defc6a5c01b98465510c858f |