-
Notifications
You must be signed in to change notification settings - Fork 981
Description
Issue Type
- Bug Report
Summary
During export of any pipeline, GoCD sends a copy of current pipeline config to the plugin. The value of run_instance_count for a job is set to '0'.
Basic environment details
- Go Version:
20.1.0 (11115-af4bdadd3f6545617327c56f4cb3b92abe4f1181)r - JAVA Version:
11.0.1 - OS:
Mac OS X 10.13.6
Steps to Reproduce
- Install GoCD Groovy plugin
- Define a pipeline
testwith a job to run with one instance.
- Go to Pipelines SPA.
- Find
testand click export. SelectGoCD Groovy Configuration plugin. - Look at the file generated.
Expected Results
There should no run_instance_count present in the file. Even if present, it should be set to null.
Actual Results
The value of run_instance_count for the job is set to 0
Any other info
If I send the same file as input to the GoCD server, the plugin throws an error stating 0 is not a valid value.
IMO, what the value of run-instance_count should mean:
0: no job instances to run1ornull: run a single job instancex: partition the task into x partsall: to run on all agents
Currently, if my groovy files contain run_instance_count: '0', the plugin throws an error stating 0 is not a valid value - which is correct.
On setting it to run_instance_count: '1', the GoCD accepts it as a valid pipeline and schedules it. But the resulting job instance is suffixed by -1 which is not the desired results.
