Skip to main content

gitlabenv2csv allows you to download GitLab ENV variables to a csv file. Manually edit and upload back to the project / group.

Project description

gitlabenv2csv

Docker Pulls Docker Cloud Build Status Docker Cloud Automated build Docker Image Size (latest by date) GitHub

About

gitlabenv2csv allows you to download GitLab ENV variables to a csv file. Manually edit and upload back to the project / group.

Install

pip

Install dependecies:

pip3 install gitlabenb2csv

And execute script:

gitlabenv2csv.py -d -i <project/gitlab id> -g -c config.ini

Docker

Or you can use prebuild docker container and execute script like this:

docker run -v ${PWD}/backups:/app/backups -v ${PWD}:/app/file -it zales/gitlabenv2csv:latest -l https://gitlab.example.com -t <api_token> -i <project/gitlab id> -p -u -f /app/file/gitlab_env.csv

Usage

./gitlabenv2csv.py -h
usage: gitlabenv2csv.py [-h] [-c MY_CONFIG] -l GITLAB_URL -t GITLAB_TOKEN (-g | -p) -i ELEMENT_ID [-f FILE_PATH] (-d | -u)

Args that start with '--' (eg. -l) can also be set in a config file (config.ini or specified via -c). Config file syntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax at
https://goo.gl/R74nmi). If an arg is specified in more than one place, then commandline values override config file values which override defaults.

optional arguments:
  -h, --help            show this help message and exit
  -c MY_CONFIG, --my-config MY_CONFIG
                        config file path
  -l GITLAB_URL, --gitlab_url GITLAB_URL
                        Gitlab url
  -t GITLAB_TOKEN, --gitlab_token GITLAB_TOKEN
                        Gitlab token
  -g, --group           Edit group ENV
  -p, --project         Edit project ENV
  -i ELEMENT_ID, --element_id ELEMENT_ID
                        Gitab project/group id
  -f FILE_PATH, --file_path FILE_PATH
  -d, --download        Download gitlab ENV to csv
  -u, --upload          Upload csv to gitlab ENV

Example

gitlabenv2csv.py -d -i 243 -g -c config.ini

Buy Me A Coffee

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

gitlabenv2csv-1.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

gitlabenv2csv-1.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file gitlabenv2csv-1.0.2.tar.gz.

File metadata

  • Download URL: gitlabenv2csv-1.0.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for gitlabenv2csv-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e16993912eaeec1a1795595c991697dfedb48b67522550c86d1bac66ca71245c
MD5 016badf919037a4d440de26931302222
BLAKE2b-256 4f5b471c69fa9936d2f27de23849b2b31ff80758cc3f6aff005f9e435ff033cc

See more details on using hashes here.

File details

Details for the file gitlabenv2csv-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: gitlabenv2csv-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.0

File hashes

Hashes for gitlabenv2csv-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2687e399f95556117b47ffb45e8f04959894d355fb852735c46443b15b396f2a
MD5 4cee525a236a8b3a933b24be3934e805
BLAKE2b-256 6edb7e811adcf41f103cd138a000508c9fe6c97ebf11e828a7fd4cccf086dc2d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page