0

We are testing automatic Build Triggers at GCP - Container Registry to build Docker images and to auto deploy on Kubernetes cluster.

All works well and thinking of implementing this on production, however we are reluctant to include our Docker and build config files together with the application sources in the same GIT repo.

Ideally we would like to start automated build after there is a push to our application's GIT repository. What is the best practice for such approach?

bogumbiker
  • 437
  • 2
  • 5
  • 19
  • Our general thinking about this is that "build configuration is source" and therefore belongs alongside the built source code. Can you provide some further details about your use case -- with a pointer to your repo if it's public -- so we can better understand the issue(s) you are trying to address? – David Bendory Mar 27 '18 at 10:42
  • Thanks this makes sense "build configuration is source" however we do not want to to keep our app source (php) and build source (cloudbuild.yaml including other Dockerfiles) in the same git repo. Perhaps using webhook from our app git to Cloud Function which will trigger build will do the job? – bogumbiker Mar 27 '18 at 11:28
  • Sure, you could do that. Also note that we have a git builder that you can use to fetch source -- from a public repo with no work or from a private repo by injecting a credential: https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/git – David Bendory Mar 28 '18 at 12:39

0 Answers0