I am using the javascript jenkins-api
to kick off a build via an express API as follows
jenkins.build_with_params('jobname', {param1: "xxxxxx", param2: "xxxxx"}, function(err, data) {
if (err){
console.log(err);
res.json({success: false, msg: err});
}
else {
console.log(data);
res.json({success: true, msg: data});
}
In this job I pull my code from github and then do
docker.build('myimage',' --build-arg param1=$param1 .',' --build-arg param2=$param2 .')
In my Dockerfile I have
ARG param1
ARG oaram2
I'm getting
hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.docker.workflow.Docker.build() is applicable for argument types: (java.lang.String, java.lang.String java.lang.String) values: [myimage, --build-arg param1=$param1 ., ...]