I need to run jenkins build using a specific conda environment on our jenkins server (works on Windows). I thought it would be as easy as working:
activate myenv python test_env.py
but it looks like this will cause the build to complete before the script starts. Here is the jenkins console log:
activate myenv Activating environment "myenv"... Finished: SUCCESS
If I delete the activation string, the python script runs fine.
FYI, script I run:
import os f = open('env.txt','w') for k, v in os.environ.iteritems(): print k, v f.write('%s\t%s\n' % (k,v)) f.close()
Does anyone know what is going on? Should I directly call the appropriate python executable?
python windows environment jenkins conda
Jahfet
source share