Closed emman27 closed 5 years ago
I can certainly add in temporary support for the older steps. That said, it would be helpful if you could show me what is breaking with the new sh statements
On Tue, Sep 4, 2018, 7:15 PM Emmanuel Goh notifications@github.com wrote:
Raising this issue as a result of not being able to migrate out. Here's the workflow I'm stuck in:
I have >100 pipelines on my Jenkins instance, many of them using this plugin. The current syntax is
withPythonEnv('Python2.7') { pysh 'python something.py' }
Upgrading the plugin immediately breaks all these pipelines.
Alternatively, if I change the pipelines first to
withPythonEnv('Python2.7') { sh 'python something.py' }
then pipelines are immediately broken
Suggesting to have an intermediate release where both syntaxes are supported to ease the migration pain.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jenkinsci/pyenv-pipeline-plugin/issues/21, or mute the thread https://github.com/notifications/unsubscribe-auth/AKQ39LLUNuZehGls2gRMoR8crqJiS6L2ks5uXyW3gaJpZM4WaBIG .
Here are the relevant log (1.0.4), and the relevant section of the pipeline. Seems to dislike the sh step inside the block for some reason.
withPythonEnv('python2.7') {
sh 'pip install --user -r requirements.txt'
sh 'pytest --cov'
sh 'codecov --token=token
}
$ python2.7 -m virtualenv --python=python2.7 /home/jenkins/workspace/s-utilities_feature_jenkins-4VIPT3TFSI2FDL7JYJGVU3H4A5K3SNOQHIZDX3XMFEDKP7RUO4BQ/.pyenv-python2.7
[Pipeline] {
[Pipeline] sh
[serverless] Running shell script
nohup: failed to run command 'sh': No such file or directory
process apparently never started in /home/jenkins/workspace/s-utilities_feature_jenkins-4VIPT3TFSI2FDL7JYJGVU3H4A5K3SNOQHIZDX3XMFEDKP7RUO4BQ/serverless@tmp/durable-66cc8114
I would wager this is related to the way that I'm handling the changes to the PATH variable, and constitutes a bug in 2.0.0. I can also add backwards compatible pysh
and pybat
statements, but I think that there is something deeper going on here
I've released a beta version with a fix that I believe will solve your issues. Would you mind testing it out in your environment? It's release pyenv-pipeline-2.0.1-beta. In order to access it through the Jenkins Plugin manager, you'll need to enable Experimental Plugins in a Jenkins instance.
You can read more details here: https://jenkins.io/doc/developer/publishing/releasing-experimental-updates/
Let me know if this fixes your problem.
I should note that this change is directed at the 'sh': No such file or directory
portion of the issue. I have not yet added back in the pysh
and pybat
steps, since my plan for their support is going to be empty extensions of the Durable Task equivalents. If sh
is failing for you, my intended reinclusion of pysh
would fail also
I've added the pysh
and pybat
steps back in. Due to inactivity, I will am closing this
Thanks @cstarner !
Raising this issue as a result of not being able to migrate out. Here's the workflow I'm stuck in:
I have >100 pipelines on my Jenkins instance, many of them using this plugin. The current syntax is
Upgrading the plugin immediately breaks all these pipelines.
Alternatively, if I change the pipelines first to
then pipelines are immediately broken
Suggesting to have an intermediate release where both syntaxes are supported to ease the migration pain.