For example, I can write groovy script from IDE like Eclipse and here is the code:
instance = Jenkins.getInstance()
instance.setNumExecutors(2)
println instance.getNumExecutors()
My question is, how can I connect directly from IDE to an running jenkins by providing an jenkins url? Either local or remote jenkins should be enough for me. Just something like:
instance = Jenkins.getInstance("http://localhost:8080", "admin", "admin")
instance.setNumExecutors(2)
println instance.getNumExecutors()
Does any person has this kind of experience ?