#1
|
|||
|
|||
vbld_StepDone event and Step.BuildStatus
Our build process is a bit unique in that we log our failed build steps to some various media (via a COM component that I wrote in C# w/ COM interop). Basically, when a step fails, we don't want the Visual Build build process to stop, we simply want to use a script to instanciate this component, call a method on it, and continue with the build.
The caveat to this is that there are certain projects we have that WILL fail the entire build. We keep our "what to build list" in special text files that we read in using Visual Build's facilities. It's easy enough to know what is and isn't critical, and what to build. The problem is that Visual Build sets the Step.BuildStatus value to 0 (or succesful) if the build succeeds OR it's set to ignore failure. This is an issue with us. We need to be able to mark the node as "Ignore Fail", but still be able to detect relevant failure in the event scripts. Is this possible? This is stopping me from really stream lining our build process... |
#2
|
|||
|
|||
You can look at the LASTSTEP_STATUS which will be set to a non-zero code when the steps failed even if Ignore fail is set to True.
See this sample step for an example (See the vbld_StepDone event script code): <step action='Run Script' type='0'> <Language>VBScript</Language> <Script>x = 1 / 0</Script> <ignorefail type='11'>-1</ignorefail> <indent type='3'>1</indent> <name>Fail Step (viewing status in StepDone)</name> <script><![CDATA[ Function vbld_StepDone() Builder.LogMessage Application.ExpandMacros("%LASTSTEP_STATUS%") End Function ]]></script> </step> |
#3
|
|||
|
|||
Awsome! Thank you very much
|
|
|