jenkins, drupal & testing automating every phing! miggle



Similar documents
DRUPAL CONTINUOUS INTEGRATION. Part I - Introduction

Automate Your Deployment with Bamboo, Drush and Features DrupalCamp Scotland, 9 th 10 th May 2014

Behavioral Driven Development with Behat

Continuous Integration

Launch with Confidence! Behavior Driven Development (BDD) 101. Presented by: Shawn Smiley [Director of Engineering Operations]

Achieving Continuous Integration with Drupal

The truth about Drupal

Continuous Integration

Drupal CMS for marketing sites

Software Continuous Integration & Delivery

CI:IRL. By Beth Tucker Long

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

Configuration Management in Drupal 8. Andrea Pescetti Nuvole

StriderCD Book. Release 1.4. Niall O Higgins

PHPUnit and Drupal 8 No Unit Left Behind. Paul Mitchum

DevShop. Drupal Infrastructure in a Box. Jon Pugh CEO, Founder ThinkDrop Consulting Brooklyn NY

Automation of Flex Building and Unit Testing or Continuous Integration with Flex, FlexUnit, and Ant

Symfony2 and Drupal. Why to talk about Symfony2 framework?

Continuous Delivery for Alfresco Solutions. Satisfied customers and happy developers with!! Continuous Delivery!

Putting It All Together. Vagrant Drush Version Control

DEPLOYING DRUPAL USING CAPISTRANO

SUCCESFUL TESTING THE CONTINUOUS DELIVERY PROCESS

Hail or Fail: The Right Way. to Override Core. Mark Shust ecommerce Developer Metrics Marketing

Continuous Integration/Testing and why you should assume every change breaks your code

Implementation Guide:

Magento OpenERP Integration Documentation

The AppSec How-To: Achieving Security in DevOps

Automation & Open Source. How to tame the Cloud?

Servers. Servers. NAT Public Subnet: /20. Internet Gateway. VPC Gateway VPC: /16

Continuous Integration Multi-Stage Builds for Quality Assurance

How To Manage A Multi Site In Drupal

Jenkins on Windows with StreamBase

Build Automation for Mobile. or How to Deliver Quality Apps Continuously. Angelo Rüggeberg

Build management & Continuous integration. with Maven & Hudson

DevOps. Building a Continuous Delivery Pipeline

Improving your Drupal Development workflow with Continuous Integration

Drupal for Designers

Paul Boisvert. Director Product Management, Magento

Jenkins World Tour 2015 Santa Clara, CA, September 2-3

Version Control Your Jenkins Jobs with Jenkins Job Builder

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Drupal Automated Testing: Using Behat and Gherkin

VOC Documentation. Release 0.1. Russell Keith-Magee

Git - Working with Remote Repositories

Magento Search Extension TECHNICAL DOCUMENTATION

Simple and powerful site deployment with capistrano

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

Jenkins Continuous Build System. Jesse Bowes CSCI-5828 Spring 2012

JavaScript Applications for the Enterprise: From Empty Folders to Managed Deployments. George Bochenek Randy Jones

MANAGE AND DEPLOY YOUR SITES WITH DRUSH

CoDe:U Git Flow - a Continuous Delivery Approach

My DevOps Journey by Billy Foss, Engineering Services Architect, CA Technologies

Sonatype CLM for Maven. Sonatype CLM for Maven

Agile Web Application Testing

Hudson configuration manual

OpenCart. SugarCRM CE (Community Edition Only) Integration. Guide

AWS CodePipeline. User Guide API Version

Continuous Integration and Delivery at NSIDC

DevOps Course Content

Delivering Quality Software with Continuous Integration

Joomla! Override Plugin

Auditing Drupal sites for performance, content and optimal configuration

Web Developer Toolkit for IBM Digital Experience

Pacific Application Server for OpenEdge: Getting Started. Progress OpenEdge 11.5 Workshop

ACCELERATE DEVOPS USING OPENSHIFT PAAS

SugarCRM CE (Community Edition Only) Plugin. Installation. Guide

DevOps Stack. Reid Holmes. Chris Parnin:

OpenMake Dynamic DevOps Suite 7.5 Road Map. Feature review for Mojo, Meister, CloudBuilder and Deploy+

Automating Testing and Configuration Data Migration in OTM/GTM Projects using Open Source Tools By Rakesh Raveendran Oracle Consulting

Understanding Code Management in a Multi-Vendor Environment. Examples of code management in a multi-team environment

Taking Drupal development to the Cloud. Karel Bemelmans

SUCCESFUL TESTING THE CONTINUOUS DELIVERY PROCESS

Building a Continuous Integration Pipeline with Docker

DevOps. Jesse Pai Robert Monical 8/14/2015

Continuous Integration on System z

Fundamentals of Continuous Integration

Develop a Native App (ios and Android) for a Drupal Website without Learning Objective-C or Java. Drupaldelphia 2014 By Joe Roberts

INCREASE YOUR WEBMETHODS ROI WITH AUTOMATED TESTING. Copyright 2015 CloudGen, LLC

Agile Software Factory: Bringing the reliability of a manufacturing line to software development

Continuous???? Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.

Tonido Cloud Admin Guide

Hudson Continous Integration Server. Stefan Saasen,

5 Mistakes to Avoid on Your Drupal Website

Treemap Visualisations

Expert PHP 5 Tools. Proven enterprise development tools and best practices for designing, coding, testing, and deploying PHP applications.

Expresso Quick Install

