Can't load environment variables from CI/CD pipeline #31933
-
I am having trouble getting my gatsby-config file to load an environment variable defined in my CI/CD pipeline file (Using Jenkins, for reference). I define the following environment variable in my jenkinsfile:
In gatsby-config I try to call this variable like so:
The idea is for the environment to match whatever the pipeline is running in (dev or master), but this build keeps failing because it doesn't appear to be reading the variable define in the pipeline document. Is there something i'm missing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This looks like a Jenkins issue. To help debug you could add a console.log(process.env) to the file. |
Beta Was this translation helpful? Give feedback.
This looks like a Jenkins issue. To help debug you could add a console.log(process.env) to the file.