Jenkins在何处存储其运行作业的配置文件? [英] Where does Jenkins store configuration files for the jobs it runs?
问题描述
我正在使用Jenkins将持续集成集成到工作中的EC2项目中. Jenkins机器本身保留在EC2机器上-可能需要将该机器脱机并随时恢复到完全不同的EC2实例上.我们有一堆Puppet清单,使我们可以轻松地在EC2实例上重新安装该软件,但是自定义配置文件(例如我在Jenkins中创建的作业的配置文件)将在移动后被删除.
I'm adding continuous integration to an EC2 project at work using Jenkins. The Jenkins machine itself is kept on an EC2 machine - one that might need to be taken offline and brought back on an entirely different EC2 instance at any point. We have a bunch of Puppet manifests allowing us to easily reinstall the software on the EC2 instance, but custom configuration files, like the ones for the jobs I create in Jenkins, would be deleted after the move.
现在,如果Jenkins将要在其上运行的作业存储在XML文件或一组XML文件中的某个位置,那么我可以设置一个系统,将这些文件提交到版本控制服务器,然后下载回系统.新创建的服务器作为人偶清单的一部分.有谁知道这些文件的存储位置?我已经尝试过复制/var/lib/jenkins/jobs
,但这似乎是在存储Jenkins作业的输出,而不是输入.
Now, if Jenkins stores what jobs are to be run on it in an XML file or set of XML files somewhere, I could set up a system where those files are committed to the version control server, and then downloaded back to a newly-created server as part of the puppet manifest. Does anyone know where these files are stored? I've tried copying /var/lib/jenkins/jobs
, but that appears to store the output of Jenkins' jobs, not the input.
推荐答案
Jenkins将每个作业的配置存储在jobs/
中的同义目录中.作业配置文件为config.xml
,内部版本存储在builds/
中,工作目录为workspace/
.请参阅 Jenkins文档,以获取直观表示和更多详细信息.
Jenkins stores the configuration for each job within an eponymous directory in jobs/
. The job configuration file is config.xml
, the builds are stored in builds/
, and the working directory is workspace/
. See the Jenkins documentation for a visual representation and further details.
这篇关于Jenkins在何处存储其运行作业的配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!