salesforce / rules_spring

Bazel rule for building Spring Boot apps as a deployable jar
BSD 3-Clause "New" or "Revised" License
224 stars 48 forks source link

Allow BUILD file to override the default launcher script for bazel run #92

Closed plaird closed 3 years ago

plaird commented 3 years ago

We have the launcher script that is invoked when a user issues a run command via bazel:

bazel run //projects/myservice

It is hardcoded in springboot.bzl. We have a couple of open issues related to the contents #16 and #91. While those are small updates, it would be nice for users to be able to replace it and make any changes they would like. For example, to run custom steps prior to launch of the Spring Boot app.

For this issue, allow the user to pass in a file as a rule attribute.

plaird commented 3 years ago

This was implemented with the bazelrun_script attribute. https://github.com/salesforce/rules_spring/tree/master/springboot#customizing-bazel-run