Reputation: 20856
Im trying to set a environment variable(VIRTUALENV) in Jenkins - stage(check_style) and use that in the shell but it throws a error.
withEnv(['VIRTUAL_ENV=${env.WORKSPACE}/venv']){
stage ('Check_style') {
sh """
export PATH=${VIRTUAL_ENV}/bin:${PATH}
make flake8 | tee report/flake8.log || true
"""
}
}
Error:-
PATH=${env.WORKSPACE}/venv/bin:/usr/bin:/bin:/usr/sbin:/sbin: bad substitution
Upvotes: 0
Views: 1373