-
Notifications
You must be signed in to change notification settings - Fork 498
Description
Workspace
jenkins
📜 Description
While trying to use the scaffolder plugin for jenkins, we found some issues with the documentation which were impacting our usage of this plugin.
👍 Expected behavior
The documentation is showing correct information so that the actions can be used as expected.
👎 Actual Behavior with Screenshots
The documentation has inconsistencies which can block people to use this plugin.
Build job:
The jobParameters input value is incorrect.
Enable job:
The description of the enableJob action in the schema mention Destroy an existing job
👟 Reproduction steps
Build job
- Open the README.md, to the
How to use itsection - See the
some-value, which is not an object, and which cannot be used like this
Enable job
- In backstage, open the Installed actions page when the plugin
scaffolder-backend-module-jenkinsis installed - Search for the action
jenkins:job:enable - See that the description is
Destroy an existing job jenkins given a name
📃 Provide the context for the Bug.
Build job
It isn't possible to start jenkins job with parameters as the documentation is showing.
After investigation, it seems to be linked with the way the underlying library is passing the parameter to jenkins, as it expected a parameters, which is not provided by the action.
This is the correct way to provide the parameters:
- id: jenkins-job-build
name: Jenkins Job Build
action: jenkins:job:build
input:
jobName: first-job
jobParameters:
parameters:
PARAM1: value1Looking at the implementation of the library, it is also possible to provide a delay and token parameter.
We would suggest updating the action to provide correctly the jobs parameters:
const options = {
parameters: ctx.input.JobParameters,
};
jenkins.job.build(ctx.input.jobName, options);Enable Job
Currently, the action is confusing as it feels weird to see Destroy in a enable action.
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Are you willing to submit PR?
No, but I'm happy to collaborate on a PR with someone else