Open emulexoar opened 4 years ago
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;
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;