jenkinsci / file-operations-plugin

File Operations as Build Step in Jenkins
https://plugins.jenkins.io/file-operations
33 stars 31 forks source link

FileCopyOperation unknown parameter #129

Closed delanym closed 3 days ago

delanym commented 2 months ago

Jenkins and plugins versions report

Environment ```text println("Jenkins: ${Jenkins.instance.getVersion()}") println("OS: ${System.getProperty('os.name')} - ${System.getProperty('os.version')}") println("Java: ${System.getProperty('java.version')} - ${System.getProperty('java.vm.vendor')} (${System.getProperty('java.vm.name')})") println "---" Jenkins.instance.pluginManager.plugins .collect() .sort { it.getShortName() } .each { plugin -> println("${plugin.getShortName()}:${plugin.getVersion()}") } return ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows server 2016

Reproduction steps

Add a file copy operation to your Jenkinsfile

        fileOperations([
            fileCopyOperation(sourceFiles: 'build/target/*.zip', targetLocation: 'z:/release/distributions/')
        ])

Expected Results

Copies file without error

Actual Results

22:45:11 WARNING: Unknown parameter(s) found for class type 'sp.sd.fileoperations.FileCopyOperation': sourceFiles 22:45:11 File Copy Operation: 22:45:11 FATAL: Cannot invoke "String.startsWith(String)" because "rel" is null 22:45:11 Cannot invoke "String.startsWith(String)" because "rel" is null 22:45:11 FATAL: Cannot invoke "String.startsWith(String)" because "rel" is null

Anything else?

No response

Are you interested in contributing a fix?

No response

jonesbusy commented 3 days ago

Duplicate of https://github.com/jenkinsci/file-operations-plugin/issues/143

Possible cause is a workflow plugin issue ?

This work well with freestyle

Image Image