Following the introduction of a new warning log message in version 2.7.1 of the Pipeline:Groovy plugin, we are now receiving types of the following warning in builds using the Artifactory Plugin:
The pipeline API supported by the Artifactory plugin creates objects, on which methods can be invoked.
Notice that the 'server' object allows executing the 'artifactoryUpload' step.
This OOP style is very convenient and allows reusing code and configuration. This approach received very positive feedbacks since it was introduced.
Currently however, this is achieved by having the 'server' instance store the CpsScript, so that it can be used to invoke the step (by using 'cpsScript.invokeMethod').
The Artifactory pipeline API is available for a few years already and has become extremely popular.
We would appreciate your advice on how to change the plugin in a way that will both satisfy the CPS guidelines without breaking its current functionality and structure.
Alternatively, the usage of cpsScript.invokeMethod could be added as an exception to the cps mismatch report, similar to the proposed addition in this PR.