8.2.5. PTC Windchill RV&S / MKS Integrity¶
8.2.5.1. Background¶
You use PTC Windchill RV&S / PTC Integrity / MKS Integrity and want to set up a continuous integration and a dashboard server for Windows on the same machine.
For ease of reading, we will be calling the product just Integrity in the rest of this document, it however applies regardless of whether you are using MKS Integrity or PTC Windchill RV&S.
8.2.5.2. What can be configured?¶
You have to setup
continuous integration (e.g. via Jenkins CI)
dashboard as a Windows system service
8.2.5.3. What needs to be done?¶
The recommend approach to set up Integrity on a single build and dashboard machine:
Setup two different technical users (e. g.,
jenkinsuserfor build,dashboarduserfor dashboard).As per user, create the following file
%USERPROFILE%\IntegrityClient.rcwith different port numbers (the port numbers must be unique on a single server).Restarting Integrity Client for dashboard¶IntegrityClient.port=31001
The Integrity plugin for Jenkins does not work with sandboxes so the code analysis can not retrieve required information from the Integrity server. Instead, you have to use the
si createsandboxcommands subsequently.Use the following script to start Integrity client for each Jenkins job:
Restarting Integrity Client for build¶taskkill /FI "USERNAME eq <DOMAIN>\jenkinsuser" /IM IntegrityClient.exe /F REM wait for some seconds to free the ports used timeout 5 @echo si connect --batch --hostname=%MKSHOST% --user=jenkinsuser --password=*** @si connect --batch --hostname=%MKSHOST% --user=jenkinsuser --password=%PASSWORD% @if ERRORLEVEL 1 echo Connection to MKS/PTC Integrity failed. exit /B 0
Cleanup and checkout of sandboxes¶:: Drop Sandboxes for clean build si dropsandbox --delete=all -Y %WORKSPACE%/Sandbox/project.pj :: Recreate Sandboxes si createsandbox -Y --project="#/MyProject/is/here" %WORKSPACE%/Sandbox :: Run Analysis %WORKSPACE%\Axivion\start_analysis.bat
If desired, you can replace the drop-create cycle above with
Resync of sandboxes¶::... si resync --batch --recurse --includeDropped --overwriteChanged %WORKSPACE%/Sandbox @if ERRORLEVEL 1 ( echo Cannot resync sandbox %WORKSPACE%/Sandbox. :: Create Sandboxes cd /D %WORKSPACE%/Sandbox si createsandbox -Y --project="%PROJECTROOT%" "%PROJECTPATH%" ) ::...
For the dashboard, setup the following script (e.g.
restart_si.bat):Restarting Integrity Client for dashboard¶taskkill /FI "USERNAME eq <DOMAIN>\dashboarduser" /IM IntegrityClient.exe /F @echo si connect --batch --hostname=%MKSHOST% --user=dashboarduser --password=*** @si connect --batch --hostname=%MKSHOST% --user=dashboarduser --password=%PASSWORD% @if ERRORLEVEL 1 echo Connection to MKS/PTC Integrity failed. exit /B 0
Configure the prestart and poststop command entries in
dashboard2.configto callrestart_si.bat. Then, install the dashboard service.