Re: pipeline post-action in Jenkinsfile ?

2016-05-07 Thread Mike Caspar
Cool. Created a PR for a Jenkinsfile example that has a few steps and a try/catch block. https://github.com/jenkinsci/pipeline-examples/pull/30 It would be great if someone did a quick check before putting it into master. I had to move the mail into the try and catch blocks as putting the

Re: pipeline post-action in Jenkinsfile ?

2016-05-07 Thread Baptiste Mathus
Le 5 mai 2016 9:47 PM, "Mike Caspar" a écrit : > > Awesome. > > This worked great. > > I managed to simply wrap a try around my whole file and then a catch/finally for success and failure. > > Craig, I'll look at the example. Thanks > > I did figure out that I needed to use the error tag with some

Re: Jenkins Job Builder vs. "Jenkins 2.0 Pipeline as Code"

2016-05-07 Thread Baptiste Mathus
Hi, Not absolutely sure, but from what I seem to understand, JJB doesn't actually compare with Pipeline, but with Job DSL. Pipeline /just/ defines a way to express what a build should do. In an independent fashion of how it was done before (I.e. nothing coming from Freestyle jobs). Using a "script

Re: v2 pipeline Deploy step only for branch master.?

2016-05-07 Thread David Karlsen
You can use the variable ENV.BRANCH_NAME to determine this 6. mai 2016 10:15 p.m. skrev "Mike Caspar" : > > In a multi-branch scenario, are there some examples anywhere of how to > make sure the deploy happens only from the master branch? > > I am guessing I need to build an if statement of some s