Jenkins seems to be the target for nohup in a script started via ssh, how can I prevent that?

前端 未结 4 449
暗喜
暗喜 2021-01-14 00:35

I am trying to create a Jenkins job that restarts a program that runs all the time on one of our servers.

I specify the following as the command to run:



        
4条回答
  •  说谎
    说谎 (楼主)
    2021-01-14 01:00

    If I understood the question correctly, Jenkins is killing all processes at the end of the build and you would like some process to be left running after the build has finished.

    You should read https://wiki.jenkins-ci.org/display/JENKINS/ProcessTreeKiller

    Essentially, Jenkins searches for processes with some secret value in BUILD_ID environment variable. Just override it for the processes you want to be left alone.

提交回复
热议问题