Hi,
I have some parameters and i would like to check if they are empty, and if so, dont start the build. Any clue? Thank you
-- 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 [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1c326abd-4cf2-44f3-9480-f1b9f85bcd70n%40googlegroups.com. |
You can try executing a basic script that exits 1 if the parameter is not defined (something like -z $parameter) as the first step in the build. On July 31, 2020 at 12:33:54 AM, chencho m-a ([hidden email]) wrote: -- 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 [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJRbZWMCqzeO1OUuNfaY6kMY_MBNBm914T_%2BO8B0c3YuCes5Rg%40mail.gmail.com. |
In reply to this post by chencho m-a
Hi,
How about this: env.FIELD1 = params.FIELD1 switch(FIELD1) { case "ABCD": env.p4 = '/usr/bin/p4' env.awk = 'awk' break case "":: currentBuild.result = 'SUCCESS' return break } On Fri, Jul 31, 2020 at 12:34 AM chencho m-a <[hidden email]> wrote: > > Hi, > > I have some parameters and i would like to check if they are empty, and if so, dont start the build. > > Any clue? > > Thank you > > -- > 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 [hidden email]. > To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1c326abd-4cf2-44f3-9480-f1b9f85bcd70n%40googlegroups.com. -- 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 [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAN3%2Bw0Ac-%2Ba%2BgRfSaJ3krZ67P%2Bcw8urgPNhZ%2B4XoTNwb6agcfw%40mail.gmail.com. |
@Haibinh is that a bash answer?
-- @chencho -- are you looking for a solution in bash, or groovy? Declarative or scripted? On Friday, July 31, 2020 at 9:16:52 AM UTC-4, Haibinh Nguyen wrote: Hi, 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 [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/552471d5-c855-44ed-a952-ef515fee2702o%40googlegroups.com. |
In reply to this post by Sinh Lam
What i want is that when you press the build button, a pop up or error at some point appears and stops the execution. I think that you need to overload the button in any way, but i dont know how to do it. El viernes, 31 de julio de 2020 a las 15:47:53 UTC+2, [hidden email] escribió:
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 [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2dd05e56-7f5b-4ccc-8270-a94a29ad31a1n%40googlegroups.com. |
What you're describing exactly is not possible by default. It /might/ be possible with custom development, but I would certainly not recommend it for such use case. Le ven. 31 juil. 2020 à 17:03, chencho m-a <[hidden email]> a écrit :
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 [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5HSOvD2X_s6CWia0xSW5aU0sFNTGOkSvxS463Qf3z_FA%40mail.gmail.com. |
Free forum by Nabble | Edit this page |