Hi,
I got one of the stackoverflow link which is doing exactly what i want. But 
it is not working in my env.Could you please figure out this?
 
http://stackoverflow.com/questions/10865538/how-to-submit-jenkins-job-via-rest-api


On Wednesday, November 12, 2014 5:47:07 PM UTC+5:30, Felix Nawroth wrote:
>
>  Hi,
>
> I don't think this can be easily done. You would need a parameter plugin 
> that runs a validator on its text field, and the validator would have to 
> write Javascript to its error message area.
>
> A build run itself is not meant to be inveractive, you can't pause it to 
> query for some kind of user confirmation or any other interaction. So once 
> the build is running you've got to work with what you've got.
>
> The only approach I can think of: Preset a default value like "CHANGE_ME" 
> for you text field and use flashy HTML markup in the parameter description 
> to tell your users to really change the field content.
>
> As first build step of your job run a shell or batch step that makes sure 
> that your parameter is different from "CHANGE_ME". Here's what I use to 
> protect a deployment job from accidental triggering, with a checkbox 
> parameter for the job:
>
> if ! [[ "${CONFIRM_THE_DEPLOYMENT}" == true ]]
> then
>   echo "Please confirm your deployment order by setting the 
> checkbox!";echo "________________________"; exit 22
> fi
>
> I generally like the idea - some kind of validated parameter plugin than 
> only enables the build button if all parameters are in their expected 
> ranges, not empty etc. But then again this really is something you would 
> expect your users to take care of themselves. Just make sure to catch all 
> input that might cause damage.
>
> Regards,
> Felix
>
>  ------------------------------
> *Von:* jenkins...@googlegroups.com <javascript:> [
> jenkins...@googlegroups.com <javascript:>]" im Auftrag von "niraj nandane 
> [niraj....@gmail.com <javascript:>]
> *Gesendet:* Mittwoch, 12. November 2014 11:44
> *An:* jenkins...@googlegroups.com <javascript:>
> *Betreff:* confirming the build before starting
>
>   Hi,
> I have a parameterized build which accept string as parameter . I want to 
> show user a message "empty string" in the form of alert box or simply 
> showing "Not entered anything.Do you want to continue> with continue button 
> below" if he click on build button without entering string in text box. If 
> he enters the string then i will start my build . How i can achieve this ?
> Any help would be greatly appreciated
>  
> -- 
> 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 jenkinsci-use...@googlegroups.com <javascript:>.
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to