8.2.7. PTC Windchill RV&S / MKS Integrity¶
8.2.7.1. Background¶
You are using PTC Windchill RV&S / PTC Integrity / MKS Integrity and want to set up continuous integration and a dashboard server for Windows on the same machine.
For ease of reading, the product will be referred to as “Integrity” in the rest of this document; however, these instructions apply regardless of whether you are using MKS Integrity or PTC Windchill RV&S.
8.2.7.2. What can be configured?¶
You need to set up:
continuous integration (e.g., via Jenkins CI)
the dashboard as a Windows system service
8.2.7.3. What needs to be done?¶
The recommended approach to set up Integrity on a single build and dashboard machine is as follows:
Set up two different technical users (e.g.,
jenkinsuserfor the build anddashboarduserfor the dashboard).For each user, create the following file
%USERPROFILE%\IntegrityClient.rcwith different port numbers (the port numbers must be unique on the server).Restarting Integrity Client for dashboard¶IntegrityClient.port=31001
The Integrity plugin for Jenkins does not work with sandboxes; therefore, code analysis cannot retrieve the required information from the Integrity server. Instead, use the
si createsandboxcommands subsequently.Use the following script to start the 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 the following:
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, set up 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, and then install the dashboard service.