In my cloudbuild.yaml
file, I'm relying on a value that will be passed through the builds submit --substitutions=_SERVER_ENV=TEST
command.
This is how I'm referencing it:
cloudbuild.yaml
steps:
- name: "gcr.io/cloud-builders/docker"
args: [
"build",
"--build-arg SERVER_ENV=$_SERVER_ENV", // <----- IT WILL BE PASSED TO DOCKER --build-arg
"."
]
My question is: do I need to add it to my cloudbuild.yaml
file in the substitutions
section?
Example:
cloudbuild.yaml
substitutions: // DO I NEED TO ADD THIS SECTION?
- "_SERVER_ENV=TEST" // GIVEN THE FACT THAT I'LL BE PROVIDING IT THROUGH THE CLI
Or can I leave it out and be sure that the builder will look for it the CLI command like:
builds submit --substitutions=_SERVER_ENV=TEST
REFERENCES