Re: Setting global variables with cps-global-libs scripts

2016-02-03 Thread Craig Rodrigues
I only looked at the pipeline cps-global-lib feature after reading your e-mail. It is some pretty advanced stuff. :) I am not a groovy expert, but I will try to explain to the best of my understanding and hopefully it will lead you on the right path. When you have a Jenkinsfile or some arbitrary

Re: Avoiding job failure email notification when an old job is cancelled by a newer job when entering a throttled stage

2016-02-03 Thread Craig Rodrigues
Hi, Take a look at: https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy#L233 I have a big try / catch / finally block in the script. I explicitly set currentBuild.result in that script, and check to see if currentBuild.result is equal to "ABORTED". I don't know if

Setting global variables with cps-global-libs scripts

2016-02-03 Thread Tom Kierzkowski
Hello! I've been having issues with declaring and setting variables within our /var/globals.groovy file. I've followed the cps-global-libs suggestions and I can execute functions just

Re: Avoiding job failure email notification when an old job is cancelled by a newer job when entering a throttled stage

2016-02-03 Thread Meiteimacha999
Almost there but still not perfect yet: node { try { // some stages for the workflow } catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e){ echo "the job was cancelled or aborted" } catch (err){ > stage 'Send Notification' > def msgimg="https://lo

Re: Strange and sudden failure from Jenkins ( Cannot log in using secure mode )

2016-02-03 Thread TurboChargedDad
A correction... It was the "cacerts" file in the lib/security/ folder of the java version being used. Not the keystore. -- 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 a

Re: Strange and sudden failure from Jenkins ( Cannot log in using secure mode )

2016-02-03 Thread TurboChargedDad
To update the status of this (SOLVED) in case anyone else is having this issue. Despite jenkins.bat stating that the java keystore to be used was in a specific directory. This wasn't the case. One of my colleagues checked the keystore in the java directory and found that once the certificate

Re: Development environment for Pipeline (aka workflow)

2016-02-03 Thread Tom Kierzkowski
Thank you both for your suggestions! On Wednesday, February 3, 2016 at 11:22:14 AM UTC-5, Baptiste Mathus wrote: > > Roughly does like Craig, but using intellij instead of bum. > > As I associated the Jenkinsfile with groovy type it's helping a bit for > completion or to find (basic, since I've

Re: Avoiding job failure email notification when an old job is cancelled by a newer job when entering a throttled stage

2016-02-03 Thread Meiteimacha999
okay - so when a job fails, it throws the exception: hudson.AbortException: script returned exit code 1 And when its cancelled by the new job, it throws this: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException I am not a groovy man, so any help to put a condition inside the catch (li

Re: Using Java 1.7 and SSL self-signed certs

2016-02-03 Thread Vijayender Madura
+1 ! This post saved me hours of troubleshooting. I had a similar problem on CentOS 6.5 and NSS 3.15 - I was using the Github Authenticator plugin for Global Security on Jenkins and had this exception - Upgrading NSS to 3.19 solved the problem. On Monday, December 21, 2015 at 11:38:47 PM UTC

Re: Avoiding job failure email notification when an old job is cancelled by a newer job when entering a throttled stage

2016-02-03 Thread Meiteimacha999
how do i check the difference? is there a way to print it in Windows? On Wednesday, February 3, 2016 at 10:58:40 AM UTC-6, Daniel Beck wrote: > > Have you tried looking more closely at the exception 'err' to see whether > they're different based on how the build was failed/aborted? > > On 03.02

Re: Avoiding job failure email notification when an old job is cancelled by a newer job when entering a throttled stage

2016-02-03 Thread Daniel Beck
Have you tried looking more closely at the exception 'err' to see whether they're different based on how the build was failed/aborted? On 03.02.2016, at 17:50, Meiteimacha999 wrote: > i have my workflow set up like so. This sends an email notification when a > job fails. > > > > > node("s

Avoiding job failure email notification when an old job is cancelled by a newer job when entering a throttled stage

2016-02-03 Thread Meiteimacha999
i have my workflow set up like so. This sends an email notification when a job fails. node("slave1") { ws("e:\\jenkins\\workspace\\jobname\\${env.BUILD_NUMBER}") { try{ stage name: 'sync', concurrency: 2 bat '''echo "before sync" set a=%RANDOM% echo %a% echo "after sync"''' slee

Re: Development environment for Pipeline (aka workflow)

2016-02-03 Thread Baptiste Mathus
Roughly does like Craig, but using intellij instead of bum. As I associated the Jenkinsfile with groovy type it's helping a bit for completion or to find (basic, since I've not added any pipeline related plugins in the classpath) errors/typos. -- Baptiste Le 3 févr. 2016 11:03 AM, "Craig Rodrigue

Re: Jenkins deploys, authenticating target

2016-02-03 Thread Maureen Barger
You just made my day. Thank you!! On Wed, Feb 3, 2016 at 7:45 AM, Stephen Connolly < stephen.alan.conno...@gmail.com> wrote: > Also have a look at the authorize project plugin. That will let you have > the build job run as the user who triggered the build and then you can look > to inject their u

Re: Jenkins deploys, authenticating target

2016-02-03 Thread Stephen Connolly
Also have a look at the authorize project plugin. That will let you have the build job run as the user who triggered the build and then you can look to inject their username into the build environment On 3 February 2016 at 12:14, Maureen Barger wrote: > Oh thank you, I hadn't seen that plugin be

Re: Jenkins deploys, authenticating target

2016-02-03 Thread Maureen Barger
Oh thank you, I hadn't seen that plugin before! But I am not sure it will work for what we are planning. We have deploy jobs whose configuration rights are very restricted. The deploy jobs are used by teams who may have multiple environments. A team may be comprised of 20 people and an environment

Re: Jenkins deploys, authenticating target

2016-02-03 Thread Stephen Connolly
So you can do this if your deployment mechanism is integrated with the deployment-framework-plugin API - or if your deployment mechanism is integrated with the credentials plugin. Basically you rely on the credentials to deploy being in the *User*'s credentials store and not in the SYSTEM credenti

Re: netcat/telnet client output not displayed when running from a remote jenkins job

2016-02-03 Thread cridam
Using nc with --recv-only (server is pushing data when client connects in my case) serves me as workaround. So it is a relative terminal related issue, probably fixable comparing env between host and ssh forked by jenkins -- You received this message because you are subscribed to the Google Gr

Re: How do I get the Ansible plugin to work with Jenkins?

2016-02-03 Thread jcsirot
Hi Kiran, The jenkins is not able to remotely execute the ansible command. The installation field in the global configuration must contain the path of the directory where the ansible binaries are installed. Note that in the last release of the plugin this configuration is not required anymore w

Re: Development environment for Pipeline (aka workflow)

2016-02-03 Thread Craig Rodrigues
Hi, It may not be the best or most elegant, but this is what I do: (1) I use vim to edit the script. (2) For testing, I create a pipeline job, paste the script into the* Pipeline script *entry field, and run the job. (3) When I am done, I check the script into git, and reconfigure the job to

Re: Jenkins deploys, authenticating target

2016-02-03 Thread Maureen Barger
No the environment where Jenkins will be issuing the deploy. On Wed, Feb 3, 2016 at 4:26 AM, Michael Neale wrote: > By target env do you mean the slave/agent where the build runs? > > On Wednesday, February 3, 2016 at 1:25:29 AM UTC+11, MoBarger wrote: >> >> HI all, here is an odd question. Of c

Re: Groovy script to do jenkins configuration

2016-02-03 Thread Anurag Sernapally
Thanks a lot @Victor, Its fixed. On Wednesday, February 3, 2016 at 2:47:23 PM UTC+5:30, Victor Martinez wrote: > > No idea what you mean about that library since it does exist otherwise you > will get another Exception regarding ClassNotFound and in your case it's an > error related to the Cons

Re: Jenkins deploys, authenticating target

2016-02-03 Thread Michael Neale
By target env do you mean the slave/agent where the build runs? On Wednesday, February 3, 2016 at 1:25:29 AM UTC+11, MoBarger wrote: > > HI all, here is an odd question. Of course we can affect permissions of > Jenkins jobs so that only defined people can run them. But has anyone ever > locked

Re: Groovy script to do jenkins configuration

2016-02-03 Thread Victor Martinez
No idea what you mean about that library since it does exist otherwise you will get another Exception regarding ClassNotFound and in your case it's an error related to the Constructor itself. If you debug a bit more you will see the constructor doesn't have the right parameters in your groovy s