Beginner s guide to continuous integration

Similar documents
Continuous integration from the ground up

Software Building (Sestavování aplikací)

Continuous Integration (CI) with Jenkins

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Getting It Right COMS W4115. Prof. Stephen A. Edwards Spring 2007 Columbia University Department of Computer Science

Con$nuous Integra$on Development Environment. Kovács Gábor

Construction: version control and system building

Automating All The Things. Sebastian Feldmann

The Actual Real World at EclipseCon/ALM

JetBrains TeamCity Comparison

SpiraTeam Build Server Integration Guide Inflectra Corporation

Automate all the things. Sebastian Feldmann

ABL Unit Testing Part 1: Test Strategy. Mike Fechner Director

Continuous Integration using Docker & Jenkins

Consultingwerk Continuous Deployment of OpenEdge Applications. Daniël van Doorn Senior Consultant

Prototype of Automated PLC Model Checking Using Continuous Integration Tools CERN Summer Student Report

Chapter 1 - Continuous Delivery and the Jenkins Pipeline

Construction: version control and system building

MAVEN INTERVIEW QUESTIONS

Jenkins: A complete solution. From Continuous Integration to Continuous Delivery For HSBC

DevOps examples on NonStop Tools Overview. Cor Geboers, ATC Consultant

Lab 03 Finish and Deploy an Application. Lab 3-1: Add DELETE to the Spring Boot REST Application

#jenkinsconf. Jenkins user plugin. This time it's. Jenkins User Conference Israel. Shiran JFrog

Seven Habits of Highly Effective Jenkins Users. Andrew Bayer Cloudera OSCON Java 2011

Installation and Release Notes

AEM Code Promotion and Content Synchronization Best Practices

CSE 403 Lecture 11. Static Code Analysis. Reading: IEEE Xplore, "Using Static Analysis to Find Bugs"

What is Maven? Apache Maven is a software project management and comprehension tool (build, test, packaging, reporting, site, deploy).

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Jenkins

Debugging with OpenEdge Architect An introduction to the IDE s integrated debugger

IKAN ALM Architecture. Closing the Gap Enterprise-wide Application Lifecycle Management

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

Continuous Integration and Deployment (CI/CD)

Maven 2 & Continuum. by Trygve Laugstøl

Benefits of the Build

Continuous Integration, Continuous Deployment and Continuous Testing by HP Codar using ALM and Jenkins

Build. System building

DevOps Course Content

Content. Development Tools 2(57)

ONAP Developer Typical Setup 2017 July ONAP Virtual Developers Event

JenkinsPipelineUnit. Test your Continuous Delivery Pipeline. Ozan Gunalp - Emmanuel Quincerot

Managing Installations and Provisioning of OSGi Applications. Carsten Ziegeler

AALOK INSTITUTE. DevOps Training

Tattletale. What is Tattletale? Enterprise archives JBoss Application Server 7 Putting it all together Roadmap

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

How can you implement this through a script that a scheduling daemon runs daily on the application servers?

Getting Started with Indexing. Version 2.2

Introduction to Software Engineering: Tools and Environments. Session 10. Oded Lachish

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

Thomas Pelaia II, Ph.D. XAL Workshop 2012 December 13, 2012 Managed by UT-Battelle for the Department of Energy

Continuous Integration & Code Quality MINDS-ON NUNO 11 APRIL 2017

Automate ALL the Phings!

AWS Course Syllabus. Linux Fundamentals. Installation and Initialization:

TM DevOps Use Case TechMinfy All Rights Reserved

Info Error Deploying Artifact Failed To Transfer File Return Code Is 401

Ant. Originally ANT = Another Neat Tool. Created by James Duncan Davidson Now an Apache open-source project

Large-Scale Automation with Jenkins

Getting Started with Team Coding Applicable to Toad for Oracle Suite 2016 (v12.9) and higher

EMC Documentum Composer

CONTINUOUS DELIVERY WITH EFFICIENT AUTOMATED TESTING IN CLOUD

Topics covered. Introduction to Maven Maven for Dependency Management Maven Lifecycles and Plugins Hands on session. Maven 2

Build Automation Kurt Christensen

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Jenkins

Getting Started with Cisco UCS Director Open Automation

Development Practice and Quality Assurance. Version Control. The first thing you should be told when you start a new job - Steve Freeman

Tools. SWE 432, Fall Design and Implementation of Software for the Web

CS108, Stanford Handout #37. Source Control CVS

QMetry Test Managment Plugin

DEVOPS TRAINING COURSE CONTENT

Outline. Configuration management. Main Phases MOTIVATION

Jenkins in the Enterprise Building resilient CI infrastructure

Apache Axis2. Tooling with Axis2

Automation Deployment Guide

PDSOE Workspace Management and Organisation. Marko Rüterbories Senior Consultant

S AMPLE CHAPTER IN ACTION. Benjamin Muschko. FOREWORD BY Hans Dockter MANNING

AppFactory User Guide

Why switch exist-db from Ant to Maven?

Index. Chaminda Chandrasekara 2017 C. Chandrasekara, Beginning Build and Release Management with TFS 2017 and VSTS, DOI /

MAVEN MOCK TEST MAVEN MOCK TEST I

Configuration As Code. #jenkinsconf. Jenkins User Conference Europe #jenkinsconf. The Job DSL Plugin. Daniel Spilker CoreMedia

EMC Documentum Composer

Compile Utility. Documentation for the Compile Utility is broken into four sections:

<put document name here> 1/13

Optimizing LAMP Development with PHP5

Continuous Delivery of your infrastructure. Christophe

Deployment Tools and Techniques

Leveraging the OO Jenkins Plugin in DevOps scenarios

System Administrator s Guide Release 7.3.5

