Ask Your Question

jgg20's profile - activity

2017-06-23 23:59:08 -0500 asked a question Does Gerrit/Zuul/Jenkins flow work when Jenkinsfiles define Jenkins job?

I am using a development flow with a Gerrit/Zuul/Jenkins setup, where the Jenkins jobs are maintained within Jenkins itself. I have started to use Jenkinsfiles for this purpose, rather than the web GUI. However, after entering the Jenkinsfile jobs in the zuul layout.yaml config, and attempting to use, all the jobs that contain Jenkinsfiles are coming up as NOT_REGISTERED, both in gerrit feedback and in zuul logs.

Other new Jenkins jobs, not described by Jenkinsfile (ie created through web interface) register fine, so there is nothing fundamentally wrong in what I'm doing, I think.

So I'm beginning to doubt whether jenkinsfile jobs can get registered with zuul. Can anyone offer a clarification?

One doubt I have is that the Jenkinsfile itself is responsible for setting the 'agents' (ie the Jenkins node executors) that the job itself runs on - ie the Jenkins job itself does not contain this information, and you only know what slaves to use after the jenkinsfile has been checked out and parsed. Does this mean it is not possible for Zuul/Gearman to register the job? This is only a guess on my part.

Thanks