NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW
-
Upload
jki -
Category
Technology
-
view
6.554 -
download
2
description
Transcript of NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW
![Page 1: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/1.jpg)
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/
![Page 2: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/2.jpg)
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
2
![Page 3: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/3.jpg)
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
3
![Page 4: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/4.jpg)
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!
![Page 5: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/5.jpg)
PUSHING THE LIMITS OF LABVIEW
What is Continuous Integration?
End to end automation of your build and release process...
5
![Page 6: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/6.jpg)
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
6
![Page 7: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/7.jpg)
PUSHING THE LIMITS OF LABVIEW
About Jenkins
Open Source (Est. ~2007)Many usersMany pluginsSome learning curve but overall easy to useHas GUI
7
![Page 8: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/8.jpg)
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
![Page 9: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/9.jpg)
PUSHING THE LIMITS OF LABVIEW
Poking around in Jenkins
Let’s take a look around ...
9
![Page 10: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/10.jpg)
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/
![Page 11: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/11.jpg)
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
![Page 12: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/12.jpg)
PUSHING THE LIMITS OF LABVIEW
LabVIEW Build Types
Lots of deliverables can be built using LabVIEW
12
Package PPL Source Zip
EXE Installer DLL
![Page 13: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/13.jpg)
PUSHING THE LIMITS OF LABVIEW
LabVIEW Build Process
Typical LabVIEW Build and Release Process
13
![Page 14: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/14.jpg)
PUSHING THE LIMITS OF LABVIEW
LabVIEW Build Process using CI
Typical CI Server Automated Build Process
14
![Page 15: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/15.jpg)
PUSHING THE LIMITS OF LABVIEW
Direct Business Value Benefits
15
![Page 16: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/16.jpg)
PUSHING THE LIMITS OF LABVIEW
Voila!
Our demo build server revisited ...
16
![Page 17: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/17.jpg)
PUSHING THE LIMITS OF LABVIEW
Basic Build Automation Development
17
Image via: http://xkcd.com/303/
![Page 18: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/18.jpg)
PUSHING THE LIMITS OF LABVIEW
Continuous Integration with LabVIEW
What is Continuous Integration?What is Jenkins?Build Automation ProcessConsiderations for LabVIEW Build Automation
18
![Page 19: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/19.jpg)
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
![Page 20: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/20.jpg)
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
![Page 21: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/21.jpg)
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
![Page 22: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/22.jpg)
PUSHING THE LIMITS OF LABVIEW
When Builds Break ...
Demo of package build server error detection
22
![Page 23: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/23.jpg)
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
![Page 24: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/24.jpg)
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
![Page 25: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/25.jpg)
PUSHING THE LIMITS OF LABVIEW
JKI’s Continuous Build ToolChain
25
JKI VI Tester
![Page 26: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/26.jpg)
PUSHING THE LIMITS OF LABVIEW
Questions
Questions?Thank you for participating!
26
![Page 27: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/27.jpg)
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
![Page 28: NIWeek 2012: Fire and Forget / Bulletproof Builds Using Continuous Integration With LabVIEW](https://reader034.fdocuments.us/reader034/viewer/2022052505/555da8d3d8b42a257b8b5d31/html5/thumbnails/28.jpg)
PUSHING THE LIMITS OF LABVIEW
Contact Us
jki.net /contact
28