Authored by Dan Thomson

Print Gitlab Project Variables as Environment Variables

Downloading and running this script locally can be done with either of the following commands:

$ curl -o
$ chmod 755 ./
$ ./

or by piping the script directly into bash:

$ curl | bash -s myproject

You can use this script to pull your CI/CD variables out of a Gitlab project and print them as they would be printed to set the value in your bash shell (this probably only works with bash and zsh). If you eval the output from this script, you can automatically have those values exported into your environment. Eg:

$ eval $( myproject)
Edited 2.89 KB
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment