Skip to content

Commit

Permalink
Console output - Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshshettyin authored Nov 18, 2024
1 parent ca0544b commit bf23299
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -159,8 +160,8 @@ pipeline {
mimeType: 'text/html',
from: 'Jenkins <[email protected]>',
to: '[email protected], [email protected]',
attachmentsPattern: '*.log'
attachmentsPattern: 'console_output.txt'
)
}
}
}
}

0 comments on commit bf23299

Please sign in to comment.