jenkins-cli
jenkins-cli copied to clipboard
Cannot trigger the job which created by jcli in copy mode
there is no build button after use jcli job copy,need open the job configure once,then the build button can see on the page
It seems this is the correct behavior, and is not a bug.
https://issues.jenkins-ci.org/browse/JENKINS-2494
It avoids this problem when I create jobs using XML.Code: `type JobXml struct { Name string XML []byte }
func CreateJob(jobXml JobXml) (err error) { core, e := GetJenkinsJobClient() if e != nil { return e } code, _, err := core.Request("POST", "/createItem?name="+jobXml.Name, map[string]string{"Content-Type": "application/xml"}, bytes.NewBuffer([]byte(jobXml.XML))) if err != nil { return e } if code != 200 { return fmt.Errorf("create jenkins job err") } return nil }`