Open mromero-convoso opened 2 years ago
When I looked into this there are 2 different methods being called for groovy execution, likely needs to be unified in some way. https://github.com/sous-chefs/jenkins/blob/main/libraries/_executor.rb#L69 https://github.com/sous-chefs/jenkins/blob/main/libraries/_executor.rb#L152
:ghost: Brief Description
When attempting to use the
jenkins_script
resource with thegroovy_path
attribute set, as opposed to the command attribute set to a block of inline Groovy code, jenkins-cli returns the following error:I have a workaround that allows me to use a groovy file written by a template resource, which looks like this:
:pancakes: Cookbook version
9.5.0
:woman_cook: Chef-Infra Version
17.8.25
:tophat: Platform details
Ubuntu 20.04 LTS
Steps To Reproduce
Within some recipe, use include the following:
You should get the error mentioned above during convergence.
:police_car: Expected behavior
The executed jenkins-cli command should look something like this:
It currently looks something like this:
The additional
=
sign in the first example above is what seems to allow it to behave the way it should, without throwing the error about the-remoting
option no longer being supported.