I am deploying my software on different OS ( Red hat & suse) and I need to know if my latest version of the software will work. In order to check if the installation works it's enough to check some log files generated by the software.

Now I am trying to integrate some CI/CD tools and I am trying Jenkins now. I have created a pipeline which is triggered by every commit in bitbucket and I need a way to get the log files and the build status from the servers and mail them to the rest of the team.

1 Answer 1


If you're using Jenkins pipeline, you can use the email notification post action, as a way to send the message:

post {
    failure {
        mail to: '[email protected]',
             subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
             body: "Something is wrong with ${env.BUILD_URL}"

(you would have to configure the server and credentials for your case)

The message itself can be constructed from the job data. The easiest way is perhaps to tee the output of the job to a file and use it as an artifact to attach to the message that gets sent.

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.