jenkins-cli icon indicating copy to clipboard operation
jenkins-cli copied to clipboard

Cannot trigger the job which created by jcli in copy mode

Open menggya opened this issue 5 years ago • 2 comments

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

menggya avatar Jan 14 '20 09:01 menggya

It seems this is the correct behavior, and is not a bug.

https://issues.jenkins-ci.org/browse/JENKINS-2494

anxk avatar Jan 14 '20 13:01 anxk

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 }`

villager-ys avatar Jan 20 '20 08:01 villager-ys