I was wondering if Bitbucket pipelines has a mechanism to parse the log file of the previous step?
I have situations where the log file generated from my build step contains warning messages which is not a hard fail but would like the catch the warning messages by searching for known specific warning messages and fail the build step if found.
Is this possible?
As workaround. If you're the one running specific commands, you can always prepare the ground for that.
In your own commands with warnings you can store that information in a log file or similar, in a particular folder. Then in that particular step use `artifacts` to keep those files available to download or any step that is coming after.
Reuse those artifact files to read them and identify if inside them you've any of those 'warning' or the flag that you used.
Would that work for you?
Almost. The commands used is the python coverage command which runs unit tests etc. If I can somehow pipe the stdout to a file while the command is running, I can then use the log file as an artifact as you mentioned.
Is it possible to pipe (split) the output of a command to a file without disrupting the standard flow of stdout/stderror?
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events