I'm using a Manual (custom view) setup for my freestyle jobs so far (see screenshot of an example job).
I have problems with the feature Pin the workspace to the build host: when looking at the workspaces I often see that workspaces get the wrong host set. This leads to synching problems and in the end typically to (C++) linker errors.
I've created a Python script report_p4_workspaces_with_wrong_host_assignment.py for this. It gives me e.g.:
jenkins_frinavci_FRI00040598D_spine2d.w64-vc14-qt56x.debug-coverage: FRIjenkins04 jenkins_frinavci_FRI00040598D_stp-makospine.w64-vc14-qt5.9.4-release: FRNAVDEV01 jenkins_frinavci_FRI00903207D_shared-communications-sfb_unit.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_FRI00903207D_shared-render_engine.w64-vc14-qt56x.debug-coverage: FRINAVDEV01 jenkins_frinavci_frijenkins04_ce.win64-vc14-qt56: FRNAVDEV01 jenkins_frinavci_frijenkins04_shared-report_engine.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_frijenkins04_Tools-f8scope.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_frijenkins06_Linux_Jobs-shared-threading-testframe.Linux: frijenkins11 jenkins_frinavci_frijenkins06_Linux_Jobs-spine2d.linux64-gcc-qt56x: frijenkins11 jenkins_frinavci_frijenkins08_fess.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_frijenkins08_plugins-import.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_frijenkins09_appman.w32-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_frijenkins09_plugins-test_driver_plugin.w32-vc14-qt56x: FRINAVDEV01 jenkins_frinavci_frijenkins09_plugins-videolib_ng.w3264-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_frijenkins09_shared-threed.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_frijenkins11_Linux_Jobs-cranial.linux64-gcc-qt56x-debugmako: frijenkins06 jenkins_frinavci_frijenkins11_Linux_Jobs-cranial.linux64-gcc-qt56x-debugquick: frijenkins06 jenkins_frinavci_frijenkins11_Linux_Jobs-cranial.linux64-gcc-qt56x-releasemako: frijenkins06 jenkins_frinavci_frijenkins11_Linux_Jobs-cranial.linux64-gcc-qt56x-releasequick: frijenkins06 jenkins_frinavci_frijenkins11_Linux_Jobs-shared-classlib.linux64-gcc-qt56x: frijenkins06 jenkins_frinavci_frijenkins11_Linux_Jobs-shared-sys_util.linux64-gcc-qt56x: frijenkins06 jenkins_frinavci_frinavdev01_shared-communications-udp_multicast.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_frinavdev01_shared-qt_util.w64-vc14-qt56x: FRIJENKINS09 jenkins_frinavci_frinavdev01_shared-threading.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_Haswell-NUC_comp-image_acquisition_engine.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_Haswell-NUC_multi-shared-CEMsg: FRNAVDEV01 jenkins_frinavci_Haswell-NUC_plugins-plugin_manager.w32-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_Haswell-NUC_plugins-plugin_manager.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_Haswell-NUC_plugins-videolib.w3264-vc14-qt56x: FRIJENKINS09 jenkins_frinavci_Haswell-NUC_shared-CEMsg.w3264-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_Haswell-NUC_shared-communications-socket.w64-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_Haswell-NUC_shared-meshlib.w3264-vc14-qt56x: FRIjenkins04 jenkins_frinavci_Haswell-NUC_shared-smart_tool.w32-vc14-qt56x: FRNAVDEV01 jenkins_frinavci_Haswell-NUC_shared-tool_description.w64-vc14-qt56x: FRIjenkins04 jenkins_frinavci_Haswell-NUC_Tools-iso_c_simulator.w64-vc14-qt56x: FRNAVDEV01
I'm going to attach a screenshot of the SCM configuration next.
It's been a while since I looked at the host feature - so a quick look at the code (AbstractTask):
The setEnvironment method is called every time the workspace is used (that could be for checkout, cleanup, publish, etc...) there is a remote task to evaluate the host 'getHostName(buildWorkspace)', perhaps Jenkins is executing this on a different host? The simplest option to fix this is to use the 'nodeName', however the user MUST set the node name the same as the host (I know that seems obvious, but you would be amazed at what some users will configure).