Where is “Jenkins URL” configuration stored?

独自空忆成欢 提交于 2019-12-04 15:36:49

问题


I'm trying to set up a non-default URL as part of a puppet script that installs Jenkins. I know how to edit the value via the web UI but I can't seem to find where the value is actually stored. I've looked through the jenkins_home folder and apache and have yet to find it.


回答1:


It stores it in a rather unlikely place: hudson.tasks.Mailer.xml in Jenkins home folder.




回答2:


If you don't find the URL when grepping Jenkins home, it's because you didn't saved the configuration. If not set, Jenkins fallback to request URL, whithout saving it on disk.

root@jenkins-dev:/var/lib/jenkins# grep jenkinsUrl *.xml
jenkins.model.JenkinsLocationConfiguration.xml:  <jenkinsUrl>http://jenkins-dev.lxc/</jenkinsUrl>
root@jenkins-dev:/var/lib/jenkins# 



回答3:


I'm on Jenkins 2.68 and it's stored at jenkins.model.JenkinsLocationConfiguration.xml under the Jenkins home folder.




回答4:


The file config.xml in the Jenkins home folder.




回答5:


I did a grep for "http" in my Jenkins root directory led me to hudson.model.UpdateCenter.xml

I'm using Jenkins version 1.462



来源:https://stackoverflow.com/questions/11723735/where-is-jenkins-url-configuration-stored

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!