An Integrated Approach to Managing Windchill Customizations. Todd Baltes Lead PLM Technical Architect SRAM

ARES: AUTOMATIC RELEASE SERVICE

Seven Habits of Highly Effective Jenkins Users

Google Cloud Platform for Systems Operations Professionals (CPO200) Course Agenda

Red Hat JBoss Web Server 3.1

I Got My Mojo Workin'

LANSA V13 SP2 introduces many new features and enhancements. The highlights are described in this newsletter.

Abstract. Avaya Solution & Interoperability Test Lab

We are ready to serve Latest Testing Trends, Are you ready to learn?? New Batches Info

Simplified Build Management with Maven

Introduction: Manual Testing :

Transcription:

Beginner s guide to continuous integration Gilles QUERRET Riverside Software US PUG Challenge 2013

What s continuous integration? Build, deployment and tests are long and boring tasks Development cycles are shorter, but integration is still long Continuous integration is a set of tools and techniques to automate those tasks, and provide notifications as soon as possible Development Build Deploy Test Back to development

Feedback Feedback Continuous integration overview Development Back to development Continuous integration server Build Deploy Test Build Deploy Test Build Deploy Test Development Development

Continuous integration advantages Fix problems as soon as possible Save valuable time for developers Confidence in what s released Higher project quality

Continuous integration process Check out from source code repository Build project Execute unit tests Deploy to target system Full tests (optional) Provide feedback

Let s start! Go to http://jenkins-ci.org Download Jenkins WAR file Execute WAR file Go to http://localhost:8080

A new job in Jenkins Create a new job Choose a job name and select «Free-style project» Then click «OK»

New job : source code repository Select the source code repository for your project CVS and Subversion by default Mercurial, Git, Perforce and so on available as plugins

New job : build steps Default build steps are : Windows batch command / Shell script Maven Ant

New job : explanation of existing build steps Windows batch commands / Shell scripts : Hard to maintain, not portable, rely on hand-crafted tools for OpenEdge Maven : The new default build system for Java OpenSource Convention over configuration, dependencies management Ant : The old default build system for Java (but still widely used, and not only for Java) OpenSource and stable since more than 10 years XML syntax (can be cumbersome), repeatable builds, LOTS of build tasks

Using Ant with OpenEdge Ant provides a nice structure to add your plugins PCT is an Ant open source plugin for OpenEdge Started almost exactly 10 years ago! Handles the most common OpenEdge related tasks : Database management (create DB, dump/load DF files, dump/load data, ) Build (r-code from.w/.p.cls, SpeedScript, ) Libraries (PL management, diff between PL, ) Procedure execution (with propath, DB connections, options, )

A sample build script <?xml version="1.0" encoding="utf-8"?> <project name="myproject" default="dist"> <taskdef resource="pct.properties" /> <target name="target1"> <!- Some build tasks --> </target> <target name="target2" depends="target1"> <!- Some build tasks --> </target> </project>

A sample build script <target name="db"> <mkdir dir="database/db" /> <PCTCreateBase dbname="sports" destdir="database/db" dlchome="${dlc}" schemafile="database/dump/sports.df" /> </target>

A sample build script <target name="build" depends="db"> <mkdir dir="build" /> <PCTCompile destdir="build" dlchome="${dlc}" > <fileset dir="src" includes="**/*.p,**/*.w,**/*.cls" /> <DBConnection dbname="sports" dbdir="database/db" singleuser="true" /> <propath> <pathelement location="src" /> </propath> </PCTCompile> </target>

A sample build script <target name="dist" depends="build"> <mkdir dir="dist" /> <PCTLibrary destfile="dist/sports.pl" basedir="build" dlchome="${dlc}" /> <zip destfile="dist/sports.zip"> <fileset dir="dist" includes="*.pl" /> <fileset dir="resources" includes="**/*.jpg" /> </zip> </target>

Back to Jenkins Just add an Ant build step, executing «dist» target. Dependencies between tasks will take care of creating database and compiling code Build file name is not provided: default is build.xml Notice we can pass properties as parameters : multiple jobs can use the same build script with different values

Job configuration page Archiving build output As a convention, the dist directory contains build artifacts

Execute first build

And now? Build pipeline Automated tests using the REST adapter Slaves Deployment to virtual machines Manage dependencies Dashboard view Source code analysis

Build pipeline Dependencies between jobs Unit tests are triggered by the main job Followed by a deployment to virtual machines

Automated tests Tests are executed just after the build Under Win32, OE 11.2, but different configurations are being used See Mike Fechner package for unit tests Or have a look at Prounit Or use API on appservers, with OpenAPI or REST adapter

Slaves Public Jenkins instance for Apache Software foundation manages more than 300 jobs With so many jobs, you need to dispatch them on different machines Jenkins provides a simple yet powerful master/slave mechanism, where jobs can be assigned to slaves, while the UI (configuration and reports) are still on the master server Extremely useful not only to dispatch load, but also to test on different configurations

Deploy to virtual machines Snapshot is your best friend Define snapshots for various configuration (OpenEdge, OS, and other requirements) When a build is completed, use the VIX (or EC2) API to : Restore to snapshot Copy artifacts to virtual machine Execute your installer (or upgrade process) Pause your virtual machine (or not!)

Manage dependencies Keep your builds small Build artifacts can be kept in Jenkins, or uploaded to an artifact repository Grab dependencies when building downstream jobs (copy artifacts Jenkins plugin or download from artifact repository) During development, download them from Jenkins or artifact repository Define requirements : OpenEdge, Sonic, which shouldn t be managed by the repository

Dashboard view

Source code analysis

Questions?

References Ant : http://ant.apache.org PCT : http://code.google.com/p/pct Jenkins : http://jenkins-ci.org