Cross-version support for builds
Klocwork has decoupled the Build Server version from the Klocwork Server. Therefore, you can use older build server tools with newer versions of the Klocwork Server, one full release back. For example, this means you can load Klocwork builds from any version of Klocwork 2021.1 through to 2021.4 into Klocwork 2023.1 without having to import or migrate data.
For large organizations, this feature provides flexibility by allowing you to upgrade the Server and Desktop plug-ins to take advantage of improvements in a newer release, while still analyzing some or all of your projects with a previous version of Klocwork.
Example: Loading a build from an older version of Klocwork into a newer version of the Klocwork Server and locking it to the older configuration
- In Klocwork 2021.1, log in and create a project in the Portal, for example, demosthenes.
- Lock the project to the 2020.1 configuration by running the following command from the build machine, for example:
kwadmin lock-project-version --url http://my2021server.acme.com:8084 demosthenes
This command creates a file that contains information about the engine and checker configuration on the build machine, including any custom checkers and whether checkers are enabled or disabled. The server uses this information as the base configuration for the project.
- In the Klocwork 2021.1 Portal, open the demosthenes project. You can enable or disable 2020.1 checkers, as necessary.
You cannot make use of any checkers introduced since 2020.1, as you have locked your project to that version of the product.
- On the 2020.1 build machine, build the project, as usual, for example:
kwbuildproject --url http://my2021server.acme.com:8084/demosthenes -o tablesdir buildspec.out
- On the 2020.1 build machine, use the kwadmin load command to load a build to the Klocwork 2021.1 Server, for example:
kwadmin load demosthenes tablesdir --url http://my2021server.acme.com:8084
How to verify if a project is locked to an earlier version of Klocwork
When you lock a project to an earlier version of Klocwork, the lock-project-version command creates a configuration file called default_checkers_configuration.xml and moves it to that project directory on the Klocwork Server. The configuration file contains information about the checkers available in that release, including any custom checkers you deployed to that build machine.
Search the project directory for default_checkers_configuration.xml to verify whether your project is locked to an earlier version of Klocwork.
Unlocking a project so that it no longer uses a project configuration from an earlier version of Klocwork
If you no longer want to lock a project to an earlier version of Klocwork, use the unlock-project-configuration command, for example:
kwadmin unlock-project-version demosthenes --url http://my2021server.acme.com:8084
Because the project has still been analyzed by an older version of Klocwork, if any checkers were removed or renamed since that release, you won't see them reported in the Portal. Similarly, your project won't report any new checkers introduced since that release. If you want to take advantage of all new checkers, you must analyze your project with the current version of Klocwork.