Can ECTool kick off Hudson Jobs? - interop

I am looking for a way to run Hudson jobs from an Electric Commander pipeline, I know it doesn't make much sense. We are migrating from a Hudson box to Electric Commander and cannot migrate all of the jobs immediately. I have read that ECTool can run Hudson jobs and get the info back within the same pipeline
http://www.electric-cloud.com/blog/2012/05/01/pushing-information-from-external-systems-into-electriccommander/
I can't find what exactly I need to do to kick it off though any tips?
Thanks
Additional Info
I have been studying http://docs.electric-cloud.com/commander_doc/4_2/Help_4_2_3/usingapi.htm and also playing around in the EC command line, I think I need to make a bash file to call the Hudson jobs but I am not sure where to start

The Jenkins plugin at http://plugins.electric-cloud.com/ will work for Hudson as well, I didn't know that

Related

Configure CruiseControl.NET with SonarQube

The project I currently work on uses CruiseControl.NET 1.8.4.0 and I want to integrate it with SonarQube. This is the only information I found about this here and I could not make it work.
Could someone please enlighten me how can this be achieved.
I know nothing about sonarqube but I know a lot about cruisecontrol. Cruisecontrol.net is just a queue that runs tasks. All the actual work in the tasks is done by things other than ccnet for example msbuild, nant, etc. So I'm guessing your situation is similar where ccnet is the outer queue which runs tasks and sonarqube needs to be one of those tasks ccnet runs.
I don't know how sonarqube runs but maybe it can be run through the exec task in ccnet. This allows ccnet to run any executable assuming sonarqube is an executable.
ccnet exec task
The docs link you posted looks like it's running something on linux. Also, the "CruiseControl" the doc page references may very well be the Java Cruisecontrol(Java CruiseControl (runs on linux))
The first thing to answer is, are you really dealing with cruisecontrol.net? Or is it actually java cruisecontrol for linux? They are different tools although they share the same origin.

How to trigger a batch file after successful Maven Build?

I am new to Maven build. Can some one let me know if there is any way we can trigger a job which will run a batch file after successful completion of build in Maven?
Since you didn't provide details on how you are invoking maven, I'm going to just assume some things.
Continuous Integration: If you are using some kind of continuous integration like Jenkins/Hudson, or Travis CI, you should be able to add your batch file as a post-build step that gets executed on success of the build. Alternatively, you could have a separate job that runs your batch script that gets kicked off by the maven build's job.
IDE Configuration:
If you are trying to do it with Intellij or some IDE, you will likely need to make a batch configuration that runs your maven build and then your desired post-build batch file.
Command line/mvn directly:
If you are running this by yourself on the command line using normal mvn install commands, you are either going to want to circle back to having a batch file that kicks off maven for you and then runs your next script, or look into a plugin similar to this question (Note that there are some concerns with this approach, so be careful).
If none of these scenarios describe your situation, you are going to want to provide more information to your question before you get any solid feedback.
Thanks!

Jenkins to oracle

How to configure Jenkins to run Query (select, Update) on Oracle database,
Is there any plugin available in Jenkins?
Is there any easy way to write script in python?
Jenkins is a Continuous Integration (CI) tool. It is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
Is there any plugin available in Jenkins?
As far as i know, there are no plugins for the type of job you're looking for. However, it does provide you a mechanism to run your own scripts by using various options present in Build section such as running a Win batch script, shell script, perl, python, ant commands etc...
Is there any easy way to write script in python?
If you understand the language well, then yes!
This link might be of some interest: http://176.34.122.30/blog/2009/05/18/continuous-integration-with-oracle-plsql-utplsql-and-hudson/
Plugin to run Sql on Oracle database in Jenkins:
https://wiki.jenkins-ci.org/display/JENKINS/SQLPlus+Script+Runner+Plugin

Best practices for versioning Hudson settings

We're using Hudson continuous integration server frequently on projects. But Hudson seems lacking of proper versioning of the jobs configuration.
A few times, this has lead to problems: Somebody changes or tweaks the configuration on jobs and something that used to work stopped working.
I have tried to version-control jobs on my local Hudson server (on my laptop). But this is not optimal: 1) it's only for me. 2) i need to mirror jobs from a central build server – and may also need to modify them to work locally. 3) It's pretty cumbersome to setup .gitignores for files to ignore.
As far as I know, there is no way in Hudson to view change history of jobs, and no plugin does it either.
Also, there seems to be no way to export/import settings.
So the question is: How do you keep track of changes? Both in jobs and in general setup of Hudson?
See Which part of HUDSON_HOME should I put under source control?
The Audit Trail plugin might be useful to you too if people are breaking configurations and you're having trouble tracking it down.
Here is another option that I just found:
JobConfigHistory

