Getting closure to work Pipeline

2018-08-26 Thread Hari Krishna Dara
I am trying out an approach in which the caller receives a closure as a return value from a function so that the context can be preserved for further call chaining. I tried the below as a test and it didn't work: def prep() { return [run: {-> echo "Hello Closure"}] } pipeline { agent "a

Jenkins plugin for invoking external async jobs and polling their results

2018-08-26 Thread matti . maki
I might not have done enough research but so far I wasn't able to find too many Jenkins plugins or instructions that would handle this kind of scenario: - At the beginning of a Jenkins job, trigger a webhook on an external service, possibly getting back some kind of (non-Jenkins) job ID - Wait

Re: Usage of Jenkins shared library in Job DSL

2018-08-26 Thread treneva
Yep, My libraries are already configured there, but the DSL script is obviously not working. Perhaps the syntax needs to be different... On Sunday, August 26, 2018 at 6:04:36 PM UTC+3, Jan Monterrubio wrote: > > Manage Jenkins -> configure system -> global libraries > > You can add your shared l

Re: [CONCURRENT BUILDS] Run on master, run on slave and then sit in queue

2018-08-26 Thread Nati Mirauta
Hello, Thank-you very much for your answer, this helped me! Have a great day, Nati sâmbătă, 25 august 2018, 14:01:52 UTC+3, Daniel Butler a scris: > > If you set the number of executors on both master and slave to 1 that will > restrict the number of builds to one per node put a third into the

Re: connect with SSH

2018-08-26 Thread Ivan Fernandez Calvo
I meant echo 'password' | sudo -S command -- 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. To view this discussion

Re: connect with SSH

2018-08-26 Thread Ivan Fernandez Calvo
You can configure sido to do not as for password to some commands, or for every command. Also you can pass the password in command line echo password | sudo command You can inject the password in your job from a credential in Jenkins -- You received this message because you are subscribed to t

Re: connect with SSH

2018-08-26 Thread jojo
Thanks a lot.but the job as u described ask for password in mid night On Sun, Aug 26, 2018, 21:45 Ivan Fernandez Calvo wrote: > IIRC the root user is disabled by default on Mac OS X, you can enable it > if you set a password for it(https://support.apple.com/en-us/HT204012), > but I think that it

connect with SSH

2018-08-26 Thread Ivan Fernandez Calvo
IIRC the root user is disabled by default on Mac OS X, you can enable it if you set a password for it(https://support.apple.com/en-us/HT204012), but I think that it is better to enter as a regular user and use sudo for those operation that you need root access. -- You received this message bec

Re: Pass in a parameter/property specified by Jenkins job, not user

2018-08-26 Thread Adam Hardy
Yes, exactly, I don't think pausing the job to get the info from the user is a good way of doing it. If it isn't possible to pass an extra parameter/property from the Jenkins UI to the script on job launch and initialization, then I should move onto a different approach using some other logica

Re: Usage of Jenkins shared library in Job DSL

2018-08-26 Thread Jan Monterrubio
Manage Jenkins -> configure system -> global libraries You can add your shared library there. On Fri, Aug 17, 2018 at 11:05 wrote: > Hey, > > I am looking for advice how to achieve usage of Jenkins shared library in > Job DSL – > I use this snipped to seed a job whose functionality is in Jenkin

Re: Re[2]: Jenkins white-list for Build flow plugin

2018-08-26 Thread Oleg Nenashev
Added the mailing list to Cc. In order to send messages to this mailing list, you need to join it. Suppress the entire whitelist by using > "-Djenkins.security.ClassFilterImpl.SUPPRESS_WHITELIST=true" > It has to be done in Java startup options, e.g. "java -Djenkins.security.ClassFilterImpl.SUPPR

Re: Pass in a parameter/property specified by Jenkins job, not user

2018-08-26 Thread Qiang Ma
Hmm, JOB_NAME would be auto generated based on the branch name. User input would make the job pause, so that doesn't seem a good option , either. Then what else can be different to make the same job performing different deployment? Branch name? On Sun, Aug 26, 2018 at 7:15 AM Adam Hardy wrote

connect with SSH

2018-08-26 Thread yossibr9876
Hello , I need to connect to mac as a root from Jenkis. It must be as SSL ? I try to connect with ssh and I failed . Any idea ? * with an admin user it ok to connect to mac . Thanks in advance yossibr -- You received this message because you are subscribed to the Google Groups "Jenkins Us

Re: Script result interpreted a a command to execute?

2018-08-26 Thread Idan Adar
Thanks Slide! On Sun, Aug 26, 2018 at 4:25 PM Slide wrote: > It's because your shell command has $() around it. This will try and eval > the subshell value. You don't need the $() at all > > On Sun, Aug 26, 2018, 03:44 Idan Adar wrote: > >> The following block fails... appreciate any insights:

Re: Script result interpreted a a command to execute?

2018-08-26 Thread Slide
It's because your shell command has $() around it. This will try and eval the subshell value. You don't need the $() at all On Sun, Aug 26, 2018, 03:44 Idan Adar wrote: > The following block fails... appreciate any insights: > > workerVersion = sh(script:"\$(ic cs workers ${clusterName} --json |

Re: Pass in a parameter/property specified by Jenkins job, not user

2018-08-26 Thread Adam Hardy
I can't check until I get in on Tuesday but this is a multi-branch pipeline job. Won't env.JOB_NAME either be the approximately the name of the repo so I know which app it builds, or the name of the branch in that repo? If it's the former, I guess I could suffix the name with the environment a

Script result interpreted a a command to execute?

2018-08-26 Thread Idan Adar
The following block fails... appreciate any insights: workerVersion = sh(script:"\$(ic cs workers ${clusterName} --json | jq -r .[0].kubeVersion)", returnStdout: true).trim() // This returns "1.9.9.1522" slackSend (channel: "certmgr-health", color: '#199515', message: "*$JOB_NAME*, <$BUILD_URL|b

Re: JNLP java.nio.channels.ClosedChannelException with kubernetes-plugin

2018-08-26 Thread fabio . douek
Interesting that if I have a loop with some activity as follows, the job completes successfully, so it seems to be a constraint of 60 seconds of inactivity perhaps between the agent and the jnlp? for i in 1 2 3 4 5 do echo "Looping ... number $i" sleep 50 done On Sunday, August 26, 2018 at

Re: JNLP java.nio.channels.ClosedChannelException with kubernetes-plugin

2018-08-26 Thread fabio . douek
Hi Mark, thanks for the response. Yes, the pod meets the requirements: - I haven't provided a jnlp container - cat is the command - tty is enabled - Additional default container: maven:3.5.4-jdk-8 (tried different ones) What I've observed: - A build step with a sleep of 60 seconds always works -