-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on updating existing job #362
Comments
After some more digging through the code, it looks like the source of my issue was the fact that the jobs directory in jenkins::jobs::present is hardcoded to point at /var/lib/jenkins/jobs. I was installing my jenkins instance to a different directory so the onlyif statement in the update-job call always failed. Moving my instance to /var/lib/jenkins resolved this, but forced me to install jenkins in a specific location. The ability to override the job_dir param would be useful. |
@traviseret I have posted a PR that implements an alternative type for configuring jobs. #382 I wouldn't suggest trying it "in production" but it may be worth testing. |
* add `manager_user`, `user`, `manage_group`, `group` params to `jenkins` class. * improve consistency of `file` resouce group ownership throughout the module * add 'localstatedir' param to `jenkins` class and consistently use it to set the 'data' base dir throughout the module * Deprecate/noop `username`, `group`, `create_user` params to `jenkins::plugin` define; replaced by `user`,`group`,etc. params to `jenkins` class * Deprecate/noop `plugin_dir` param to `jenkins::plugin`; replaced by `localstatedir` param to `jenkins` class closes voxpupuli#356 -- alternative approach resolves voxpupuli#362 resolves voxpupuli#365
* add `manager_user`, `user`, `manage_group`, `group` params to `jenkins` class. * improve consistency of `file` resouce group ownership throughout the module * add 'localstatedir' param to `jenkins` class and consistently use it to set the 'data' base dir throughout the module * Deprecate/noop `username`, `group`, `create_user` params to `jenkins::plugin` define; replaced by `user`,`group`,etc. params to `jenkins` class * Deprecate/noop `plugin_dir` param to `jenkins::plugin`; replaced by `localstatedir` param to `jenkins` class closes voxpupuli#356 -- alternative approach resolves voxpupuli#362 resolves voxpupuli#365 resolves voxpupuli#219
* add `manager_user`, `user`, `manage_group`, `group` params to `jenkins` class. * improve consistency of `file` resouce group ownership throughout the module * add 'localstatedir' param to `jenkins` class and consistently use it to set the 'data' base dir throughout the module * Deprecate/noop `username`, `group`, `create_user` params to `jenkins::plugin` define; replaced by `user`,`group`,etc. params to `jenkins` class * Deprecate/noop `plugin_dir` param to `jenkins::plugin`; replaced by `localstatedir` param to `jenkins` class closes voxpupuli#356 -- alternative approach resolves voxpupuli#362 resolves voxpupuli#365 resolves voxpupuli#219 resolves voxpupuli#249
* add `manager_user`, `user`, `manage_group`, `group` params to `jenkins` class. * improve consistency of `file` resouce group ownership throughout the module * add 'localstatedir' param to `jenkins` class and consistently use it to set the 'data' base dir throughout the module * Deprecate/noop `username`, `group`, `create_user` params to `jenkins::plugin` define; replaced by `user`,`group`,etc. params to `jenkins` class * Deprecate/noop `plugin_dir` param to `jenkins::plugin`; replaced by `localstatedir` param to `jenkins` class closes voxpupuli#356 -- alternative approach resolves voxpupuli#362 resolves voxpupuli#365 resolves voxpupuli#219 resolves voxpupuli#249 resolves voxpupuli#250
I have version 1.6.1 of this module. I added the following to my yaml:
The opt/jenkins_data is empty
and I see that /var/lib/jenkins is still used
I wonder what I am missing. |
When I am trying to update an existing jenkins job with this module, I get an error during the agent run.
Code:
Error:
When I run the above command it complains that the job already exists and exits with the 255 return code. If I delete the job and rerun this issue goes away but comes back for the next agent checkin. Looking at the jenkins::job file there seems to be an update-job but it is never called for me as the run fails after create is called.
Am I missing a step to avoid calling create-job on every job? A majority of the time all of my jobs will already exist so this seems pretty broken.
The text was updated successfully, but these errors were encountered: