04-07-2022 09:15 AM
command line setup.
Jenkins script working and echoing out a command which works when I paste it into the cmd line on the VM.
however if I run it from Jenkins it launches LabVIEW, hangs and then closes it again.
don't know what I've done wrong here I've already set the INI tokens from here Best Practices on How to Use LabVIEW with Jenkins Continuous Integration - NI and updated the timeouts as defined here Solved: NI LabVIEW CLI won't start LabVIEW VI Server fast enough - NI Community.
groovy script in the step is basically:
script {
def CLI = 'LabVIEWCLI -LabVIEWPath "'+"${LVPath}"+'" -PortNumber '+"${Portnum}"
def CLIprebuild = ' -OperationName RunVI -VIPath '+'"'+"${PROJFOLDER}"+'\\Application Build\\CMDLine_Write_Conditional_Project_Symbols.vi'+'" "/Project:'+"${PROJFOLDER}"+'\\'+"${ThisProj}"+'"'
def Devargs = '/Symbol:Dev" "/Value:True"'
echo CLI + CLIprebuild +' "'+ Devargs
bat CLI + CLIprebuild +' "'+ Devargs
}
What have I missed please?
Cheers
James
Solved! Go to Solution.
03-06-2024 03:23 AM
(For when I come back and have this issue again) or for others...
It was really simple when I knew what was going on.
LabVIEW , the LabVIEW CLI and GCLI seem to need to be run under a specific user.
setting the jenkins instance (service) = agent if building remotely or the main jenkins service if building with the built in node (on Windows ) to "Log on as:" This account and specify a local user with username and password rather than the local system account.
- Seems to be a side effect of running batch scripts on windows through Jenkins