Continuous Integration with Jenkins, ANT, and MXUnit Marc Esher CFObjective 2011 Download this presentation at wiki.mxunit.org.

Slides:



Advertisements
Similar presentations
Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
Advertisements

ANT on the Wire Using FTP, Mail, SVN, and VSS tasks (and a bonus task)
Continuous Integration (CI) By Jim Rush Version Control Build Test Report.
Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
Web Application Server Apache Tomcat Downloading and Deployment Guide.
Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
26-Jun-15 Getting Ready for CIT Labs Lab is scheduled for 3;00-4:30 Fridays in Moore 207 Lab is not in Towne 309 (Registrar has it wrong) Everyone.
30-Jun-15 Getting Ready for CIT Labs Lab is scheduled for 1:30-3:00 Fridays in Moore 207 Lab is not in Towne 313 (Registrar has it wrong) Everyone.
Downloading and Installing AutoCAD Architecture 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the software.
CS 160: Software Engineering August 27 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
Big Projects  Part of this class is about picking a cool software project and building it 1.
Improving Software Quality with Continuous Integration
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
Continuous Integration after Hudson, CruiseControl, and Home Built Mile High Agile 2011 – Mark Waite.
#RefreshCache CI - Daily Builds w/Jenkins – an Open Source Continuous Integration Server Nick Airdo Community Developer Advocate Central Christian Church.
JSP and Servlets Lecture notes by Theodoros Anagnostopoulos.
CONTINUOUS INTEGRATION, DELIVERY & DEPLOYMENT ONE CLICK DELIVERY.
Open Source Workshop1 IBM Software Group Working with Apache Tuscany A Hands-On Workshop Luciano Resende Haleh.
PHP, QA, and Jenkins Eric Cope June 25, 2013
Sumedha Rubasinghe October,2009 Introduction to Programming Tools.
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
Plug-in Development Environment. Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging.
Basic Setup Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
AOL SELF-HELP Built into the AOL program are the answers to nearly any problem you might encounter when using AOL.
Computer Security! Emma Campbell, 8K VirusesHackingBackups.
Deployment via jars and Webstart. How do we distribute our application? Lab says you need to submit CD Lab says you need to submit CD Limitations of CD.
Continuous Integration Mile High Agile 2012 – Mark Waite 3 April 2012.
GumTree Development Environment Setup Windows Only Compatible with Eclipse 3.2 M3 (Last update: 16/11/05)
DEVS M&S Tutorial with eclipse IDE Chungman Seo
1 PUPPET AND DSC. INTRODUCTION AND USAGE IN CONTINUOUS DELIVERY PROCESS. VIKTAR VEDMICH PAVEL PESETSKIY AUGUST 1, 2015.
First Venture into the Android World Chapter 1 Part 2.
Intro to CS ACO 101 Lab Rat. Academic Integrity What does that mean in programming? Log into Blackboard and take the test titled “Applied Computing Course.
CVS Hudson Build Server krykhudson.desy.de:8282 User Developer.
Exploring Adobe Presenter Presented By: Immersion Team
Website maintenance best practices CMS User Group Meeting October 21, 2015.
Chapter 1 Introducing Ant. What is ant? Ant is a build tool  Automate the tasks of compiling code, running test, and packaging the results for redistribution.
Database Projects in Visual Studio Improving Reliability & Productivity.
Matthew Glenn AP2 Techno for Tanzania This presentation will cover the different utilities on a computer.
Lecture XIII: Continuous Integration CS 4593 Cloud-Oriented Big Data and Software Engineering.
(1) Introduction to Continuous Integration Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
(1) Introduction to Continuous Integration Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
11 Computers, C#, XNA, and You Session 1.1. Session Overview  Find out what computers are all about ...and what makes a great programmer  Discover.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
ECE297 TA GUIDE Project supervision. Agenda M0 feedback Project overview M1 overview Project supervision.
Welcome to OTAN Online! Presenter: Barry Bakin If you are new to Connect, watch this short video, be sure to be back to the meeting by the starting time!
Test Automation Using Selenium Presented by: Shambo Ghosh Ankit Sachan Samapti Sinhamahapatra Akshay Kotawala.
Bamboo 1.0 Pre-sales presentation (March, 2007). Continuous Integration Typical development: design, develop, unit test, integrate, deploy Typical development:
Time to apply stuff… Faculty of Mathematics and Physics Charles University in Prague 5 th October 2015 Workshop 1 – Java Wrestling.
Tomcat Setup BCIS 3680 Enterprise Programming. One-Click Tomcat Setup 2  This semester we’ll try to set up Tomcat with a PowerShell script.  Preparation.
JohnPaulAguiar.com BLOGGING | SOCIAL MEDIA | MARKETING | INSPIRATION.
My Favorite Top 5 Free Keyword Research Tools –
Stress Free Deployments with Octopus Deploy
Development Environment
Continuous Integration (CI)
Continuous Integration with Jenkins, ANT, and MXUnit
Trends like agile development and continuous integration speak to the modern enterprise’s need to build software hyper-efficiently Jenkins:  a highly.
Contributing to Open Source Projects
Skill Based Assessment
Skill Based Assessment
X in [Integration, Delivery, Deployment]
Open Source Continuous Integration Server
Devops Jenkins as CI/CD tool Created By: Amrit Choudhary
Electronics II Physics 3620 / 6620
JENKINS TIPS Ideas for making your life with Jenkins easier
Continuous Integration
Continuous Integration Tool
Version Control 101 with Subversion
Software Engineering and Architecture
Presentation transcript:

