How to change home directory of Jenkins?

后端 未结 4 398
南旧
南旧 2021-02-02 10:59

Simple question: How to change the jenkins home directory location? By default it points to /var/lib/jenkins whereas I want it to point to /home/jenkins

4条回答
  •  广开言路
    2021-02-02 11:02

    Jenkins usually runs with its own user,
    so changing the home-dir of that user should do the job.

    If not sure, simply run a test-job with a shell-command like 'id' or 'whoami' or 'env' to find the user that Jenkins uses.

    Also, note that a message of "Started by user anonymous" does not mean that Jenkins started as an anonymous user -
    please see this related answers by Sagar and Peter Tran:

    how to run jenkins as a different user

提交回复
热议问题