The working directory in which the selected tool (cmake, ctest, or cpack) is executed, resolved relative to $WORKSPACE. If left empty, the workspace root is used. If the directory does not exist, it will be created automatically before the tool is launched.

For ctest and cpack steps, set workingDir to the CMake build directory (e.g. build) where CMakeCache.txt, CTestTestfile.cmake, or CPackConfig.cmake were generated.

Note on ctest and CMake's WORKING_DIRECTORY test property: workingDir specifies the directory from which Jenkins launches the ctest runner to discover test definitions. Individual tests executed by ctest run inside the directory configured via the WORKING_DIRECTORY property on add_test() in CMakeLists.txt (or the corresponding build directory if not specified).