You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to trigger a jenkins job with an upload file parameter. using the jenkins.job.build below. I was able to trigger the job but the file is not being upload. please advise what I have done wrong thanks.
The text was updated successfully, but these errors were encountered:
emulexoar
changed the title
jenkins: job.build: formData must be defined when client initalized to use file upload
jenkins: job.build: trigger job with upload parameter
Mar 26, 2020
Hi;
I was trying to trigger a jenkins job with an upload file parameter. using the jenkins.job.build below. I was able to trigger the job but the file is not being upload. please advise what I have done wrong thanks.
const jenkins = require('jenkins')({ baseUrl: 'http://usertoken:token@localhost:8080', crumbIssuer: true, formData: require('form-data') });
jenkins.job.build({ name: 'MyJenkinsJobName', parameters: { "name": 'MyJenkinsJobName', "file": fs.createReadStream('demo2.txt') }}, function (err, formData) {
console.log("called inside build")
if (err) throw err;
The text was updated successfully, but these errors were encountered: