| I've been working on an issue recently. While trying to call the disable-job cli method, we receive: ERROR: object is not an instance of declaring class The root cause is because a plugin has overriden the method: https://github.com/jenkinsci/multi-branch-project-plugin/blob/master/src/main/java/com/github/mjdetullio/jenkins/plugins/multibranch/TemplateDrivenMultiBranchProject.java#L480 So now, if you try to disable a Freestyle job, it fails because it's expecting a TemplateDrivenMultiBranchProject one. I open this to have feedback about what is best to do here:
- Avoid overriding cli methods
- Warn about that fact on Jenkins console
- Warn about that fact on Jenkins CLI commands list page
- Warn about that fact on the CLI command output directly (may break some automations)
|