Importing your build tables for use with Continuous IntegrationTo improve the initial build time on each agent you are using for Continuous Integration (CI), you can re-use your existing Klocwork server build tables. You can do this by copying your existing Klocwork Server build tables to your CI workspace using the relevant method for your operating system, followed by using 'kwconan import' and placing the result on each agent/slave. This procedure is preferable if your software build takes a long time to complete. Klocwork CI needs to create a baseline based on the entire code base in order to report only newly introduced issues. For example:
kwconan import --tables-directory mytables --url http://jsmith02:8080/my_project Important: When copying tables, ensure that the timestamp is preserved (On Linux, this is done by using cp -p command; Windows does this by default). If this is not done, the next analysis on that agent will not be incremental.
You must also ensure that the path to the tables directory does not change. However, this may not be possible if your source Klocwork tables directory has a different directory structure than your CI build agents. If you are unable to keep the same directory structure, the analysis stage runs in incremental mode but the linker stage does not. Once the first CI analysis is complete, subsequent builds are incremental. Also, if you decide not to use 'kwconan import' and perform a full build with Klocwork CI enabled on a single agent, the resulting tables can be copied to the other agents. Therefore, the other agents don't have to do a full initial build as you can re-use the tables from the first agent. |