title: GCP Cloud Build based on Trigger of Java Code Pushed in Bit Bucket
body: <p>I am trying to <strong>GCP Cloud Build</strong> based on <strong>Trigger</strong> of <strong>Spring Boot java Application</strong> Code Pushed in <strong>Bit Bucket</strong>. so far I am doing it manually, coping code into GCP VM, build there, <strong>create Docker Image</strong>, push to <strong>GCP Container Registry</strong> and <strong>Deploy on Kubernetes Engine</strong> which is working fine. I need to automate the build on the basis of the trigger every time I push the code.
  I have code on my private <strong>bitbucket</strong>. <strong>GCP Container Registry</strong> has access to my Bitbucket Repository.
  my docker file is </p>
  
  <pre><code>&gt; FROM java:8 WORKDIR / ADD
  &gt; build/libs/SpringBootApplication-0.0.1-SNAPSHOT.jar
  &gt; SpringBootApplication.jar EXPOSE 8080 ENTRYPOINT
  &gt; ["java","-jar","SpringBootApplication.jar"]
  </code></pre>
  
  <p>but at the time of build, its giving error that </p>
  
  <pre><code>SpringBootApplication.jar is not available-- no such file or directory. 
  </code></pre>
  
  <p>I know it because on GCP VM I have not clone and build the code.
  do I have to write clone and build code in <strong>Dockerfile</strong> as well ??
  if yes then what's the point of authenticating <strong>Bitbucket</strong> with <strong>GCP Cloud Build</strong>.</p>