I cannot make the executed shell to resolve a predefined variable in my jenkins script.. I tried various syntax approaches w/o succcess. ..
Anybody could give me a hand?
String workspace
String addOn = "Path/To/Cmake.cmake"
node ('slave01') {
workspace = pwd()
String addOnAbsPath = "${workspace}/$toolchainCmake"
stage ('Build') {
// for some reason is not recognize, thats why
sh "echo ${addOnAbsPath}"
sh '''
echo Path: '$addOnAbsPath'
'''
sh '''#!/bin/bash
echo ${addOnAbsPath}
cmake ... -DADD_ON=$addOnAbsPath ...
'''
}
}