Closed muryanto1 closed 6 years ago
@muryanto1 So the command to be run as a subprocess is:
service postgresql initdb
Running
which service
Returns
/sbin/service
Before the installer is executed I see
[Pipeline] sh
[esgf_3.x_install] Running shell script
+ sudo bash -c 'export TERM=vt100; export PATH=/usr/local/conda/bin:/usr/local/bin:/bin:/usr/bin; cd /home/jenkins/repos/esgf-installer; source /usr/local/conda/bin/activate esgf-pub; python esg_node.py --install --type all'
I think the problem is the $PATH
does not include /sbin
because of
export PATH=/usr/local/conda/bin:/usr/local/bin:/bin:/usr/bin
above. So the installer cannot find service
.
Let me know if I am missing something.
As a fix either add /sbin
to the export or change the export to something like
export PATH="/usr/local/conda/bin:$PATH"
This assumes there is a $PATH
which already contains other paths, including /sbin
and those you specified in your export, and you are adding /usr/local/conda/bin
to it. I am not sure how this will work in Jenkins.