JetBrains / teamcity-bazel-plugin

TeamCity plugin for Bazel build system
Apache License 2.0
14 stars 6 forks source link

Dynamic "Targets" field makes it impossible to use property for Command field. #6

Closed konste closed 4 years ago

konste commented 4 years ago

Capture

When Command is set to build or test Targets field is visible and can be set, otherwise it is not visible and Bazel does not get targets on the command line. Unfortunately this little "fanciness" prevents possible use of TeamCity property in the Command field, because it kills the Targets field!

Could you please simplify it so that Targets field is visible and active always?

NikolayPianikov commented 4 years ago

@konste Could you describe the concrete example? Is it possible to use Command arguments: as temporary workaround?

konste commented 4 years ago

We have base template which includes several Bazel steps and many build configurations derived from that template. Some of them are ready for testing and we want to run "bazel test" command for them. Some others have tests implemented, but those tests are far from passing and for those configurations we only want to run "bazel build", otherwise they would be permanently red. We were going to set the build command through TC property, but figured the plugin does not let us.

NikolayPianikov commented 4 years ago

For you case I should append some logic to check the Command: and if it contains a parameter reference I should not hide the Targets: field. Is it ok for you?

konste commented 4 years ago

The short answer is - yes, it would be ok. Slightly longer answer - why not embrace simplicity and display Targets: field unconditionally? It would make life so much easier for many, starting with you.

NikolayPianikov commented 4 years ago

I think the user may get confused when we will show field which has no effect or may cause build to fall. But if it is uncomfortable I follow your suggestion