Sonra çalıştırmak bir git repo var ve onu klonlamak Jenkins'i almak istiyorumJenkins'i "pip install" çalıştırmayı nasıl yapabilirim?
virtualenv venv --distribute
/bin/bash venv/source/activate
pip install -r requirements.txt
python tests.py
jenkins gelen konsol çıkışı:
+ virtualenv venv --distribute
New python executable in venv/bin/python
Installing distribute..........................done.
Installing pip...............done.
+ /bin/bash venv/bin/activate
+ pip install -r requirements.txt
Downloading/unpacking flask (from -r requirements.txt (line 1))
Running setup.py egg_info for package flask
SNIP
creating /usr/local/lib/python2.7/dist-packages/flask
error: could not create '/usr/local/lib/python2.7/dist-packages/flask': Permission denied
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/var/lib/jenkins/workspace/infatics-website/build/flask/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-hkdBAi-record/install-record.txt failed with error code 1
Storing complete log in /home/jenkins/.pip/pip.log
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Ben komutundan önce sudo ekleyerek denedim ama Şu ya da çalışmıyor:
+ sudo pip install -r requirements.txt
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Bu konuyla ilgili herhangi bir fikriniz var mı? Ayrıca jenkins kullanıcısı olarak bir terminalde pip -r require.txt dosyasını çalıştırdığımda sudo iznine gerek yoktur. Jenkins (işlem) jenkins kullanıcısı olarak çalıştırabilir miyim?
Ben virtualenv için gizli dizini kullanarak tavsiye: '' ' Virtualenv .pythonenv kaynak .pythonenv/bin/ -r requirements.txt piton testleri yüklemek pip aktif hale .py '' ' – vpipkt