I have a pipeline where i have TARGETENVIRONMENT as QA and PROD.In the first step I am converting TARGETENVIRONMENT and storing that value in variable Ajob and Bjob.These values Ajob and Bjob are job names where i need to get the build number for processing further.
def Ajob = "ProjectBuild_ABD_${TARGET_PLATFORM.toUpperCase()}_fe"
def Bjob = "ProjectBuild_ABD_${TARGET_PLATFORM.toUpperCase()}_be"
In the next step I am storing the build numbers of these jobs.When i
def fe = sh returnStdout: true, script: '/usr/sfw/bin/wget -qO- http://fiesccet01.emea.nsn-net.net:9095/job/${Ajob}/lastBuild/buildNumber'
def be = sh returnStdout: true, script: '/usr/sfw/bin/wget -qO- http://fiesccet01.emea.nsn-net.net:9095/job/${Bjob}/lastBuild/buildNumber'
The script is not taking these values ${Ajob} and ${Bjob}.How to pass these variables in the script.