Hi,
This is my desired outcome:
an index.groovy page contains a button.
upon a user clicking that button, I would like some script to be called.
would something like this work?
(borrowed example from UISamples)
=========================================
package jenkins.plugins.ui_samples.NotificationBar;
import lib.JenkinsTagLib
def st=namespace("jelly:stapler")
t=namespace(JenkinsTagLib.class)
namespace("/lib/samples").sample(title:_("Notification Bar")) {
button(onclick:"function;")
}
void function()
{
def command = """executable arg1 arg2 arg3"""// Create the String
def proc = command.execute() // Call *execute* on the
string
proc.waitFor() // Wait for the command to
finish
// Obtain status and output
println "return code: ${ proc.exitValue()}"
println "stderr: ${proc.err.text}"
println "stdout: ${proc.in.text}" // *out* from the external program is
*in* for groovy
}
=========================================
very much appreciate any h
kind regards
ben
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.