Skip to content

Commit a76688e

Browse files
thefourtheyephillipj
authored andcommitted
scripts: fix reading credentials for jenkins (#209)
The existing code assumes that the credentials are already in base64, but they are actually not. The code has to read the credentials in plain text and base 64 encode them. Ref: #206 (comment)
1 parent f1c4ecb commit a76688e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/trigger-jenkins-build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function buildParametersForRepo (options, repo) {
5252

5353
function triggerBuild (options, cb) {
5454
const { repo } = options
55-
const base64Credentials = Buffer.from(jenkinsApiCredentials, 'base64')
55+
const base64Credentials = Buffer.from(jenkinsApiCredentials).toString('base64')
5656
const authorization = `Basic ${base64Credentials}`
5757

5858
const jobName = getJobNameForRepo(repo)

0 commit comments

Comments
 (0)