From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting started with Jenkins using SVN

Dear All,

I'm trying to get the office set up using Jenkins for continuous integration (using the SCM: TortoiseSVN). After following the tutorials by Ryan Spark (NI), I'm not totally sure about how I should be using the autobuild.csv file or what the build.bat file does (within the build configuration in Jenkins).

 

I want to use Jenkins for CI, so I can continuously run my unit tests.

 

Could anyone shed some light on this?

 

Thanks in advance,

Tom 

0 Kudos
Message 1 of 10
(7,910 Views)

I've been using Tortoise SVN (as have many of us) in my LabVIEW Development Work (and also other non-LabVIEW things) for about 8 years.  I've never heard of Jenkins, don't know the tutorial by Ryan Sparks (provide a reference?), and don't understand the question you've raised (nor, for that matter, the abbreviations).

 

If someone else with more specific knowledge doesn't provide a satisfactory answer, consider posting a reply that provides more information to go on.

 

Bob Schor

0 Kudos
Message 2 of 10
(7,861 Views)

Jenkins is an automatic build system/environment: https://en.wikipedia.org/wiki/Jenkins_%28software%29

 

it is used to create consistent builds (rather than finding that you are missing dependency xyz from person ABC's software). Nightly builds is also a good application of Jenkins. The build server can be configured to automatically check out a change from svn, build it and tag it thus creating a clean paper trail..

 

I haven't done it and don't know how but I know it's possible to use Jenkins with LabVIEW builds and SVN as one of our CLAs has previously looked into this (knowing him, he's probably going to reply next ;)).

 

Best regards

 

Mathis

0 Kudos
Message 3 of 10
(7,842 Views)

I've seen a few presentation from people who use Jenkins to automate tests but I'm not a user myself.

 

Have a look here.

 

And just in case, Luc is very active on the french section of the forum 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 10
(7,812 Views)

Not related to your automation question, but just wanted to mention that there is a toolkit called Viewpoint TSVN Toolkit I believe (just search 'tsvn' in VI Package Manager) which adds some SVN functionality to the LabVIEW Project Explorer. It overlays icons on all your VIs to tell you if they are up to date, and you can commit right from the Project Explorer.

0 Kudos
Message 5 of 10
(7,805 Views)

sorry to hijack the Jenkins discussion, but be carefull with the ViewPoint TSVN tool, it is indeed great but it slows down the LabVIEW IDE a lot!

 

What I do when I install a new LabVIEW is install it the VP TSN tool, launch LabVIEW, let the tool configure TSVN so it works fine with LabVIEW (actually it configures TSVN to use LVDiff and LVMerge) and then I uninstall the VP TSVN tool to keep my IDE responsive.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 6 of 10
(7,785 Views)

Yeah, I had a look at using Jenkins for automated builds in VMs but in the end, given the size of our team, it just wasn't worth the effort as we had other areas to focus on but it did teach me a lot about our build process and I've incorporated lots of the things I learnt into my processes. 

 

Jenkins is basically just an automation tool for automatically building 'software' - you can configure it to do nightly builds, or trigger a build each time the software is updated (e.g. in SVN/source control). It does the build through a command-line interface - so that's what the batch file is for - it launches LabVIEW to run a 'build' VI - this is the VI that runs through your build steps - such as:

 

- check out code from SVN

- update/check any libraries

- run unit tests

- run your build specifications (e.g. executables / installers)

- update version numbers

- zip the project

- tag in source control

- etc. etc.

 

I found a VI called 'one step build' - it's similar to this one that Google threw up: http://blog.jki.net/jki/can-you-build-your-application-in-one-click/

 

Once you've got to the stage where you can do a 'one click build' (the 80% of effort), it's then relatively straightforward to automate it in Jenkins (the 20%). The Jenkin's part does the job of collecting the results of the tests and tells you whether the build was successful etc.

 

The 80% gives you good configuration management (being able to check-out and build with the same code/libraries without errors) and didn't really feel that the extra 20% was worth it (for our circumstances).


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 7 of 10
(7,745 Views)

Hi Sam_sharp,

I've been out of the office this week, so I'm sorry for the slow reply.

Thanks for your responce. I've mannaged to get the build.vi (by JKI) working. However, I'm unsure about the autobuild.vi / How to actually get the build.VI to run my unit tests.

 

Tom

0 Kudos
Message 8 of 10
(7,642 Views)

Just add in a step that calls the VIs from the unit test framework:

2016-02-19_11-42-30.png

 

The autobuild.vi is just the same as the build.vi except that it should be set to 'run automatically when opened' so that when you call something like "LabVIEW.exe <my project path>\autobuild.vi" (e.g. from jenkins or your batch file) it automatically kicks off the various build steps.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 9 of 10
(7,628 Views)

Hello,

 

Most of Jenkins build’s doesn’t require to upload a CSV file, but some of the builds required approvals for one stage to another stage. 

 

For more details: https://medium.com/@rrvudumula/upload-a-csv-files-in-jenkins-pipeline-job-a46f819ccb96

 

Please check above link, I hope this link also help you.

 

Thanks & Regards,

Anita

0 Kudos
Message 10 of 10
(3,446 Views)