Re: How can I tail the console output for a failed pipeline build?

2017-09-05 Thread Dallas Clement
e\]/d' | sed -e 's/^.*\[0m//g'/$ logSnippet = sh(script: command, returnStdout: true) On Monday, September 4, 2017 at 10:27:52 AM UTC-5, Dallas Clement wrote: > > I've done all that. What I want is to extract the last portion of the > actual console output for a bui

Re: How can I tail the console output for a failed pipeline build?

2017-09-04 Thread Dallas Clement
ally happening on every stage (clone, > build, fail, etc). Also using groovy and try/catch will help too > > On Friday, September 1, 2017 at 2:25:05 AM UTC+10, Dallas Clement wrote: >> >> I am working with multibranch pipeline builds and I want to be able to >> tail the end

Re: How to disable concurrent builds in a multibranch pipeline?

2017-09-01 Thread Dallas Clement
t; > Yes, probably. Seems there are already some discussions about that here : > https://issues.jenkins-ci.org/browse/JENKINS-35359 > > 2017-09-01 20:18 GMT+02:00 Dallas Clement >: > >> Thanks for the tip Michael. This looks like it would work. But not very >> elegant

Re: How to disable concurrent builds in a multibranch pipeline?

2017-09-01 Thread Dallas Clement
I created an improvement issue for this in Jira => https://issues.jenkins-ci.org/browse/JENKINS-46593 On Friday, September 1, 2017 at 1:18:34 PM UTC-5, Dallas Clement wrote: > > Thanks for the tip Michael. This looks like it would work. But not very > elegant. Would be better

Re: How to disable concurrent builds in a multibranch pipeline?

2017-09-01 Thread Dallas Clement
wrote: > > You might be interested by this thread > <https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/jenkinsci-users/Cnoc0RFCvvw/E92WKr53CQAJ> > > :-) > > 2017-08-31 16:58 GMT+02:00 Dallas Clement >: > >> I know how to disabl

How can I tail the console output for a failed pipeline build?

2017-08-31 Thread Dallas Clement
I am working with multibranch pipeline builds and I want to be able to tail the end of the console output to include in build failure email notifications. I can see where the log file is located in the filesystem under /var/lib/jenkins/jobs//branches//builds/5 The build log appears to have t

How to disable concurrent builds in a multibranch pipeline?

2017-08-31 Thread Dallas Clement
I know how to disable concurrent builds for a particular branch. That works fine. But how I can I disable multiple branches from building at the same time? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and

Re: "Scan Multibranch Pipeline Now" triggers immediate build

2017-08-31 Thread Dallas Clement
hen Connolly wrote: > > On 29 August 2017 at 18:38, Dallas Clement > wrote: > >> No I don't have any post commit hook defined. Starting with a green >> field here. Sounds like that's what I need to setup though. >> >> I also don't have the "Sca

Re: "Scan Multibranch Pipeline Now" triggers immediate build

2017-08-29 Thread Dallas Clement
cause of > a build, if it says "Branch Event" then you are solid gold... > > > On Wed 30 Aug 2017 at 00:42, Dallas Clement > wrote: > >> Thanks for the info Stephen. I was not aware that the pollSCM trigger >> was ignored in a multibranch pipeline. So

Re: "Scan Multibranch Pipeline Now" triggers immediate build

2017-08-29 Thread Dallas Clement
branches. I would like to make things event driven. Will need to investigate how with git. On Tuesday, August 29, 2017 at 5:33:42 PM UTC-5, Stephen Connolly wrote: > > > On Tue 29 Aug 2017 at 23:21, Stephen Connolly > wrote: > >> >> On Tue 29 Aug 2017 at 22:35, Dallas Cle

"Scan Multibranch Pipeline Now" triggers immediate build

2017-08-29 Thread Dallas Clement
If I click on the "Scan Multibranch Pipeline Now" link in the Jenkins dashboard, it will kick off a build immediately even when there were no changes. I have my declarative Jenkinsfile configured to poll for SCM changes. I only want builds to be triggered from SCM changes. Any idea how I can

Declarative pipeline post condition 'aborted' not working.

2017-08-29 Thread Dallas Clement
If I manually abort a build, the 'always' and 'failure' post conditions get triggered, but never the 'aborted' post condition. I would wish for 'aborted' to work so that I can distinguish between an aborted build and a truly failed build. I only want to send email notifications for the latter

