Managing integration projects and buildsManaging integration projects and buildsThis article provides information on project and build management tasks. If access control has been set up, these tasks require administrative permissions. Getting started
Step 1: Create an integration projectAfter installing the Server package and starting the Klocwork Servers, creating an integration project is the next step in getting Klocwork up and running on your code. Typically, you create an integration project for each of your integration builds. To create a project, log in to Klocwork Static Code Analysis and click Projects if you're not already viewing the Projects list. If no projects exist, just start entering text in the fields; otherwise, click Create a new project . You'll see project creation tips on the page. When you create a project, you are assigned the role of Project admin by default. Tip: You can also create a project with the command kwadmin create-project.
Step 2: Capture your build settingsIn this step, Klocwork captures all of the information it needs to provide a centralized view of the entire code stream. Klocwork stores this information in a structured build log -- called a build specification. The build specification is the basis of the analysis. It's important that the build specification is an accurate and up-to-date representation of your build. If the build specification is inaccurate, the analysis will be inaccurate too. C/C++ | Java | C# | Mixed C/C++/C#
Step 3: Run the analysisOnce you've got a valid build specification, use it to analyze the project with kwbuildproject. C/C++ | Java | C# | Mixed C/C++/C#
Step 4: Load the databaseNow it's time to load your results into the database. C/C++ | Java | C# | Mixed C/C++/C#
Step 5: View the analysis resultsAt this point, you can return to Static Code Analysis and view the analysis results. You might need to click Projects to refresh the projects list. Project managementThe Projects list of Klocwork Static Code Analysis allows you to perform project management tasks such as:
Projects tips
To learn how to access Static Code Analysis, see Accessing Static Code Analysis. You can also use the command-line tool kwadmin for many project management tasks. Build managementThe Builds page of Klocwork Static Code Analysis allows you to perform build management tasks such as:
To access the builds page, click a project in the Project list and click Builds. Tip: You can also use the Web API or the command-line tool kwadmin for build management tasks.
Setting up a build retention policyThe space required to store integration build analysis data can grow very large over time. To save disk space, you can:
When you set a build retention policy, you set the number of builds to keep. By default, Klocwork keeps 20 builds. You can also prevent specific builds from being deleted; these builds are not included in the count of builds to keep. For example, if you set the threshold to keep 30 builds and also prevent 10 builds from being deleted, Klocwork will keep 40 builds.
Automatically delete old builds
The old builds you set to be deleted are automatically removed the next time you create a build. Tip: You can also enable automatic build deletion with kwadmin set-project-property. For example, to enable automatic build deletion for MyProject and keep the ten most recent builds:
kwadmin set-project-property MyProject auto_delete_threshold 10 To turn off automatic build deletion with kwadmin, pass a null value for auto_delete_threshold: kwadmin set-project-property MyProject auto_delete_threshold ""
Prevent a specific build from being deletedWhen you enable automatic build deletion, you may want to prevent specific builds from being automatically deleted (for instance, iteration or milestone builds).
Tip: You can also use the Web API to specify which builds to keep.
|