#gcp (2023-12)

Google Cloud Platform



Dhamodharan avatar

Hello #gcp All, I am trying to execute a cloudbuild pipeline on part of a project, I have couple of variables configured in the code and I have passed those variable values through the CloudBuild environment variable settings, But I would be having more variables for every releases, so instead of configuring the variables in pipeline settings, I am thinking we can pass those variables in an external file and read that variable in the cloudbuild.yaml config, I have tried but its not working, Can someone help me with this? Or is there any other best approach to read the variables from an external file.

kallan.gerard avatar

To be honest I’d try to see how you can avoid this pattern. Why do you need to add new variables on every release?

kallan.gerard avatar

Do you even need to make cloud build variables. Can you not just have your script use some sort of .env or config file directly from the source code. That way you can run it locally as well for testing.