当前位置: 动力学知识库 > 问答 > 编程问答 >

build automation - System for testing and submitting pending changes (ideally in Perforce)

问题描述:

I've got a working post-checkin validation system in place for our team's C/C++ projects using Buildbot and Perforce, and it's worked well for us. However, our current system responds to checkins and only detects failures after they've been submitted. Several people have requested a full pre-checkin system that automates the process of packaging a pending changelist (I'm thinking P4 shelves) and handing it off to the builder, which will build, test, and submit the checkin (in their name). This would prevent most bad checkins from ever getting submitted, and we could still run more thorough tests afterward on the buildbot. However, I haven't found any good systems (commercial or open source) that do this.

Does anyone have experience with software that will enable this? I've heard this referred to a check-in gauntlet or gated checkins (TFS 2010's name for it). Is there a more standardized term for this pre-checkin verification and submission approach? It would be ideal if we could do this within Buildbot, but we're open to other solutions as well.

网友答案:

Buildbot does have its try functionality, which can be used to run a build with a certain set of changes that haven't been checked in yet:

http://buildbot.net/buildbot/docs/latest/try.html

网友答案:

A bit old question but it might still be useful. Through the buildbot API you can send the master a change. The function you want to look at:

addChange(author=None, files=None, comments=None, is_dir=0, links=None, revision=None, when_timestamp=None, branch=None, category=None, revlink='', properties={}, repository='', project='', uid=None)

you can pass properties that will be fetchable by the builder. In your builder get latest of the branch + get the CL (maybe shelf) and build it.

分享给朋友:
您可能感兴趣的文章:
随机阅读: