Setup Continuous deployment with Cloud build through build pack

Viewed 44

I am trying to set up a node js app on Cloud run which should contain only production-level build code in our container registry image. I want to achieve this through build pack on Cloud run.

I have a few doubts on the same as below:

  • What is buildpack directory in cloud build configurations?
  • Is this should be build directory? If yes then how can we build our code through CI-CD?

Referring to this guide for setup - https://cloud.google.com/run/docs/continuous-deployment-with-cloud-build#setup-cd

Thanks

1 Answers

With Buildpack, there isn't "directory" for the setup. You can provide a context directory (a subpath to ignore the rest of the sources) and an entrypoint if required. That's all.

The principe of Buildpack is to detect automatically the sources, build them and package them into a container, there is no, or few, configuration to perform.

If you want a more custom packaging, use a Dockerfile.


If you want to use Build Pack in your CI/CD, you can find tutorials and binaries (to install or container) on the official site

Related