From bf232993d246a5620220b78f1f9755aa46c91278 Mon Sep 17 00:00:00 2001 From: Vignesh Shetty Date: Mon, 18 Nov 2024 21:05:06 +0530 Subject: [PATCH] Console output - Jenkins --- Jenkinsfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 24c38df..02fe862 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,10 +41,11 @@ pipeline { post { always { sh 'rm -f *.log' + sh 'rm -f *.txt' script { def logContent = currentBuild.rawBuild.getLog(1000).join("\n") - writeFile file: 'console.log', text: logContent - archiveArtifacts artifacts: 'console.log', allowEmptyArchive: true + writeFile file: 'console_output.txt', text: logContent + archiveArtifacts artifacts: 'console_output.txt', allowEmptyArchive: true } sh "docker logout" sh "docker system prune -af" @@ -159,8 +160,8 @@ pipeline { mimeType: 'text/html', from: 'Jenkins ', to: 'jenkins+vignesh@vshetty.dev, vijeshsshetty@gmail.com', - attachmentsPattern: '*.log' + attachmentsPattern: 'console_output.txt' ) } } -} \ No newline at end of file +}