Hi,
we export our log to text and provide links to the file on the network to the end users.
For failed builds, is there some definitive search, or regex, to use to find the point of failure?
Thanks,
Dave
Hi,
we export our log to text and provide links to the file on the network to the end users.
For failed builds, is there some definitive search, or regex, to use to find the point of failure?
Thanks,
Dave
Hi Dave,
This does depend on what your build script is trying to achieve and how your handling errors in your script.
For example the following can be logged, and shows a status of Error.
---------------|--------------------------|---------------------------------------------------------------------------------|------------|----------|----------|
Error | Check If Host Exists | Check If Host Exists [Frank] | 09:29:57 | 09:29:57 | 00:00:00 |
---------------|--------------------------|---------------------------------------------------------------------------------|------------|----------|----------|
Command Line: nslookup -timeout=2 Frank
Fail if host not found: true
*** some.machine.local can’t find Frank: Non-existent domain
Server: some.machine.local
Address: XX.XX.XX.XX
Action Failed with Return Code : -1
However if this is handled within the script the build can continue. Typically though looking at the last actions status might be of some use.
Another thought might be to log a variable value and look for this to determine overall success or failure.
If these options aren’t what your looking for if you could provide some more information I might be able to provide a more precise solution to suit your needs.
Hi Jason,
I have started a new position and thought I could grep through the logs to find some common build issues. If the word "failing" only occurred when a build actually failed (and not also when the error was ignored) then I could find logs of failed builds.
It becomes significantly more complex to automate something like this if the Action text does not imply failure AND if I have to programmatically determine if I am on the last Action.
Thanks,
Dave
I will see what I can implement to make this simpler.
Hi Dave,
I have a solution which should work for you.
The exports all use style sheets to convert the xml to the format you have selected, your case text. The sytle sheets are all located in the finalbuilder installation path under a folder called StyleSheets. The text to xml style sheet is called ConvertLogToText.xsl.
I would suggest copying this to a location for project, then editing it. These edited files can be supplied as a param to the export log action. In the edits you can now write out a set of text which you can look for for a “Failed” and “Successful” build.
An example of what the summary section of the test file I wrote looks like is
[code] <xsl:if test="$IncludeSummary=‘1’"> <xsl:text>************************************************************************</xsl:text> <xsl:text></xsl:text> <xsl:text>FinalBuilder 7 LogFile :</xsl:text> <xsl:text></xsl:text> <xsl:text>Result : Failure </xsl:text> <xsl:text></xsl:text> <xsl:text>Project File : </xsl:text><xsl:value-of select="@filename"/> <xsl:text></xsl:text> …[/code]
You would make another for success. Then you can now place logic into you build script as to which log to write. A failure log with the failure style sheet, or a success log with its style sheet.
To catch all failures you could use the OnFailure action list.
Let me know how this goes for you.