gojenkins icon indicating copy to clipboard operation
gojenkins copied to clipboard

copy job is 500 error

Open 205043957 opened this issue 7 years ago • 1 comments

client := gojenkins.CreateJenkins(nil, "http://192.168.xx.xx:8080", "admin", "admin") client .Init()

The client of jekins is normal, it is can getJob and is normal, but when i invaoke CopyJob is 500 err

client .CopyJob(jobName, newJobName) is 500 err, why?

205043957 avatar Oct 27 '17 09:10 205043957

@205043957 Could you provide the detail error log?

You can also first get the job, and then copy it. Like the example in test case:

func TestCopyDeleteJob(t *testing.T) {
	job, _ := jenkins.GetJob("Job1_test")
	jobCopy, _ := job.Copy("Job1_test_copy")
	assert.Equal(t, jobCopy.GetName(), "Job1_test_copy")
	jobDelete, _ := job.Delete()
	assert.Equal(t, true, jobDelete)
}

supereagle avatar Oct 30 '17 14:10 supereagle