How to rollback to the last build with cruisecontrol?
I just finished my cc.net configuration for getting the code from svn, building it and then copying the web site in our servers.
Now we have开发者_如何学编程 an other requirement : we want to be able to roll back to one of the previous successful build (most of the time the one before the last).
We are deploying an asp.net web site so there is no assembly versioning here.
I searched here and on google but I couldn't find anything.
One way is take back ups of the project builds. So after successful build of the project and before copying to server take a backup of the build with an appropriate name.
So if we want to revert you can use the back up file saved. Usually we follow that method. But it requires manually copying the files.
I don't think there is any other rollback methods in cruise control .net.
You can add a publisher block to copy files. To take backup just check the code
<publishers>
<buildpublisher>
<sourceDir>Source Path</sourceDir>
<publishDir>Backup path</publishDir>
<alwaysPublish>false</alwaysPublish>
<useLabelSubDirectory>true</useLabelSubDirectory>
<cleanUpValue>10</cleanUpValue>
<cleanUpMethod>KeepLastXBuilds</cleanUpMethod>
</buildpublisher>
</publisher>
it will take 10
backups according to clean up value
精彩评论