When I try to start a background process from my
Custom Script Step Runner in TeamCity, I see that it terminates the background process as soon as the step completes. Is there a way to keep the background process running?
Here's what I am trying to do in my step:
ORACLE_POD_NAME=`...complex logic here...`
oc port-forward $ORACLE_POD_NAME 15210:1521 &
echo $PORT_FORWARD_PID > port_forward.pid
The idea is to create a persistent port forward to my OpenShift pod for the duration of the build, b/c many subsequent build steps will need it. I would then kill the port forward process using the PID I wrote into the file.
oc port-forward' is already terminated by the time I get to the next step. Is there a way to get this to work?