开发者

How to export and import "build step" in Jenkins?

How do I import and export "Build Step"?

I know "copy from another job", but I want export build step only. And this makes copy only. I also google this, but its job move: move Hudson job to another server

I want this, because I want others to review on my build step. Some text format is exist? My bu开发者_C百科ild step contains several ant, several script of shell.


If your build is becoming that complicated, I think it is a sign that there is much knowledge about the build in the CI system that should really be refactored and put in the repository instead.

Try to keep the CI configuration to a minimum. Make sure the repository contains all the knowledge about how to do a proper build.

If you really want to extract parts of job configuration in Jenkins, the API does not seem to help. You might get what you want by picking up the job configuration file at http://[jenkinshost]/job/[jobname]/config.xml.


You can also try to use the Job Backup Plugin: https://wiki.jenkins-ci.org/display/JENKINS/thinBackup With this you can export and import Job configurations...


Just copy the folders from

/data/jobs/* to /data/jobs/

and restart jenkins... that's all

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