What would be a groovy step to parse Jenkins console output?

What would be a groovy step to parse Jenkins console output?

What would be a Groovy or pipeline step to parse Jenkins console output, identify a string and mark the build as failure if the string is matched? This question seems similar to another on StackOverflow, but seems to be a close, but not exact duplicate of https://stackoverflow.com/questions/37018509/jenkinsfile-build-log

When to mark a step as failed in Jenkins?

The timeout activates if my tests don’t output anything to the console for 5 minutes, and subsequent stages still execute, which is what I want. However, the build is still marked as aborted instead of failed, which I thought the buildResult parameter was for.

How to show failed pipeline stage in Groovy?

In order to show a successful build with a failed stage when a downstream job fails AND support a user being able to cancel a build (including all subsequent stages), I had to use a combination of various solutions, specifically when, try/catch, throw and catchError ().

Can a Jenkins pipeline fail without failing the stage?

As you might have guessed, you can freely choose the buildResult and stageResult, in case you want it to be unstable or anything else. You can even fail the build and continue the execution of the pipeline. Just make sure your Jenkins is up to date, since this is a fairly new feature.

How to check Jenkins build log on Stackoverflow?

This question seems similar to another on StackOverflow, but seems to be a close, but not exact duplicate of https://stackoverflow.com/questions/37018509/jenkinsfile-build-log if you just want to check, that your log contains string myTestString you can just call manager.logContains (‘. myTestString.

How to save Groovy output to pipeline variable?

I have the below code in the jenkisn pipeline: in the amd_distribution_input_transformation.py some code is running, and at the end, it returns object named ‘artifacts_list’ my question is, how can I assign the return obect from groovy file to pipeline variable.