Skip to content

How to pass variables from shell env? #1347

Closed Answered by firecow
avoidik asked this question in Q&A
Discussion options

You must be logged in to vote

You have to pass it like so gitlab-ci-local --variable MY_SENSITIVE_VARIABLE=${MY_SENSITIVE_VARIABLE}

You could add a feature request under issue, that suggests a syntax in gitlab-ci-local variable.yml's that makes them able to auto-fetch values from the terminal env.

---
global:
  MY_SENSITIVE_VARIABLE: "{{ fromTerminalEnv('MY_SENSITIVE_VARIABLE') }} "

Or something like that 😄

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by avoidik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants