简体   繁体   中英

Git and Jenkins on the same server: bare or non-bare repo for automated testing?

I have an AngularJS project with a bare Git repository on a private server, and I will introduce automated unit testing really soon. I want to install Jenkins on the same server, so I'm asking myself whether it's a good idea to use a non-bare repository so Jenkins could run the tests directly from there, or if I should make Jenkins to pull the code every time. On a side note, if the non-bare repo is the best solution, is there a way to transform the repo from bare to non-bare? Thanks

I usually just pull (eg, clone) a fresh non-bare repo into a clean directory-- there's no chance of left-over build products causing unexpected behavior.

To get a non-bare repo from a bare one, simply do a git checkout or git clone to another location, as in this post: getting a working copy of a bare repository .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM