Skip to content

Commit 7ced2a7

Browse files
committed
jenkins: also log body when starting build fails
1 parent e782b55 commit 7ced2a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/trigger-jenkins-build.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ function triggerBuild (options, cb) {
6363
headers: { authorization },
6464
qs: { token: buildAuthToken },
6565
json: { parameters: buildParametersForRepo(options, repo) }
66-
}, (err, response) => {
66+
}, (err, response, body) => {
6767
if (err) {
6868
return cb(err)
6969
} else if (response.statusCode !== 200) {
70-
return cb(new Error(`Expected 200 from Jenkins, got ${response.statusCode}`))
70+
return cb(new Error(`Expected 200 from Jenkins, got ${response.statusCode}: ${body}`))
7171
}
7272

7373
cb(null, { jobName, jobId: response.body.id })

0 commit comments

Comments
 (0)