Hey all,
I'm curious if anyone has any suggestions on the best way to have a "global" override for the Bez build system.
I'm still setting up Rez for my studio, and I'm trying to streamline the process for our TDs as much as possible. Most of our projects are pure python, and are built using the same general template. This means that our rezbuild.py for each of these packages look nearly identical. It'd be great to have a way to set up a "global" rezbuild.py that can be overridden locally if needed. Sort of like the way Rez has the preprocess_package functionality that can be specified in the rezconfig to modify the package definition from a central location.
As a practical example, we have a lot of projects that contain configuration yaml files that, under our previous deployment system, have several values toggled when they are released to the production environment.
I've already found the "REZ_BUILD_TYPE" environment variable, which can inform the install that the package is being deployed to the central repository. What I'd love though, to keep the rezbuild.py files for each package simple and manageable, is to be able to have a centralized series of "build commands", for lack of a better term that can perform those actions in addition to whatever is contained within the rezbuild.py. This way, we can set up in a central location that these configuration files, if they exist, should be modified on rez-release, so that TDs managing their rezbuild files don't have to put the same logic in every rezbuild.py file.
One solution I've toyed with is creating a custom build plugin for our studio. Is this the correct approach? Curious to hear what others think or have done.
TL;DR, I'm trying to reduce the amount of redundant code that needs to be present in each package's rezbuild.py to keep things simple, and also to make sure that individual TDs, with less knowledge of Rez and our pipeline, has less of a chance of improperly implementing the build process.