R – Check Out for Continuous Integration

continuous integrationversion control

What do you all normally do when checking code out of version control software to perform your continuous integration or nightly build? Do you 1) pull the latest code, or 2) pull by some tag (i.e. FUNCTIONAL) that represents the developer's latest code to be tested?

I guess the answer to this depends on how people normally use their configuration management repositories. Do you intend it to only store code that is "complete". If that is the case, if a developer is working on a task for a week or so, he/she won't be able to check anything in until the task is completely done. If the continuous integration server, however, simply pulled by a well-known tag instead of pulling the latest code, then this would allow devs to check code in very frequently as they are working to store a history of their work in progress. Then, once they were comfortable with the changes, they could tag their new code with the FUNCTIONAL tag.

Just wanted to know the best practices.

Thanks

Best Answer

So what we usually do is have a "build" branch which the CI server builds off. We merge everything that we want to be included in the nightly build into the build branch and it'll build off there.

We don't actually develop against the build branch tho, we have development branches which are used to keep changes that aren't ready to be released to the test environments.