[workflow-plugin] execute post build step regardless of any errors that occured before

52 views
Skip to first unread message

Clifford Sanders

unread,
Mar 26, 2015, 12:49:49 PM3/26/15
to jenkins...@googlegroups.com
Hi,

I'm currently migrating a Maven job to a Workflow job.

There are UI tests so one of the first steps is to start Xvfb before executing the Maven command and stopping it afterwards.

sh "sudo /sbin/service xvfbd start"
sh "mvn clean verify -Dmaven.test.failure.ignore=true"
sh "sudo /sbin/service xvfbd stop"

This works as long there are no errors (e.g. compile, syntax).

Is there a way to force execution of the last step?

Thanks

Clifford 

Baptiste Mathus

unread,
Mar 28, 2015, 8:53:15 AM3/28/15
to jenkins...@googlegroups.com
You can use try/catch/finally constructs.

Cheers

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a400949d-8e53-4ad9-bae3-698ac11c7ea7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Clifford Sanders

unread,
Mar 30, 2015, 6:42:48 AM3/30/15
to jenkins...@googlegroups.com, bma...@batmat.net
Thanks Baptiste,

sounds like the solution. I will try that.

Clifford

Jesse Glick

unread,
Jun 16, 2015, 3:00:26 PM6/16/15
to jenkins...@googlegroups.com
On Thursday, March 26, 2015 at 12:49:49 PM UTC-4, Clifford Sanders wrote:
There are UI tests so one of the first steps is to start Xvfb before executing the Maven command and stopping it afterwards.

BTW if you can use xvnc instead, that plugin is now compatible with Workflow 1.8+ as a build wrapper. (I filed JENKINS-28928 for xvfb integration.) 
Reply all
Reply to author
Forward
0 new messages