-
Notifications
You must be signed in to change notification settings - Fork 319
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
Unable to pre-configure the plugin using groovy init script or JCasC #804
Comments
This works, so looks like something with the enkins:
clouds:
- docker:
dockerApi:
connectTimeout: 60
dockerHost:
uri: "unix:///var/run/docker.sock"
readTimeout: 60
name: "docker" |
Hmm, I think you're reporting multiple, but different, issues here. First, the issue with the groovy script; yes, you're right, it's out of date. Re: the JCasC exception
does suggest you're right... ...so if we go back further, we see that So, overall, it looks like JCasC is calling I know very little about JCasC so I can't be much help debugging that, other than to say that the template's connector field will probably need to create a DockerComputerAttachConnector ... and that I don't see anything wrong with the yaml specified there. ...however, your later exception trace stemming from |
Thanks for the feedback. My main point was to raise that the examples are not working. As far as clean environment, it is absolutely clean; declaratively instantiated at will. I don't know groovy very well, and know even less about Java, so I can't help much to resolve these issues. If I omit the image template, it does work (and I don't need the template, so it works out). |
@ntwrkguru just checked the yaml example and it works like expected.
Could it be the case that YAML was been broken during copy-paste with some hidden characters? @pjdarton regarding the outdated groovy script example, I've created a PR #1 to the forked version so once the author accepts it, #799 should be unblocked for further reviewing. |
@Maxim-Nazarenko Could be, sure. Although it seemed very specific to the slave image declaration and I copied from raw to vim, which usually is ok. |
I've now merged #799 and added some improvements myself (well, I think they're improvements 😉) I'm not sure about the JCasC issues - it could be that things would behave a little better if we null-proofed hashCode & equals ... but without proof that that's necessary I'm reluctant to do that as it ought to be unnnecessary and it'll impede efficiency in the general case. |
There were JCasC issues, but I know (as I'm using JCasC myself now) that this now works OK. There's a few rough edges (and PRs to resolve those) but it's basically "there" so I'm going to close this as "fixed". |
Pre-configuring a cloud with this plugin produces an error, both when using the provided groovy script and when using the example yaml snippet for the Jenkins Configuration as Code plugin. Manual configuration of the plugin in the environment works fine. I've even tried manually configuring the cloud with the plugin, then copying the relevant section for
cloud:
from the generatedjenkins.yaml
file, and feeding it back in during deployment...the same error for the configuration as code plugin, exists.Error from the groovy script approach:
Output from Configuration as Code approach:
The text was updated successfully, but these errors were encountered: