How to package and deploy the output of a bazel build action

In this video I talk about how you can access the artifacts that are built using the bazel build system. Bazel is really good at a taking inputs, doing some action on them and the returning the outputs for other build steps. But how do you take those outputs and copy them to a location of on your own computer. Or copy them into the actual workspace This video sets up a step-by-step guide on how to compile a simple binary, with the python rules. zip them using package rules and then uses a simple script to copy the result to into the workspace Here are the links to the pages that are mentioned in the project

  • Python rules: https://github.com/bazelbuild/rules_python

  • Package rules: https://github.com/bazelbuild/rules_pkg/releases

  • Packaging documentation: https://bazelbuild.github.io/rules_pkg/0.7.0/reference.html#pkg_zip

Previous
Previous

The ultimate step by step bazel beginner guide