1

I have cloudbuild.yaml file which is deploying java application. Right now i am passing commit id as my docker image tag. But i want to pass pom version in my docker build. There is a way to read pom file in jenkins with readMavenPom().getArtifactId() function. Is there something similar in cloudbuild too?My build and push steps looks similar to the below cloudbuild.yaml

                   - id: "docker build"  
                     name: 'gcr.io/cloud-builders/docker'
                     args: ['build', '-t', 'gcr.io/PID/test:$SHORT_SHA', '.']
                     name: 'gcr.io/cloud-builders/docker'
                     args: ['push', 'gcr.io/PID/TEST:$SHORT_SHA']
Abhinav
  • 71
  • 1
  • 9

0 Answers0