HW9 WordPress & Google Analytics

Transcription:

jenkins, drupal & testing automating every phing!

about me > Drupal dev for 6+ years > PHP dev for 10+ years > Husband > Cyclist > Frustrated rockstar @8ballmedia

aims > Encourage best practices > Ensure quality at scale > Release more frequently and reliably > Develop more robust solutions > Deploy with confidence

improving quality control > Write better code Adhering to Drupal coding standards! Evaluate code complexity Detect messy copy/paste code > Validate that our code achieves objectives Simpletests Behat tests > Automate labour intensive tasks

my requirements > Create something reusable & future proof > Create a starting point for future projects > Use open source > Report failures email accountable team members!

Intercept obvious issues * not obvious if you have devel installed of course ;)

before they reach the stakeholders!

create a development pipeline CI STG LIVE > Validate code ahead of any release to a client env

continuously integrating?

barrier to entry

buzz words & acronyms! > Devops - a state of mind man! bridging the gap between sys/dev > BDD - Behaviour Driven Development > CDD - Code Driven Development > TDD - Test Driven Development > CI - Continous Integration > CD - Compact Disc Continuous Delivery

hi, I m jenkins > Continuous Integration application > Automate tasks > Huge library of plugins > Trigger tasks from other jobs or Github for example > Report Success/failures > Communicate with other servers

community rules! > http://jenkins-php.org/ > http://reload.github.io/jenkins-drupal-template

creating your own ci setup > Tools > Requirements > Guidelines > Screencast Walkthrough

tool box > Ubuntu - Digital Ocean 1GB+ > Jenkins - CI server with numerous plugins > Github - good compatibility w/ Jenkins > Composer - dependency manager > Phing - Automation using XML files and PHP > Automated testing - Simpletest, Behat > Drupal w/ Sqlite

evaluating code quality > Code analysis w/ Coder > Duplicate code detection > PHP Mess detection, copy/paste detection > JS & CSS linting

why composer > PHP package manager > Alternative to PEAR > Allows for dependencies per project > Requires additional PATH config in Jenkins > Simpler transition to hosted services

composer.json { } "repositories": [ { "type": "package", "package": { "name": "drupal/phing-drush-task", "version": "1.0", "source": { "url": "http://git.drupal.org/project/phingdrushtask.git", "type": "git", "reference": "7.x-1.0" }, "autoload": { "classmap": [ "DrushTask.php" ] }, "include-path": [ "." ] } } ], "require": { "phing/phing": "2.*", "drupal/phing-drush-task": "1.0", "drupal/drupal-extension": "1.0.*@stable", "drush/drush": "6.2.*", "squizlabs/php_codesniffer": "1.5.*", "phpmd/phpmd": "1.5.*", "sebastian/phpcpd": "*", "phploc/phploc": "*", "drupal/coder": "7.2.*" }, "config": { "bin-dir": "bin/" }, "minimum-stability": "beta"

phing > Build automation tool > Based on Apache ANT > Good integration w/ Jenkins > XML & PHP based > Drush integration available <?xml version="1.0" encoding="utf-8"?> <project name="phing-drupal" default="build"> <!-- ## Main targets > <target name="build" depends="init, clean, verify, analyze" /> </project> <drush command="site-install" assume="yes""> <option name="locale">uk</option> <option name="site-name" value="${sitename}" /> <param>expert</param> </drush> > https://www.drupal.org/project/phingdrushtask

build.default.properties > Specify project properties > Can be overridden in Jenkins > Multiple properties files useful for different envs. # The directory containing the modules and themes for the project relative to the drupal root directory. project.code.dir = sites/all # A common prefix for modules to evaluate project.code.prefix = master # The names of other modules and themes to evaluate project.code.custom = master_dependency <drush command="site-install" assume="yes"> <option name="db-url">${drupal.db.url}</option> <param>${drupal.profile}</param> </drush>

follow the rules > Standardisation is key > Naming conventions from the outset > Standard directory structures > Prefixing build.xml build.default.properties build.components/ build.components/build.drupal_site_install.xml composer.json docroot/ docroot/sites/all/modules/features/my_feature/ docroot/sites/all/modules/features/my_feature2/ docroot/sites/all/modules/custom/my_helper/

let s get going https://github.com//migl-phing-drupal disclaimer: work in progress!

what just happened > Installed and started Jenkins > Installed required server packages > Installed composer globally

finalising > Configured Jenkins > Install Drupal-Jenkins template > Initial build > Configure Apache > Final build

review the results > Set the levels at which a build is marked: unstable broken > Email contributing developers a status update happens by default w/ github plugin > Advise developers of where code can be improved > Provide metrics on code

caveats > Additional overhead writing automated tests devs need to learn how to write tests > Tests need to be written correctly false positives are not useful! > Initial project setup overhead although could be automated > Tests take time to run but > automated on push so no need to wait!

hosted alternatives to jenkins > Travis CI - free for open source > Circle CI, Magnum CI and more > Benefits of hosted CI infrastructure managed elsewhere 100% self contained

thanks! > Huge thanks to these amazing people!!: > https://github.com/nlisgo > http://reload.github.io/jenkins-drupal-template/ > https://github.com/omissis/drupal-ignite > https://github.com/lhridley/drupal7-jenkins-templates

let s discuss > http://tinyurl.com/mwjgomv > Twitter: @8ballmedia > Web: 8ballmedia.co.uk > D.O. 8ballsteve > LinkedIn: uk.linkedin.com/in/stevegushrichards