PUSHING THE LIMITS OF LABVIEW Fire and Forget: Bulletproof Builds Using Continuous Integration With LabVIEW Omar Mussa JKI Senior Engineer & Professional Services Manager http://xkcd.com/974/
May 21, 2015
PUSHING THE LIMITS OF LABVIEW
Fire and Forget:Bulletproof Builds Using Continuous Integration With LabVIEW
Omar MussaJKI Senior Engineer & Professional Services Manager
http://xkcd.com/974/
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
2
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
3
PUSHING THE LIMITS OF LABVIEW
Continuous Integration In Action
4
Image via: pasukaru76 with Creative Commons
FIRE!
Image via: Esparta Palma with Creative Commons
Let’s start with a demo!
PUSHING THE LIMITS OF LABVIEW
What is Continuous Integration?
End to end automation of your build and release process...
5
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
6
PUSHING THE LIMITS OF LABVIEW
About Jenkins
Open Source (Est. ~2007)Many usersMany pluginsSome learning curve but overall easy to useHas GUI
7
PUSHING THE LIMITS OF LABVIEW
What Problems Does Jenkins Solve?
Build Triggering (Web Hooks or SCC Polling) Build Execution Order (Build Pipelines, etc) Build History Unit Test History Build Failure Notification
8
PUSHING THE LIMITS OF LABVIEW
Poking around in Jenkins
Let’s take a look around ...
9
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
10
Image via: http://xkcd.com/303/
PUSHING THE LIMITS OF LABVIEW
Build Planning
Q. When do we start making builds of our project?A. As early and often as possible.
11
PUSHING THE LIMITS OF LABVIEW
LabVIEW Build Types
Lots of deliverables can be built using LabVIEW
12
Package PPL Source Zip
EXE Installer DLL
PUSHING THE LIMITS OF LABVIEW
LabVIEW Build Process
Typical LabVIEW Build and Release Process
13
PUSHING THE LIMITS OF LABVIEW
LabVIEW Build Process using CI
Typical CI Server Automated Build Process
14
PUSHING THE LIMITS OF LABVIEW
Direct Business Value Benefits
15
PUSHING THE LIMITS OF LABVIEW
Voila!
Our demo build server revisited ...
16
PUSHING THE LIMITS OF LABVIEW
Basic Build Automation Development
17
Image via: http://xkcd.com/303/
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
18
PUSHING THE LIMITS OF LABVIEW
LabVIEW from the Command Line
Easiest way to call LabVIEW Build VIs is via command line!
Use Batch File from CI Software Requires some design considerations
Forcing batch file to wait for build to complete Error handling
19
PUSHING THE LIMITS OF LABVIEW
LabVIEW from the Command Line
Calling LabVIEW.exe from the command line... LabVIEW can only receive one set of command line
parameters per call LabVIEW must be closed before new build is started [ProgramFiles]LabVIEW.exe “[path to VI]” -- [user
arguments] Build VI must be set to “Run When Opened”
20
PUSHING THE LIMITS OF LABVIEW
LabVIEW from the Command Line
Use Application Property node to read command line arguments
LabVIEW is ALWAYS the 0th element
Best Practice Pass the build number to your build VI
21
PUSHING THE LIMITS OF LABVIEW
When Builds Break ...
Demo of package build server error detection
22
PUSHING THE LIMITS OF LABVIEW
Build Design Considerations
Separate project build steps for pipeliningSeparate project build steps for distributing buildsAvoid SCC commits within build workspaces during build process
Only want to trigger builds from developer commits, not from build process itself
Generally means that build number is passed to build process (via Jenkins)
Avoid development on build server itself
23
PUSHING THE LIMITS OF LABVIEW
Build Time Considerations
CI Server Impact on Short Build Times Fast feedback to developer isolates debugging Platform for unit test execution
CI Server Impact on Long Build Times Builds are still run ~daily Not ‘stuck’ at end of project with broken build Frees up a lot of developer time that would otherwise be
wasted waiting for builds to execute.
24
PUSHING THE LIMITS OF LABVIEW
JKI’s Continuous Build ToolChain
25
JKI VI Tester
PUSHING THE LIMITS OF LABVIEW
Questions
Questions?Thank you for participating!
26
PUSHING THE LIMITS OF LABVIEW
Need Help?
Let JKI build your CI system.Automated Build VIs
Source Code Control IntegrationUnit Test Design
Cloud-hosted Build ServersJenkins Setup, Integration, and Maintenance
Reliable, Repeatable, Secure.27
PUSHING THE LIMITS OF LABVIEW
Contact Us
jki.net /contact
28