Suite of common continuous integration steps for the LabVIEW Command Line Interface tool published by Wiresmith Technologies.
This library installs a set of LabVIEW VIs that can be invoked by the LabVIEW-CLI tool to perform the following steps:
*: Requires JKI VI Package Manager Pro license
A set of groovy scripts for use in Jenkins Pipelines is also included for reference, showing an example wrapper function for each step VI. These groovy scripts assume that the install location for the LabVIEW steps (C:\Users\Public\Documents\National Instruments\LV-CLI Common Steps\steps) has been mapped to the L:\ drive, to simplify the scripts.
Source code is available at: https://github.com/LabVIEW-DCAF/buildsystem/tree/lv-cli
VI Package available at: https://github.com/LabVIEW-DCAF/buildsystem/releases
Supports LabVIEW 2014 and later.
I use James' LabVIEW-CLI tool with gitlab CI, so if anyone is stuck there I might be able to help out.
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
I'm using these Groovy files as the basis for a shared Groovy library for use in the Jenkins Pipeline that builds the Distributed Control and Automation Framework (ni.com/dcaf) project. The Groovy methods can be directly used by your own pipeline by installing the Jenkins Shared Groovy Libraries plugin and pointing your Jenkins to import the lv-cli branch of the DCAF buildsystem repository (https://github.com/LabVIEW-DCAF/buildsystem).
Matt, are you attending NI Week? If so, I'd really like to stop by and say hello.
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
Of course! I'll be there all week, Monday - Thursday. Also going to the LAVA BBQ on Tuesday.
Great, I'll be there from Tuesday to Thursday, and I'm also going to the LAVA BBQ. Is there a way to find you at the venue?
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
Can anyone help me?
I try to configure CI process using LabView and Jenkins. labview-cli is stucks on Waiting for connection.
I tried to run echo.vi manually and get the same result.
Can you help/ What I do wrong?
That looks like one of two issues: either the file cannot be found (and thus nothing is opening the TCP port), or you have a firewall blocking the port on your computer preventing LabVIEW from talking to the command line utility. I expect to see an error of the form "no such file" if you give it a bogus path (confirmed on my system). Also confirmed that it is happy with being called from another drive.
Can you verify that there is no firewall active on your computer, or if there is that the necessary ports are opened?
Just to be sure, you should check that you're using the latest version of the command line utility (the good folks at Wiresmith put out a bug fix version a few days ago: https://github.com/JamesMc86/LabVIEW-CLI/releases ).
If you can't get it to work calling your own simple VI, try asking the folks who made the utility on their Github page (linked above).
You were right the problem was in the file path.
I expected that path relative to the Jenkins workspace is fine.
Was wrong, thanks a lot.
Can you help me once more?
Is this error related to my Labview installation or this is a configuration issue?
As I understand a vi file is missing.
You need to install an additional VI Package. It should have been pulled in as a dependency of the CLI Common Steps package.
Here is the link: vipm://ni_lib_utf_junit_report
Hello everyone,
First of all, I want to thank you for sharing this material. It seems to be a really elegant solution for CI.
I've been trying to integrate CLI in my CI workflow. Local test is working, but when I try to call CLI from a pipeline, console log show the following error "labview-cli command unknown". It seems that the pipeline call the bat with a different user or privilege.
Any idea to fix that ?
Thanks in advance.
Hi Olivier,
We change the PATH in system to make this work so the user shouldn't be important.
First test will be to see if it will run if you just open a command line. Can you check that it does?
If you already have a console open then the update is missed. Not sure if it is the same for applications. Please ensure you have restarted the Jenkins app after installation. Another possiblity is if Jenkins is not running as a user - again I would hope installing to system would solve this but if not try creating a jenkins user for the service to run as to see if that fixes it.
Hopefully that gives a few ideas but let me know if it still doesn't work.
Hi James,
Thanks for your quick reply.
First, CLI works well in a command line.
The error occurs when CLI is called by the pipeline.
I've changed Jenkins service configuration to run with the same user as command.exe but I'm still having the error...Really strange behavior
Note that I try "basic" commands and they worked...
I'll continue to test...
Thanks again for your assistance.
Olivier, I see that you‘re working with Jenkins. I have no experience with that, and I guess you‘re already found the best source for help (James).
Good luck!
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
If you go to /systemInfo (e.g. http://jenkins/systemInfo) on your server we can check the path variable it is seeing. See the attached screenshot - do you see a LabVIEW CLI directory in there?
Good catch James !
2 things I figured out :
Will see how to fix that tonight. Think it's going to work.
I'll keep you posted.
Thanks !
It works !
After restarting the jenkins slave, it finally accept the command.
Thanks for your help James. I'll continue to dig into CLI for my CI workflow.
I'll keep you posted about my success.
I'm confused!
I've followed the steps in the Getting started guide at (https://github.com/LabVIEW-DCAF/buildsystem). Running the first echo test with Jenkins worked fine the first time.
Now, after trying th eJenkinsfile approach, I can't seem to get any batch commands to run. I can do a simple "echo "Hello World". But trying to invoke labview-cli only hangs:
Started by user anonymous [Pipeline] node Running on master in C:\Program Files (x86)\Jenkins\workspace\echo test [Pipeline] { [Pipeline] bat [echo test] Running batch script C:\Program Files (x86)\Jenkins\workspace\echo test>labview-cli --lv-ver 2016 --kill "L:\echo.vi" -- Hello
The # of executors was no longer set to 0. Probably I had accidentally changed the property
Hi,
Two months back, we started LabVIEW Jenkins CI automation. Now currently we running into an issue.
What happening is the the following:
1. I trigger the build and the source update via AccuRev(No problem).
2.Build.bat executes, it is hanging there only until we abort. But it is working fine in the local server.
Yesterday we changed the Jenkins user account, after that it worked fine for two builds and then again the same above issue came back, it is hanging in Jenkins, but it working in the windows server.
I observed that, when I build locally in the server in the the task manager LabVIEW use 25% CPU and 10 lakh kb memory, but when I trigger throw Jenkins at one point CPU % went to 0 and memory is hanging 1 ***** digit KB.
It would be great, if you can help on this. we get stucked her. Please help us.