Hi

How can we upload a groovy file from a local machine to the jenkins 
instance - workspace as the following reports the error within a FreeStyle 
project "ERROR: (script, line 81) File backupPOM.groovy does not exist in 
workspace" ?

mavenJob('check-bom-dependencies') {
    description 'Maven Job checking the BOM dependencies of the Spring Boot 
project'

    logRotator {
        numToKeep 3
    }

    parameters {
        stringParam('TAG', '2.3.4.Final',
                'The release version for the artifact. If you leave this 
empty, ' +
                        'the current SNAPSHOT version will be used with the 
' +
                        '"-SNAPSHOT" suffix removed (example: if the 
current version ' +
                        'is "1.0-SNAPSHOT", the release version will be 
"1.0").')
    }

    scm {
        git {
            remote {
                url 'https://github.com/snowdrop/spring-boot-bom'
                branch '$TAG'
            }
        }
    }

    preBuildSteps {
            groovyCommand(readFileFromWorkspace('backupPOM.groovy')) {
                groovyInstallation('groovy3')
              }
    }

    rootPOM 'pom.xml'
    goals '-B dependency:tree'
}

Regards
Charles

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/0d0bf936-b5d3-4b0b-bca8-e34f93af4c3bn%40googlegroups.com.

Reply via email to