Automate Maven Scripts - maven

I have a series of Maven Scripts which are to be run in Linux Platform for doing Reversion and Lableing for my Project. I would like to know what Building Tools i can use to automate the Maven Scripts in the Linux Platform?
Also say suppose I have got some error while doing the Reversioning / Lableing of the code. How can the Automate tools Handle these scenarios.
Please let me know of the effective tools and I would certainly reply back whether those do help me out or not!

I would suggest leveraging a "job" coordinator such as Jenkins or Cruise Control to manage any and all of our automation. Maven is natively supported and understood by these tools. An agent will reside on your server, and do the bidding of your coordinator.

Jenkins is a good solution to automate maven build:
easy to install
easy integration with maven
allow you to automate simple task after build failure/success like sending email
many plugins including this one that allow you to do more complex task after a build failure (or build success)

Any one of this
Jenkins
Hudson
Atlassian bamboo
TeamCity

After using LuntBuild, Jenkins and teamcity I can say without a doubt that TeamCity is by far the superior choice.
I think it's free for a small configuration (3 agents, and up to 10 build configurations).
It very easy to install and configure, compatible with most source control systems.

Related

Combining Jenkins Pipeline and UrbanCode Deploy to achieve Continuously Delivery?

The best part of UrbanCode Deploy is it models a component based architecture application, and its deployment environment so well that everybody can understand in 10 minutes. Very initiative, flexible and powerful. Don't know if there is another tool does this well.
Jenkins Pipeline can orchestra the Continuously Delivery workflow at the higher level to include the build, test, etc.
Does it make sense?
There's a new UCD plugin for Jenkins that adds nice integrations with the Jenkins 2.0 pipeline. I'm going to poke the developers since there doesn't seem to be a nice video showing it, but there is documentation (and a link to the plugin) out here:
https://developer.ibm.com/urbancode/docs/jenkins-build-step-integration-with-ibm-urbancode-deploy/
I think the idea is that you can use Jenkins pipeline to govern the flow of a build through early test environments, while UCD owns the late test environments / production when the pipeline operates more at the snapshot level. Would love your feedback!
Today, in my production environment, i use Jenkins to manage my build (like a "build pipeline" with some tests) and put all my build results into Urbancode Code station. Urbancode is doing all my deploy work perfectly, the integration with Jenkins is beautiful, easy and fast. I have read some articles about Jenkins delivery pipeline and do not recommend use it.
Check it out
https://www.thoughtworks.com/radar/tools

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

What should I use for continuous integration given my circumstances?

I'm developing a project in C# using VS2010. I'm using svn 1.7 for my version control. What I want is a (FREE) tool that runs on the build server and checks for fresh commits. If the commit breaks the trunk then I want email notifications sent (I have a sendmail openbsd server on the network I can use). I also want this tool (or another tool) to run all my MSTest tests periodically and send emails if there is a failed test.
Any suggestions? I already built my own crude windows service to check for failed builds. But this was before I heard that tools for this sort of thing already exist. I could easily have this thing run all my tests with mstest.exe and then parse the xml results files, but I'm wondering if my time would be better spent just installing and configuring a proper tool for all of this.
There will be at most 4 developers.
Thanks in advance for the help!
I have some experience with TeamCity and Hudson/Jenkins.
I found TeamCity fairly easy to setup and it seems to meet your needs of:
MSTest integration out of the box
Email notifications
TeamCity is free for up to 20 build configurations and has an easy to use Web/GUI interface.
Have a look at CruiseControl.Net
built in support for Subversion
no limits on number of build configurations
email notifications using the 'Email Publisher'
web interface and desktop build notifications via CCTray

What's the workflow of Continuous Integration With Hudson?

