bndr/gojenkins

Can not get Build after Invoke

Open

#161 aperta il 29 nov 2018

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Go (454 fork)github user discovery
help wanted

Metriche repository

Star
 (903 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

I'm working with this code.

               var params = map[string]string{
			"PLATFORM_CONFIG_URL": purl,
			"DEVICE_CONFIG_URL":   durl,
		}

		jid, err := job.InvokeSimple(params)
		if err != nil {
			log.Errorf("Some error triggered while invoking job  %s for engine %s Error %s", id, engine.Name, err)
			return
		}

		log.Infof("Invoked job with number %d", jid)
	
		b, err := job.GetBuild(jid)
		if err != nil {
			log.Errorf("Some error triggered while getting the build for job  %s  (ID %d)  Error %s", id, jid, err)
			return
		}

Allways returing this log:

time="2018-11-29 16:40:40" level=error msg="Some error triggered while getting the build for job  device_add_snmpcollector  (ID 160)  Error 404"

But the job has been correctly triggered

image

There is any workarround I can do to get the build related info ( status/url/etc) ?

Guida contributor