07-03-2018 12:24 PM
I'm working on developing a build pipeline for LabVIEW projects and have reached the point where I can build a LabVIEW project from a batch file or windows cmd. The process is pretty simple. I'm calling some LabVIEW code from the LabVIEW engine that will build the project. The process works from within a batch script but the second I put the contents of the batch file into the jenkins build step it fails with the message.
'--' is not recognized as an internal or external command,
operable program or batch file.
The contents of the batch script are as follows:
@echo off
%LabVIEW17% %pBUILD% -- "<path to my project>.lvproj"
Where %LabVIEW17% is the path to the LabVIEW.exe and %pBUILD% is the path to the LabVIEW code that builds projects. The format is based on some information I found here: http://www.ni.com/example/30051/en/
Why would '--' fail from Jenkins and not from cmd or a batch file? What is the purpose of the -- input?
07-03-2018 06:18 PM
Hello Jake,
Sorry this is not a direct answer to your question. But may save you time.
The white paper you are referring to is 7 years old and there are shortcomings with that approach. The obvious one being lack of StdIn/Out and exit code support natively in LabVIEW. So passing results back to Jenkins would be a pain in the neck.
We did a presentation this NI Week & European CLA Summit which uses a shared library (includes most tasks such as LabVIEW build, Unit Test execution etc) by NI Systems Engineering and a LabVIEW Command Line Toolkit by Wiresmith Technology.
This presentation focuses on Jenkins Declarative Syntax for your pipeline.
Here is a link to the presentation: https://learn.ni.com/center-of-excellence/resources/1167/ci-and-deployment-zero-to-cont-delivery-usi...
I think there is a video of the presentation somewhere, I can dig it up if it is of interest.