From ac3386f58b7346cf56c1ef40763b96cb16c68f21 Mon Sep 17 00:00:00 2001 From: hanzalawebdev Date: Thu, 27 Mar 2025 10:31:52 +0500 Subject: [PATCH] Add functionality of build reports in CI/CD in Jenkinsfile. --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 57a77a63..d8a1fcc4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,7 @@ pipeline { stage('Build Project') { steps { - sh 'npm run build' + sh 'npm run build 2>&1 | tee build_report.log' // Captures build output } } } @@ -44,6 +44,7 @@ pipeline { always { junit '**/reports/junit.xml' archiveArtifacts artifacts: 'reports/**', fingerprint: true + archiveArtifacts artifacts: 'build_report.log', fingerprint: true cleanWs(cleanWhenNotBuilt: false, notFailBuild: true) } success {