0

I am trying to connect jenkins with my script but it shows me an error in the Console Output: I am using Python + behave + selenium

This is my virtualenv builder

'#!/bin/sh echo '#### Create Virtual Environment ####'
VIRTUAL_ENV_NAME='virtual-environment' virtualenv $VIRTUAL_ENV_NAME

echo '#### Activate Virtual Environment ####' source $VIRTUAL_ENV_NAME/bin/activate

echo '#### Install requirements ####' pip install -r ./Users//.jenkins/workspace/X-Automation-test/requirements.txt

echo '#### Run tests ####' make all

echo ### deactivate virtual environment ### deactivate

Error in the Console Output

Running as SYSTEM
Building in workspace /Users/<my user>/.jenkins/workspace/X-Automation-test
[X-Automation-test] $ /bin/sh -xe /var/folders/l6/ggw3mk7x2jx5lwdcjnyh4yjr0000gn/T/shiningpanda5769608622999070407.sh
+ echo '#### Create Virtual Environment ####'
#### Create Virtual Environment ####
+ VIRTUAL_ENV_NAME=virtual-environment
+ virtualenv virtual-environment
/var/folders/l6/ggw3mk7x2jx5lwdcjnyh4yjr0000gn/T/shiningpanda5769608622999070407.sh: line 5: virtualenv: command not found
Build step 'Virtualenv Builder' marked build as failure
Finished: FAILURE```

1 Answer 1

1

It looks (from your stack trace) that you are getting this error:

line 5: virtualenv: command not found

I would recommend you to look through the answers for this specific error here: Virtualenv Command Not Found

Another option that worked for me is to use a Jenkins plugin for building a virtual environment instead of the shell script, this is the plugin: ShiningPanda Virtualenv Builder

I hope this helps, good luck!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.