Skip to content

Commit d21bc76

Browse files
committed
[Build] Update Jenkins API link to fetch console logs of current build
Fixes #3667
1 parent 3d131d9 commit d21bc76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

JenkinsJobs/Builds/build.jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ pipeline {
552552
def prefix = 's' + String.format('%03d', stageIndex++) // prefix with index to establish stable order
553553
def logFileName = "${DROP_DIR}/${BUILD_ID}/buildlogs/" + prefix + '_' + jobStage.name.replace(' ', '_').replace('Declarative:_', '') + '.log'
554554
sh """
555-
curl --fail --silent --output '${logFileName}' ${BUILD_URL}/pipeline-overview/log?nodeId=${jobStage.id}
555+
curl --fail --silent --output '${logFileName}' ${BUILD_URL}/stages/log?nodeId=${jobStage.id}
556556
# Test (efficiently) if the file starts with the no-logs message and if yes, ensure it doesn't contain more other lines
557557
if [ "\$(head --lines 1 '${logFileName}' | xargs)" == 'No logs found' ] && [ "\$(wc --lines < '${logFileName}')" -le 1 ]; then
558558
rm -f "${logFileName}"

0 commit comments

Comments
 (0)