-1

I am working on a perl script which will do the following:

  1. Trigger a script in post build action when job fails.
  2. Read the log file and try to match the errors with a consolidated error/solution file.
  3. If error is matched with pattern file, then concatenate the error message with the solution at the end of log file.

I am facing following challenges:

  1. All jobs are running in Slave but the error log file is stored in Master. How can I run the script in post-build action? The script path will be taken from slave but my script is located in master. Is there any workaround for this?
  2. The path of the error log is - /home/jenkins/data/jobs//builds/BUILD_NUMBER/log We have many jobs that have folders created by jenkins folder plugins…how do we set the common folder for these? /home/jenkins/data/jobs/FOLDERX//builds/BUILD_NUMBER/log

Other questions -

Do you think that publishing the jenkins error log and displaying the solution is the right approach?

1 Answer 1

0

There is no information on how complex the pattern maching is, but if it is a simple line based regex match there is a plugin for that, called Build Failure Analyzer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.