Continuous Integration

cancel
Showing results for 
Search instead for 
Did you mean: 

Setup CI and Jenkins LabVIEWCLI /G-CLI not working yet

Solved!
Go to solution

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

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 1 of 2
(1,128 Views)
Solution
Accepted by topic author James_W

(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

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 2 of 2
(310 Views)