Status: Open (View Workflow)
When configuring a NodeJS installation with the Configuration as Code plugin, the "home" argument of the NodeJSInstallation class constructor is required and its absence prevents the Jenkins instance to start. The bug is that it is not clear from the configuration UI, nor from an export of a working configuration, nor from any documentation that such a value is required, or what should be set to. In fact, just specifying it as an empty string solves the problem.
Related github issue: https://github.com/jenkinsci/configuration-as-code-plugin/issues/701
Steps to reproduce:
To have a working Jenkins instance using the Configuration as Code plugin, you must use something like the following as configuration for a NodeJS installation:
Without the home: "" value, the instance fails to start with the following error:
With the empty home value, everything works correctly. The bug is the fact that it is very hard to find (it probably requires inspection of the NodeJS plugin source code) that that value is required, is required in that position, and that an empty value is a correct default.
- One possible solution could be to remove the requirement on the parameter, possibly adding another constructor that sets the working empty value
- Another solution could be adding some documentation (it's not clear to me where, however) to guide Configuration as Code users so that they are aware of the requirement