I am referred to Hudson today.
I have heard about continuous integration before, but I have no idea what the heck is a ci-server.
Hudson is really easy to install in Ubuntu and in several minutes I managed to set up an instance of it.
But I don't quite understand the workflow of a ci-server, or how am I supposed to use it?
Please tell me if you have experience about ci, thanks in advance.
Edit:
I am currently using Mercurial as my SCM, and I wonder what is the right way to use it with Hudson.
I have installed the Mercurial Plugin of Hudson, and I create a new job with a local repository. When I commit in the repository the Hudson job is built with the latest version of my source code.
If what I used is a remote repository, what's the workflow like?
Is it something like the following?
Set up a Hudson job with the repository
Developer makes a local clone of the repository
Developer commit and push changes
The remote repository update with the incoming changeset
Run a Hudson build
There may be something I misunderstanded at all, please help me point it out.
Continuous Integration is the process of "integrating software" continuously i.e. as frequently as possible (ultimately after each set of changes) to avoid any big-bang integration and all subsequent problems by getting immediate feedback.
To implement Continuous Integration, you first need to automate the build of your software (where build means of course compiling sources, packaging them, but also compiling tests, running the tests, running quality checks, etc, anything that will help to get feedback on the health of your code). Then you need to trigger the build on the latest version of the sources on a particular event (a change in the repository, a temporal event), to generate reports and to send notifications upon failure (by mail, twitter, etc).
And this is precisely the responsibility of a CI engine: offering trigger mechanisms, being able to get the latest version of the sources, running the build, generating and publishing reports, sending notifications. CI engines do implement this.
And because running a build is CPU and Disk intensive, CI engines usually run on a dedicated machine (or even a farm of machines if you want to build lots of projects).
Back to your question now. Once you've got Hudson running, configure it (Manage Hudson > Configure System): setup the JDK, build tools, etc. Then setup an Hudson Job and follow the steps: configure the location of the source repository, the build tool, the trigger, a notification channel and you're done (you can do more complex things but that's a start).
For more details on the setup, check:
The official Use Hudson guide for more details. << START HERE
Continuous Integration with Hudson - Tutorial.
Spot defects early with Continuous Integration.
Martin Fowler's overview of continuous integration is one of the canonical references. In my opinion, using automation to make sure your code base is healthy is one of the most useful things that you can set up.
Update Sorry that I didn't have much time earlier to expand on my reply. #Pascal_Thivent is right that in order to effectively use CI, you need to be able to automate your builds, tests, etc. CI is actually a good forcing function for this. For me, it's one of those little warning flags if I start to think that it would be too painful to put a build into Hudson. It means that something is not quite right.
What I like about Hudson is that it's flexible enough to accommodate different workflows. We use it for both builds / unit tests and releases. And it eliminates a lot of the worry about certain release procedures only working in one person's environment.
What I don't like about Hudson is that it is occasionally unstable when new builds break plugins. I've had a couple of upgrades (2 out of 10 or so) go bad because of incompatibilities. I do two things now:
I never upgrade my team's Hudson server to the latest and greatest right away. I generally only upgrade when there are significant new features, or bug fixes.
I now have a basic Hudson instance set up with all my plugins on a virtual machine with some dummy builds that I fire up to test out any new upgrades before doing it on the public server.

CI Servers for system simulation

My group work for a software of simulation for plane. To achieve a faster and easier validation and verification, we decided to introduce continuous integration. But I have no idea which CI servers should we choose.
Our contraintes:
- We need to compile in different machine with different platform( Linux, HP ) in local net and in client's net.
I mean, we need to call different functions in different machine in distance. Some of them will need a authorise
- We prefer a CI servers open source
- The sources are in different languages, C, C++, Java ...
- Support SVN, CVS, Clearcase
- Automated tests and reports
- The tests need different machines working together
I've seen teamcity, it seems well, but it's not open source.
Hudson is for you!
Edit to be more precise about your requirements:
Hudson run on a JVM (standalone service, using Jetty, or on a Tomcat server). Thus, the plateform is not a problem.
Hudson is open-source.
Hudson manages Java projects natively, but you can ask him to compile C, C++ or .Net projects.
Support SVN, CVS natively, and a plugin for Clearcase exist (here).
Automated tests and reports: You will need to implement them, of course, but Hudson will launch them for you. For Java projects, simply use Maven for that!
The tests need different machines working together: Hudson can be launched on several machines (one master, several slaves). Each slave can be hosted by any kinf of machine.
+1 for Hudson.
We are using Hudson together with SVN (version control) and Selenium RC (functional testing).
Very easy to set up, has tons of modules for integration, and very visible to all members of the team, especially if you're using the Hudson Build Monitor Firefox plugin.
I used Jenkins earlier, but now I prefer only TC due to it is great for a lot of purposes.
If you need to work with different platforms, it has great opportunity to install a few build agents with OS specified. Also you're able to install so-called Agent Clouds.
If you need to build your applications per branch — it will be done without any extra-scripting.
A lot of VCSs are supported.
Using Maven you're provided to build even Flex applications, even with running automated test (in case of Windows build agent installed).

Resources