How to move the outputs to bazel cache to use for remote execution

I have a bazel toolchain which will run some external test kit with the help of a shell script. Currently the outputs will be save in the Workspace folder directly via script.

I want to extend this to other users via Remote Cache and Remote execution.

Is there a way to implement this by providing the cache infra for my test kit.

I understand the steps are like to move the outputs to a cache path, but I am failed to achieve that.

Can you please help me on this.

Upvotes: 0

Views: 138

Answers (1)

Brian Silverman
Brian Silverman

Reputation: 3858

If you put the files in $TEST_UNDECLARED_OUTPUTS_DIR (an environment variable Bazel sets when running tests), then the files will be zipped and uploaded to the remote cache.

It looks like there's a --nozip_undeclared_test_outputs flag which is supposed to avoid zipping them, but I see several open bugs about that not working as intended.

Upvotes: 0

Related Questions