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

Can't find python exe file #43

Open braunman opened 3 years ago

braunman commented 3 years ago

Hi, I try to run plugin withPythonEnv on windows server with code:

      stage('Creat VENV') {
         steps {
            bat '''python -m venv venv
            '''

         }
        }
        stage('Build') {
         steps {

            withPythonEnv('venv\\Scripts\\python.exe'){
                bat '''pip install -r requirements.txt
                pip list
                pyinstaller --onefile bo_installer.py
                '''
            }

        }

but when start execute step Build Jenkins fails with error

[Pipeline] withPythonEnv
$ venv\Scripts\python.exe --version
[Pipeline] // withPythonEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.io.IOException: CreateProcess error=2, can't find file
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ci3/10.50.1.53:55834

step 'Creat VENV' finish without any error. And I clearly knew that file python.exe exist in folder.

Jenkins ver. 2.204.1 Pyenv Pipeline Plugin ver 2.1.2

Have you any suggestion why it's fails?