Deploy on failure

39 views
Skip to first unread message

Christopher Hahn

unread,
Jul 18, 2016, 10:45:18 AM7/18/16
to Jenkins Users
Hello,

I need a pointer into the docs for the page that describes "Post-Build Actions".

I want to confirm that the "Deploy on failure" checkbox will cause warfiles to be deploying for unstable builds.

Googling "Jenkins manual" and then searching for both "Post-Build Actions" + "Deploy on failure" == zero hits

Thank you,

Christopher

Eric Pyle

unread,
Jul 18, 2016, 12:42:40 PM7/18/16
to jenkins...@googlegroups.com

First, there is no comprehensive documentation of post-build actions. Many such actions are provided by plugins, which are released independently of Jenkins, and it is up to the plugin author to document them. It sounds like you are using the Deploy plugin (it's helpful to specify which Jenkins version you are using, and the relevant plugin versions when asking a question). Based on the configuration GUI, as shown here, I'd guess that "Deploy on failure" means "Deploy the war file even if the build failed", which would imply that it is always deployed on success or unstable status.

Given that many plugins or features of Jenkins have limited or no documentation, I've found the best way to be sure you know what a job will do is to create a very simple test job and experiment. So you could create a job that takes an existing war file (perhaps by copying from another job's artifacts using the Copy Artifact Plugin) and finishes with Unstable status. The easiest way I know to generate Unstable status is with the TextFinder plugin, which can set the build status based on key words in the job's console output. So have your job echo some text like "set me unstable", add a Post-build action "Jenkins Text Finder". Check the box to "Also search the console output" and enter the text "set me unstable" in the Regular expression text box. Check the "Unstable if found" box. Now add your post-build step to deploy the war file. Run the job, verify that it set its status to Unstable, and confirm that the war file is deployed.

Eric

--
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/c2c10f62-1c57-442b-bc00-7893efd870c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christopher Hahn

unread,
Jul 18, 2016, 3:31:02 PM7/18/16
to jenkins...@googlegroups.com
Thank you for the time!

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/fjn5d2rsD7g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b0243139-69a1-b5f1-7746-de318d3ac75e%40cd-adapco.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------------------------------
Christopher Hahn
Senior DevOps Engineer
 
Cognitive Medical Systems, Inc.
9645 Scranton Road, Suite 160
San Diego, CA 92121
 
Office:    858-509-4949x101

 
 
 
EMAIL CONFIDENTIALITY NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, be advised you have received this message in error. Any unauthorized review, use, disclosure, distribution, dissemination, forwarding, printing or copying is strictly prohibited. If you are not the intended recipient, please contact the sender by reply email and immediately destroy all copies of the original message and any attachments. To contact our email administrator directly, send to postm...@cognitivemedicine.com
-----------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages