I want to setup a CI/CD pipeline in GitLab.
In my testscript I need a password and a username that I don’t want to have in the repo.
Is it possible to use the GitLab environment variables to pass this to the script?
My idea is that I would access the GitLab environment variables and pass them to the Julia environment variables.
- echo $USERNAME
- julia --project=@. -e 'import Pkg;
ENV["USERNAME"] = "$USERNAME";
ENV["PASSWORD"] = "$PASSWORD";
Pkg.test(; coverage = true);'
The echo
works but I’m not able to use the variable in the Julia code.
I get the Julia error:
ERROR: UndefVarError: USERNAME not define
Thanks!