IIUC I did something similar in the past, I think you should leverage a when block, conditioned by that param. Then, either in a local script block, or better using an external library for that logic: set that variable to the right value to skip or not the deployment stage.
If this is not clear, please provide a bit more details, and I'll do the same :). Cheers Le mar. 22 mai 2018 à 16:51, jieryn <[email protected]> a écrit : > Does anyone have a fragment or can lend a hand in me figuring out how > to get a Jenkinsfile based declarative pipeline where we have a > parameters { } section which will get a different defaultValue > depending on the build cause? > > The goal is that I want to do a maven deployment if and only if this > job is being triggered by Jenkins during a nightly build trigger. The > default ought to change from false to true if we're in that @nightly > build trigger (or if the user has clicked build now, and has overriden > the default). > > Any help is appreciated, thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/CAArU9ibH2qt9BkP8PDbmcfVAMhL0Zn2Xxo28_4W%3D8T3D2WgVzw%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4x1mNSv7qGyLMgJHy6YMqzfx4V7NDVnZNNm5brV%2Bg%2B7A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
