Java – how do I reject a mercurial check-in that destroys a build?
•
Java
I have a java project managed by mercurial and built by Jenkins Is there any way to prevent developers from checking code that breaks a build? I know I can do this with ant and mercurial hooks, but is there any way to do this with Jenkins?
Solution
Let your developers push from one repo (let's name it "master") to another (let's name it "staging") (it's easy to use a simple default push location in. HGRC)
If the build is successful, Jenkins will withdraw from the staging program and push it to the primary server, otherwise Jenkin's repository copy will be restored
Only Jenkins should be able to push the master
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码