Open rickyxucn opened 4 years ago
hahahha
Cuz this build is still "Preparing", I have met this before and I write a for loop to check if I can continue
for checkBuildStatus(n+1, job) {
time.Sleep(1 * time.Second)
log.Printf("wait for done: %d\n", n+1)
}
func checkBuildStatus(n int64, job *gojenkins.Job) bool {
buildResult, _ := job.GetBuild(n)
return buildResult == nil
}
Cuz this build is still "Preparing", I have met this before and I write a for loop to check if I can continue
for checkBuildStatus(n+1, job) { time.Sleep(1 * time.Second) log.Printf("wait for done: %d\n", n+1) } func checkBuildStatus(n int64, job *gojenkins.Job) bool { buildResult, _ := job.GetBuild(n) return buildResult == nil }
In my case, the build has success and I can get it's status by RESTful API.
I also encountered the same problem, did you solve it @rickyxucn
I also encountered the same problem, did you solve it @rickyxucn
Not yet. I implement this method through RESTful API and I have not encountered this problem again.
experiencing the same.
I found a case,
GetBuild
return nothing without any error, but the job has finnished success.Code:
Output:
But, when I run
curl
as follows:Output: