Jump to content

LabVIEW Build - CI Integration with Build Server


Recommended Posts

Hello all,

 

I am trying to integrate our LabVIEW build workflow into our CI Server. Currently we have several builds in LabVIEW projects that we can programmatically call in order to perform the build, conduct unit testing etc. using the IDE.

 

I'm looking to integrate this into our build server using TeamCity. Every time we check in changes to one of the projects a build is triggered. Since building requires the IDE running, I am attempting to use the Command-line Runner in TeamCity to execute a batch file that launches the IDE with the builder VI as an argument. The build VI performs the builds, testing and then shuts-down LabVIEW.

 

Running the batch file manually (as me) works a treat - LabVIEW starts up, the builds occur, unit test results are captured and then the IDE shuts-down. However I have run into a problem getting the batch file automatically called by TeamCity. The build agent runs as a windows service and it appears as if windows services do not have permissions ordinarily to start up GUI applications. I have tried several options such as configuring the log-on account for the service to run etc. Every time the build occurs, the log shows that the batch file has been run but LabVIEW does not start up.

 

Unfortunately there is no command-line version of LabVIEW (pity) so it appears as if there is no obvious way to get this to work. Has any-one attempted this before? I know guys at JKI pull this off (using a different CI server) and I'm wondering whether this issue is familiar to anyone.

 

Thanks for any and all help.

 

 

Link to comment

I presented on this topic and it was posted here:

http://blog.jki.net/news/niweek-2012-fire-and-forget-bulletproof-builds-using-continuous-integration-with-labview-video-slides-now-available/

 

You can debug a windows service by making the UI visible and seeing what is blocking the app from running this way:

administrative tools -> services -> right click -> goto properties -> under Log On tab check allow to interact with desktop

 

That should help.

Link to comment

Hi Omar. Thanks for your response - yes I read your presentation thoroughly!

 

I have tried previously adjusting the service's rights to interact with the desktop but it was still no go. I can only think that some other policy is blocking my ability to do this. Given we have a VLA and are checking out development licenses from the server rather than a local license I had wondered whether it was this activity that was being blocked in this scenario.

 

I have ended up running the TeamCity agent as an application rather than a service; things work fine this way. It's not ideal but would welcome any other ideas.

 

PS. Any idea when VI Tester will be updated to LV2012++? Nudge, nudge!  :shifty: 

Link to comment
Hi Omar. Thanks for your response - yes I read your presentation thoroughly!

 

I have tried previously adjusting the service's rights to interact with the desktop but it was still no go. I can only think that some other policy is blocking my ability to do this. Given we have a VLA and are checking out development licenses from the server rather than a local license I had wondered whether it was this activity that was being blocked in this scenario.

 

I didn't use the VLA with my CI Servers so that could be the issue.  If any dialog was blocking the execution, then you're basically stuck if LabVIEW is running as a service with no UI.

 

I have ended up running the TeamCity agent as an application rather than a service; things work fine this way. It's not ideal but would welcome any other ideas.

 

PS. Any idea when VI Tester will be updated to LV2012++? Nudge, nudge!  :shifty: 

 

 

Re: VI Tester, check out the LabVIEW Tools Network - you might find a nice surprise ;)

Link to comment

Thanks Omar. Further investigation seems to indicate that pulling network licenses is what is causing the issue. Oh well, running the agent as an application will work for now.

 

 

I didn't use the VLA with my CI Servers so that could be the issue.  If any dialog was blocking the execution, then you're basically stuck if LabVIEW is running as a service with no UI.

 

 

 

Re: VI Tester, check out the LabVIEW Tools Network - you might find a nice surprise ;)

 

I see a fix there for template instantiation, nice! I'll check it out. I confess I had actually lost a little faith and ended up building my own unit test framework with some similarities to VI Tester (ie based on xUnit) solely so that we could run on 2012+ and get the benefits of a leaner framework for CI rather than NI's UTF. But I would always rather use a tried and tested tool. Just an FYI this is the sort of tool we would happily pay money for!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.