Failure Steps
I currently use the failure step to send a failure message via email
to the responsible user if a build fails. Is there a way under visual build pro (4.6b) to continue the build process after it notifies the user ? It would be nice if there were a failure in step 10, that it would notify someone, but continue through the other 60 steps. That way I could leave it to run unattended overnight, and always have the latest graetest code (that would compile) waiting on us in the morning. Ignoring the fail condition, does not fire the Failure Step, and no notification is produced. |
Create a group after the step that might fail and check the
%LASTSTEP_STATUS% system macro. Depending on what the step is the return code will be different. Also you will have to check the ignore failure box on the step that might fail. Then under this new group you can add your e-mail step and still continue on. Let me know if this works for you. Tom Kielty Senior Software Engineer Research And Development tom.kielty@spanlink.com (763) 971-2134 Fax: (763) 971-2334 Spanlink Communications 7125 Northland Terrace, Suite 100 Brooklyn Park, Minnesota 55428 (763) 971-2000 |
There are a couple ways to stop the build from within a build:
1) a Run Program step with a bogus command-line; 2) a Run Script step with the code: Err.Raise 1, Step.Name, "Step failure message" ' VBScript, or throw 1; // JScript The drawback to this approach in your case is that the step that actually failed would be marked successful and the user would need to manually uncheck/recheck and start the build from that step after fixing the problem. Since you want to conditionally cause a build to stop on failure based on the whether the build is GUI/console, another option would be to modify the 'Ignore failure' flag of the ISStep before it gets built. Set the step to not ignore failure (so that it will stop if it fails when built in the GUI), and add a Run Script step right before it with this code (VBScript): If Application.Context = vbldContextCommandLine Then Project.Steps(Step.Type)(Builder.BuildIndex+1).Ign oreFailure = True End If |
All times are GMT -5. The time now is 06:05 PM. |
Copyright © 1999-2023 Kinook Software, Inc.