Configuring Rational Functional Tester (RFT) to run in Hudson/Jenkins

I've just installed Hudson and it is running beautifully. It builds, runs JUnit-tests and also CheckStyle analysis.
Next step for us would be to create an installation, install it and then run automated tests on the actual installation. I would then like to fail the build if the tests fail or at least publish the results somehow. I think we would set it up so that part runs periodically or manually triggered.
We use InstallAnywhere for installation and IBM Rational Functional Tester for automated tests.
So questions are: anyone created a similar setup? are there any plugins, tutorials or other resource that could help me along. Or do you have any tips or advice in general.
The command line reference for Rational Functional Tester:
http://publib.boulder.ibm.com/infocenter/rfthelp/v8r0m0/index.jsp?topic=/com.ibm.rational.test.ft.doc/topics/RobotJCommandLine.html
Sample command for running a test:
java -classpath "C:\IBM\RFT\FunctionalTester\bin\rational_ft.jar"
com.rational.test.ft.rational_ft -datastore \\My_project\AUser\RobotJProjects -user admin -project
\\My_project\AUser\TestManagerProjects\Test.rsp -build "Build 1" -logfolder "Default" -log
"Al_SimpleClassicsA#1" -rt.log_format "TestManager" -rt.bring_up_logviewer true -playback
basetests.SimpleClassicsA_01
An additional note, you'll want to configure windows properly on your agent machine which will be running the tests. This is not advice specific to Hudson or RFT, but rather all GUI automation tools on Windows. RFT will require an interactive desktop environment for it to be able to click buttons, etc. If you have your Hudson agent running as a Windows service, there will be no desktop. See the following: Silverlight tests not working unless RDP connection open
We have run a fairly complicated distributed build on Hudson, it is a process that basically follows:
Test on Windows.
Test on OSX, run code coverage & push results to server.
Test on OSX Tiger.
Package for OSX Leopard & push build to server.
Package for Windows & push build to server.
Update product website.
We don't use InstallAnywhere or Rational Functional Tester, but have similar sorts of mechanisms in their place. The key we found to making it all sing in Hudson was being able run our various steps from the command line. Maven and appropriate plugins made short work of this task. So my advice would be just that, using whatever build tool you are using (ant, maven, ?) configure them so that you can run your rational functional tester and install anywhere from the command line with a simple goal passed to your build tool (i.e. mvn test or mvn assembly:assembly).
After that, make sure whatever machine Hudson is running on has everything installed (i.e. Rational Functional Tester) and configured, so that you can open up the command line and type in the goal and have your tests correctly execute.
Hooking it up in Hudson from that point on is fairly simple - just pass in the goal when you configure the build.
I believe the best answer is that integrating RFT with Hudson/Jenkins is a useless endeavor.
As this IBM FAQ says, to make RFT work you must:
be logged in the machine;
the screen can't be locked;
if you are remotely connected, you can't minimize the connection screen.
So you can't run Jenkins/Hudson as a service, making it not very useful. You must run it from your logged account. If you are in a corporate computer (very probable if you are using RFT), you probably must use a hack to prevent the screen saver to start. If the screen is locked, your tests will always fails.
It isn't very difficult to configure your tests to run from the command line, you just have to take care of the return codes when the tests fail and succeed.
Jenkins/Hudson would also give you some advantages, like integrating the tests with your version control, probably automatically running the tests when a commit is made. It would also help sending emails when the tests fail.
But you still would have to integrate the RFT logs with some kind of JUnit plugin to have a nice report. You also would have to have script to run the tests using the command line.
I think it is not worth the trouble to use an continuous integration server with RFT. Better just have your tests running every day in Windows Task Scheduler. It is a simpler solution with less failure points.
Or use my final solution: quit RFT and use the free Selenium with a headless web driver.
I have some general advice on this because I have not yet implemented this myself.
I am assuming you want to have Hudson run the RFT scripts automatically for you via a build or Hudson process?
I want to implement something similar in my organisation as well.
I have not yet been able to implement this because of organisational constraints but here is what I have thought out/done so far:
Downloaded Windows process viewer, got the command for running the tests.
Made shell Script out of it, separated out the variables etc
The future plan is to setup a Windows Slave machine which would have all the tools in it that would be required once the Tests are kicked off, for eg. the correct versions of browsers, and environment variables, and other tools that are required.
Hudson would kick off a process which runs the shell scripts created which runs all the RFT Scripts and performs necessary operations on the slave machine.

Resources