Skip to content
/ glenv Public
forked from kiwicom/glenv

With direnv it will automatically export env. variables directly from GitLab

License

Notifications You must be signed in to change notification settings

sn3d/glenv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glenv

version

Jump into your favourite repository folder and GitLab env. variables are automatically loaded into your shell. This tool in combination with direnv will export you project's env. variables from GitLab.

How it works

First, I have to say the glenv requires direnv installed.

Let's imagine we have clonned the hello/project repository into some folder.

$ clone git [email protected]:glenv-demo/hello/demo.git

Let's jump into cloned demo folder.

$ cd ~/demo
direnv: loading ~/demo/.envrc
direnv: export +CI_PROJECT_ID +DEMO_ENV ...

The direnv automatically inject all env. variables from GitLab into my shell.

When I jump-out from this folder:

$ cd ..
direnv: unloading

The direnv automatically unload all GitLab env. variables.

How to install

The glenv is currently available as binary archive. You can download archive here in GitHub releases. Installation is simple anyway. Download the desired archive for your system, unpack it and place it in some folder, which is in your PATH.

No need to configure it. Only GITLAB_TOKEN variable need to be present in your environment.

How to enable it in repository

If you don't have .envrc in your repository directory, call the command:

$ glenv init

The command create .envrc file for you. Now you can allow the directory

$ direnv allow .

enjoy :-)

About

With direnv it will automatically export env. variables directly from GitLab

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%