Is it possible to provide build params in trigger or determine the way build was triggered in build script?

I have a build that compiles, tests and publishes build package to Package Repository (nuget/openwrap)
I'd like to have 2 build triggers:VCS and schedule
When buils is triggered by VCS, package should not be published while if build is triggered by schedule it should be.
Is it achievable or the only option I have is 2 build configurations (based on the same template)?

2 comments
Comment actions Permalink

Konstantin,

Geneally, it is not recommended to change behavior of the build configuration depending on the trigger since this hange in behavior is not obious to the users investigating build issues later.

As to your original question, please see the comment.

Also, a related feature request.

0
Comment actions Permalink

In general I agree with you, but I'm not trying to change beahviour but just select whether tu publish the build result or not. I.e. skip the final step.  Each commit should be verifyed but not  each should be published imediately
I'm developing an application with 10 components (3 are reusable libraries and 6 are plugins for the main app) and having 20 builds instead of 10 is not a good idea in my case.

Anyway thanks for your answer. Voted  for request.

0

Please sign in to leave a comment.