Re: Getting the real Jenkins job status for a pipeline job.

2017-08-17 Thread Dallas Clement
things is highly related. > > On Fri, Aug 18, 2017 at 12:43 AM Dallas Clement > wrote: > >> Hi James. This sounds like a dream come true to have status for >> individual stages and steps. In my particular situation I need to collect >> test results from a lot of ba

Declarative Pipeline: How to get build cause?

2017-08-17 Thread Dallas Clement
I would like to be able to determine what triggered a build. It looks like build cause information is available in currentBuild.rawBuild, but can't access that from the groovy sandbox. Is there another way from a pipeline? -- You received this message because you are subscribed to the Google

Re: Getting the real Jenkins job status for a pipeline job.

2017-08-17 Thread Dallas Clement
you can describe your problem with a mock >> Jenkinsfile and a drawing of your desired visualization that helps narrow >> things down even further :) >> >> >> >> On Wednesday, August 16, 2017 at 6:47:03 PM UTC+10, Dallas Clement wrote: >>> >>>

Re: Pipeline: Is SCM revision information stored with each build?

2017-08-16 Thread Dallas Clement
ild.rawBuild seems nearly impossible due to sandbox / security restrictions. On Wednesday, August 16, 2017 at 12:46:46 PM UTC-5, Dallas Clement wrote: > > I know that I can get the latest revision for the current build by > executing a shell command such as: > def currentCommit = sh(ret

Pipeline: Is SCM revision information stored with each build?

2017-08-16 Thread Dallas Clement
I know that I can get the latest revision for the current build by executing a shell command such as: def currentCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() But I would like to get the commit hash associated with a previous build. The reason I want to do this is

Re: Is is possible to define methods in a declarative pipeline?

2017-08-16 Thread Dallas Clement
17 at 11:19:40 AM UTC-5, Dallas Clement wrote: > > I would like to be able to define some groovy methods in my declarative > Jenkinsfile and call as needed from a script {} section. For example I > would like to define some methods that extract git commit information from > the jenk

Is is possible to define methods in a declarative pipeline?

2017-08-16 Thread Dallas Clement
I would like to be able to define some groovy methods in my declarative Jenkinsfile and call as needed from a script {} section. For example I would like to define some methods that extract git commit information from the jenkins API and use when notifying concerning build status from one of t

Re: Getting the real Jenkins job status for a pipeline job.

2017-08-16 Thread Dallas Clement
Thanks for these helpful ideas. Seems like this would work fine. One last related question: How dost one trigger the 'unstable' condition in the pipeline post section? On Wednesday, August 16, 2017 at 11:09:12 AM UTC-5, slide wrote: > > You could do this with a map > > Map stageResults = [:]

Re: Getting the real Jenkins job status for a pipeline job.

2017-08-16 Thread Dallas Clement
Victor, you are sure right. This works like a champ! Thank you very much. Do you know if it's possible to get the status for each stage in a pipeline? On Wednesday, August 16, 2017 at 10:13:46 AM UTC-5, Victor Martinez wrote: > > As far as I see "currentBuild.getCurrentResult()" is not null e

Re: Getting the real Jenkins job status for a pipeline job.

2017-08-16 Thread Dallas Clement
Victor, thanks for the help here. I have played with the 'changed' action and also currentBuild.result and currentBuild?.getPreviousBuild(), but it looks like this variable is null unless explicitly set in one of the pipeline stages. What I really want is the status Jenkins uses to determine

Getting the real Jenkins job status for a pipeline job.

2017-08-16 Thread Dallas Clement
I have setup a declarative Jenkinsfile for my project. I have some post conditions defined for success and failure. I would like to be able to determine the job status for the previous build within the 'success' block so that I can know if this success is a recovery from a previous failure.

Re: Subversion plugin issues

2012-08-16 Thread Dallas Clement
Hello Dustin, Thanks a ton! This is the exact dilemma I have run into. Do you mind posting the contents of these two files on your system? /var/lib/jenkins/hudson.scm.SubversionSCM.xml /var/lib/jenkins/jobs//subversion.credentials I'm still a little unclear on what should go in the certificate