History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-1006
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Robin Shen
Reporter: Jan Koprowski
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

build.isFailed() does not return TRUE when build fail.

Created: 05/Aug/11 10:16 AM   Updated: 06/Aug/11 07:22 AM
Component/s: None
Affects Version/s: 3.1.54
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Linux


 Description  « Hide
Reproduction:
1. Create new configuration
2. Add step which fail
3. Add step "Execute Script" with Script:
${groovy:
logger.info("FAILED: " + build.isFailed().toString())
logger.info("HAS ERRORS: " + build.hasErrors().toString())}
4. Run build
5. Look to logs and You will see:
12:13:55,926 [master>LOG STATUS@machine:8810] INFO - FAILED: false
12:13:55,926 [master>LOG STATUS@machine:8810] INFO - HAS ERRORS: false

build.isFailed() is false although first step failed.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [06/Aug/11 12:12 AM]
A step fail does not necessarily mean that the build will fail. Only if master step fails the build is considered to be failed, and it is controlled by the step success condition of the master step.

Jan Koprowski [06/Aug/11 06:45 AM]
So, is there any method to check, using "Execute Script" is build failed?

Robin Shen [06/Aug/11 07:22 AM]
You may check if certain step is failed by calling:
steps.get("<step name>").failed