05-11-2016 10:46 AM
Hey Ajay,
Glad you're interested in CI with LabVIEW!
The error you're getting is interesting, although I'm wondering if it might be a red herring caused by other errors from the parameters you're providing. A couple key items to point out:
Moral of the story, give the getting started guide another glance, try running your Jenkins build only calling the batch file (no parameters), and open the batch file for more information on the parameters themselves. And, as always, post back if you have more questions
Thanks!
--Ryan_S
05-12-2016 03:46 AM
Ryan_S,
Thanks for the detailed inputs. I followed your moral of the story and I am able to build my sample project now. I have few questions though
Thanks,
Ajay.
05-12-2016 05:30 AM
Hi Ajay,
Ajayvignesh_MV schrieb:
- After the build is done, I would like to commit the project changes with an SVN log from Jenkin. Is it possible to do it in Jenkin? What's the purpose of post-commit SVN hook files in you github?
What is the purpose of commiting back into SVN? Your build job is not really changing your project. Or are you referring to the infomation being altered during build by LabVIEW?
05-12-2016 08:26 AM
Hi Oli,
I have auto increament of my build versions. Based on the build version number, I'm also changing the folder to be build destination to be updated using [Product Version] tag. Thus, all these changes in my project file has to be committed back to SVN. Only then, my following build will have the right version numbers. Unless I commit back, all my build will have same version numbers.
Thanks,
Ajay.
05-12-2016 09:03 AM
Hi Ajay,
thanks for the clarification. I'm using a slightly different approach: automatic builds are performed on branches, so I don't really care about the build version of the project there. After merging into the trunk I would build my trink manually to create the release version with the correct revision in the lvproj file.
I'm not yet into Continous Delivery.
Sorry, at the moment no further hints than checking the internet or the Jenkins book.
Cheers
Oli
05-12-2016 11:01 AM
Hmmm.. In my case, I run the agile-sprint for couple of weeks and each day some bugs get fixed... To test it in subsequent day, I need to build the application everyday. Based on the testing and bug fixes again in following day, the the building process cycles, and this happens through out the sprint. Each day's build is differentiated using the build version number... Yesterday would be v1.1.6 and today's would be v1.1.7. My team always works with the main trunk version and we haven't started branching process in svn. However, for each day's build like this, as a Continuous Delivery, it would be likely that LabVIEW project file get changed on every build.
🙂
Ajay
05-12-2016 11:53 AM
Ajayvignesh_MV wrote:
Each day's build is differentiated using the build version number... Yesterday would be v1.1.6 and today's would be v1.1.7.
I hope you mean 1.1.x.6 and 1.1.x.7 where the fourth number is the build number. The third number should be reserved for fixes.
Although you could submit it back to version control, it's not necessary. Instead, use the build number assigned by Jenkins. This build number is an environment variable that you can either pass into or obtain from within your build scipt. Use this number and overwrite whatever build number is in the build spec. You can do this through the application builder API functions.
05-12-2016 12:59 PM
Ching-Hwa Yu,
That looks to be nice idea... I could use that for auto-incrementing my build. I need to work on the VI's provided by Ryan_S in order to achieve it. Also, I can modify the VIs to avoid saving the project & VIs which can help solving my other problem "svn:needs-lock". One question though, how can I pass or get build number from Jenkins using environment variables.
05-12-2016 01:20 PM
Ajayvignesh_MV wrote:
One question though, how can I pass or get build number from Jenkins using environment variables.
I believe the EnvInject Plugin is now part of with the standard installation of Jenkins. As the name implies, this allows you to prepare a clean environment and inject specific variables into the build. You can view your system's envrionement variables at https://URL/env-vars.html/. BUILD_NUMBER is the variable you'll need to use.
05-13-2016 11:30 AM
Hey Ajay,
Glad to hear that it works! As for your questions, it looks like you've already gotten some good feedback from the community but I figured I'd add my 2 cents:
--Ryan_S