So I have a jenkins job that checkout a svn repo like this remote: "svn://xyz-repo/svn/xyzclientjs/$BRANCH_NAME"]],
I pass this $BRANCH_NAME through a Jenkinsfile that is present in this svn repo.
Now Inside Jenkinsfile I am doing this -
node 'xyz-169' {
checkout scm
def BRANCH_NAME = sh "svn info | grep -Po 'Relative URL: \\^/\\K.*'"
def BRANCH_REV = sh "svn info --show-item revision"
stage('Build A') {
build job: 'xyzclientjs-webui-test', propagate: true, parameters:
[
[$class: 'StringParameterValue', name: 'BRANCH_NAME', value: $env.BRANCH_NAME],
[$class: 'StringParameterValue', name: 'BRANCH_REV', value: $env.BRANCH_REV],
]
But when I run the job on jenkins I get following error
Error while checking out xyzclientjs branch from SVN
10:26:05 [Pipeline] error
10:26:05 [Pipeline] }
10:26:05 [Pipeline] // stage
10:26:05 [Pipeline] }
10:26:05 [Pipeline] // node
10:26:05 [Pipeline] End of Pipeline
10:26:05 java.lang.ClassCastException: org.jenkinsci.plugins.workflow.steps.ErrorStep.message expects class java.lang.String but received class groovy.lang.MissingPropertyException
Is there any way to do this. Please help any suggestions would be highly appriciated.