Issue Type: Bug Bug
Affects Versions: current
Assignee: domi
Components: conditional-buildstep, run-condition
Created: 12/Mar/13 2:19 PM
Description:

When the build status is set as FAILURE by a triggered Build in a pre-build step, the current build status is not recognised in a post-build conditional step, and the step in performed regardless of the condition.

Steps to reproduce:

  • create a freestyle project 'i_will_fail'
  • add step "run shell" with "exit 1" as content
  • create maven project
  • add pre-build step Trigger 'i_will_fail'
  • block job until 'i_will_fail' returns...leave default marks build as.
  • for the main build some test pom.xml and goals validate (this is irrelevant)
  • post-steps - run regardless of result
  • add a conditional post-build step with current build status success.
  • this step will run even if the build has been marked as failed in the pre-build step.

Here is the output from a test I made.

Started by user lostinberlin
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/jobs/_lostinberlin_Sandbox_Maven/workspace
Run condition [Current build status] enabling prebuild for step [Execute shell]
Run condition [Current build status] enabling prebuild for step [Execute shell]
[workspace] $ /bin/sh -xe /tmp/hudson3522507109509654665.sh
+ echo '_lostinberlin_Sandbox_Maven : Starting...'
_lostinberlin_Sandbox_Maven : Starting...
Waiting for the completion of _lostinberlin_Sandbox
_lostinberlin_Sandbox #18 completed. Result was FAILURE
Build step 'Trigger/call builds on other projects' marked build as failure
Run condition [Current build status] enabling perform for step [Execute shell]
[workspace] $ /bin/sh -xe /tmp/hudson3662062057434345391.sh
+ echo '_lostinberlin_Sandbox_Maven : In post-build steps. I should not be run...'
_lostinberlin_Sandbox_Maven : In post-build steps. I should not be run...
Notifying upstream projects of job completion
Finished: FAILURE

    
Environment: RHEL 6.2
Project: Jenkins
Priority: Major Major
Reporter: Steve Boardwell
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to