|
||
|
|
|
Compass Version 1.3
Changing The p4 Build Plan To Run IncrementallyWhen changing a build plan it is always a good idea to disable all scheduled builds until you are done updating the build plan, then turn all scheduled builds back on. This will keep unwanted builds from starting when you are half done with changes. In this section we start with the build plan as we left off with it in the prvious section. We have a 2 step build plan that checks out the example_code project from a p4 server and builds it using the Visual Studio Rebuild script. We scheduled it to run every 3 hours. This is great, except that we would rather not do a complete perforce checkout every time the build plan runs. We'd rather just do a p4 sync so we have less load on the perforce server and less network traffic, and most importantly, it will take our build plan a lot less time to execute this way. To set up a build plan to run incrementally, we need to add a new build step to the existing plan. The new build step will go in between the existing two steps and will be a 'Perforce Argument Update' build step. After adding the build step and moving (using the ordering arrows on the right) this is what our build plan looks like:
We are not quite done yet though. We need to change the details for the Checkout and the Update build steps. First let's change the Checkout build step's details. On the details dialog we change the 'Run On' drop down to run the checkout build step to 'First Time Only'. This dialog now looks like this:
Now we change the Update build step we change the same 'Run On' option, but for the update we want to execute it every time except the first time. So now the Update build step's Script Details section looks like this:
Finally, the last thing we need to do is tell compass that we are using an incremental build by checking the 'Build Incrementally' check box in the build configuration section. Our build plan now looks like this:
Now, our build plan is ready to run incrementally, we can re-enable our scheduled builds and the next time our build runs it will checkout code, and all subsequent runs it will only do a p4 sync. |