Continuous Integration with Jenkins, ANT, and MXUnit Marc Esher CFObjective 2011 Download this presentation at wiki.mxunit.org

What is this?

Now impress me... What is this?

And this?

Pop Quiz Which of those 3 change?

Do your projects have this?

Or this?

How fast do you know when something breaks?

Wassssssuuppppp?

This Presentation is NOT: An introduction to unit testing A 50-minute explanation of how gull-dern geewilikers easy all of this is

This Presentation is: An attempt to demonstrate how learning this stuff can: help you identify broken windows quicker and easier provide increased transparency to your projects enhance team communication

This Presentation is: An attempt at being *enough to get you started* when you get back to work

This Presentation will: Demystify CI

A Play in Three Acts 1. What Life's like with Jenkins 2. How to set it all up 3. Q & A

With Three Players 1. Jenkins Continuous Integration Server (f/k/a Hudson) 2. ANT (Another neat tool) 3. MXUnit

What is Continuous Integration?

What is CI for a dynamic language application?

What is Continuous Integration? What is CI for a dynamic language application? What is CI for a dynamic language application that can only run in a webserver?

At a minimum: Always packaging your app for deployment

What is CI for a dynamic language application that can only run in a webserver? At a minimum: Always packaging your app for deployment Ideally: Always testing your app Unit tests Integration tests (Selenium, eg)

What is CI for a dynamic language application that can only run in a webserver? At a minimum: Always packaging your app for deployment Ideally: Always testing your app Unit tests Integration tests (selenium, eg) Potentially: Always deploying your app -- This would happen on a schedule or a trigger (svn commit, eg) --

What is CI for a dynamic language application that can only run in a webserver? The CI server can even help you do those things in a NON- Continuous manner Click a button, deploy to Test Click a button, deploy to Staging Click a button, build all your deployables (zips, wars, eg)

What is a Continuous Integration Server? Scheduler

What is a Continuous Integration Server? Coordinator

What is a Continuous Integration Server? Notifier

What is a Continuous Integration Server? Artifact Aggregator

What is a Continuous Integration Server? Reporter Trends / Application Health

What is a Continuous Integration Server? Auditor

Know This You cannot answer "What's broken?"

Know This...Without Tests

Bigass Image

Demo Time! Your Life, with CI

3 Things You NEED to know 1. You will get the most out of CI if you have tests In other words, the usefulness of CI increases dramatically as your testing habits improve

3 Things You NEED to know 2. Resources can seem scarce* Not as easy to find answers as, say, searching for "CFWindow" * See the end of this deck for a list of good resources

3 Things You NEED to know 3. You can't avoid ANT any longer It's the glue between Jenkins and your tests

