A tool to parse CI/CD variables from Gitlab API
Project description
GitVars
Use the Gitlab API to extract CI/CD variables and output them in a format useable for running projects locally.
Installation
pip install mf-gitvars --upgrade
Setup
Create an API key on Gitlab here and grant it read_api, read_repository
permissions
Create a local configuration file and replace your token
cat ~/.python-gitlab.cfg
[global]
default = momentfeed
ssl_verify = true
timeout = 5
api_version = 4
[momentfeed]
url = https://gitlab.com
private_token = [YOUR API TOKEN]
Usage
Find the gitlab project id on the project page here:
And then run with
$ mf-gitvars [project-id]
You will get an output for each environment and one for the global environment.
There is a special string for IntelliJ
and you can paste that directly into your run configuration like so:
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
mf-gitvars-1.1.5.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for mf_gitvars-1.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c53bb361b15745246762138e012d8b32d84f4b37de27f3bf9755b010bff0b60f |
|
MD5 | a3c7e132fda82462c39117b76e09cb03 |
|
BLAKE2b-256 | 683e96b693517812d99b6e5564c1a086c3e9b5a6ad8e715d7ebace940d33dccb |