jenkinsci / pyenv-pipeline-plugin

Execute commands in Python virtualenvs in Jenkins Pipeline DSL
https://plugins.jenkins.io/pyenv-pipeline/
MIT License
33 stars 15 forks source link

pysh ignores newline #15

Closed bezda closed 5 years ago

bezda commented 6 years ago
withPythonEnv('System-CPython-3.5') {
  pysh '''
    echo "Show python version"
    python --version
  '''
  sh '''
    echo "Show python version"
    python --version
  '''
}
[Pipeline] pysh
[test_job] Running shell script
//....
//activating virtualenv
//....
+ echo Show python version python --version
Show python version python --version
[Pipeline] sh
[test_job] Running shell script
+ echo Show python version
Show python version
+ python --version
Python 2.7.13
cstarner commented 5 years ago

This may be due in part to how pysh was implemented. Version 2.0.0 of the plugin no longer utilizes (or even provides) pysh and pybat. I would recommend upgrading to the latest version, and seeing if the issue is resolved.

cstarner commented 5 years ago

Closing due to inactivity