If you think: ANT is too hard XML sucks ANT is scary Ooooh, great, another thing to learn OOOH, GREAT, another annoying Java thing being pushed on me by some jerkoff who couldn't make it programming in a real language so he learned CF in 3 days and now he wants to seem like a bigshot so he's all like "Yeah, ANT rocks, you need to learn it or you should quit programming and go work at Wal-Mart because you're too stupid to be in front of a computer and speaking of which who the hell even let you have a keyboard in the first place grumble grumble grumble....

Stop your fretting! CFPARAM <-- very important! CFFUNCTION CFINCLUDE CFFILE CFHTTP CFDIRECTORY CFOUTPUT CFDUMP CFZIP #variable#

Stop your fretting! CFPARAM CFFUNCTION CFINCLUDE CFFILE CFHTTP CFDIRECTORY CFOUTPUT CFDUMP CFZIP #variable# &, etc ${property}

Stop your fretting! MXUnit ships with a sample ANT build file that does almost all of the work for you! It's built to be Jenkins-friendly /mxunit/samples/build.xml

Part II: How to Set it all Up 1. Install a JDK download, install, note where you installed it, and forget about it *As of now, it's at Simply get the JDK... no need for "bundles" (JavaEE, Netbeans, etc)

Part II: How to Set it all Up 2. Install ANT download, unzip somewhere, note where you unzipped it, and forget about it *

Part II: How to Set it all Up 3. Download Jenkins It's a single.war file; put it somewhere sensible (I keep a directory named "appservers", with Railo, OBD, Tomcat, etc. I keep the jenkins.war file in there.) *

Part II: How to Set it all Up You do NOT need to install Tomcat You can install Jenkins as its own container easily, from within Jenkins itself

Demo Time! Running Jenkins cmd> cd c:\dev\appservers\jenkins cmd> java -jar jenkins.war (yes, that's it)

Demo Time! Configuring Projects

Configuration steps 1.Copy /mxunit/samples/HttpAntRunner.cfc into your test directory 2.Copy /mxunit/ant/lib/mxunit-ant.jar into a /yourapp/lib/ 3.Copy /mxunit/samples/build.xml into your application's root 4.Change the application.name property to the directory name of your application 5.Change any other properties as necessary 6.Run the runtests target to confirm ant is running your tests correctly 7.Commit everything to svn ANT/MXUnit 1.Add a new Job 2.Give it the Source Control URL for your project. Run a build to confirm it checked out the code 3.Set up the scheduling (build triggers) 4.Add a build step to run your "runtests" ANT target. Run a build to confirm it ran your tests 5.Add build steps for "dist" and potentially for "svn.update" (move "svn.update" to the top) 6.Archive the artifacts. They'll be in /deploy/*.zip 7.Publish JUnit test result report. They'll be in /test/testresults/xml/*.xml 8.Configure notifications. Configure jabber (IM) notifications if you want 9.Explore available plugins and have fun with CI! Jenkins

When that code gets to your dev server, when are your tests run? When your tests get run, what happens when something errors or fails? Do you have metrics on how your tests are improving over time? Is it easy for any team member to *see* the status of the build (i.e. the number of failing/passing tests)? When the tests are run and everything is OK, is the entire project available for deployment (a zip file, for example)? When someone checks in code to source control, how does that code get to your dev server? Whenever you want them to s, IMs, Chats... can be targeted to "culprits", as well Yes, no extra work required Yes. Access control is possible as well Yes, zip via ANT and artifacts are easily archived If you don't have that solved, CI can help Question: Answer, with CI:

Where to learn more about Jenkins and CF -- MXUnit Wiki: -- When you get stuck, join the MXUnit Google group and ask questions -- Jenkins wiki: -- Jenkins Book (open source, free, work in progress)

Where to learn more about ANT and CF -- Jim Priest's recorded presentation on UGTV: -- Go to and search for "ANT" -- Jim Priest's ANT wiki -- My materials from 2008 CFUnited preso on ANT (contains a LOT of example build files)

Thanks! Marc on Twitter TestBe Happy

Credits All CFML generated using Terry Ryan's Apptacular ColdFusion Builder extension All cheesy icons from office.microsoft.com. Don't hate. Except the Hindu god, he did not come from MS.