Ariannis
Ariannis

Reputation: 1

Getting an error in Jenkins with integration Python-Behave-Selenium

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```

Upvotes: 0

Views: 288

Answers (1)

Svetlana Levinsohn
Svetlana Levinsohn

Reputation: 1556

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!

Upvotes: 1

Related Questions