Reputation: 614
I have one pipeline and one other job. i want to pass parameter.
This is my groovy script which is inside pipeline job.
pipeline {
agent any
stages {
stage('release') {
steps {
echo 'This is release!'
echo branch
build job: projectname , parameters: [[$class: 'StringParameterValue', name: 'branch', value: branch]]
}
}
So this branch i want to pass into build job. echo branch also printing perfectly.
And this is how i tried to get my branch name from release job
org.tmatesoft.svn.core.SVNException: svn: E160005: Target path '/${branch}' does not exist
It does not resolve to the branch name which i want
Upvotes: 0
Views: 702
Reputation: 693
This should work:
build job: projectname , parameters: [string(name: 'branch', value: "${branch}")]
Upvotes: 1