#! Phil Norton Getting Started With Jenkins and Drupal DrupalCampNW 2013.

Slides:



Advertisements
Similar presentations
About Me CTO, Individual Digital, Inc. (Startup) Author of ext/tidy, PHP 5 Unleashed, Zend Ent. PHP Patterns
Advertisements

Drupal Continuous Integration With Jenkins – Deploy
Jenkins User Conference San Francisco, Sept #jenkinsconf Business Process Model & Notation (BPMN) Workflows in Jenkins Max Spring Cisco
Server-Side vs. Client-Side Scripting Languages
Using the Windows Event Viewer and Task Scheduler Chapter 5.
The easy way to a nice looking website design By a total non-designer (Me!)
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
SEEM4570: XAMPP, Eclipse, Summary of Html Kangfei Zhao Room 711,ERB
#RefreshCache CI - Daily Builds w/Jenkins – an Open Source Continuous Integration Server Nick Airdo Community Developer Advocate Central Christian Church.
Automating Drupal Deployment Dominique De Cooman.
Drupal and the CMS Project. Lesson Learned #1 Keep your modules updated, especially when there are security concerns in the update notes 2010 | The Sky’s.
Getting Started With Java Downloading and installing software Running your first program Dr. DwyerFall 2012.
Creating a Web Presence Introduction to WordPress Week 1.
Submitted by: Madeeha Khalid Sana Nisar Ambreen Tabassum.
MCDevOps Infrastructure In One Hour. Sponsors Improving Enterprises Software Development.
© 2012 LogiGear Corporation. All Rights Reserved Robot framework.
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Instant Messaging for the Workplace A pure collaborative communication tool that does not distract users from their normal activities.
INFSOM-RI Juelich, 10 June 2008 ETICS - Maven From competition, to collaboration.
MAE Continuous Integration Administration guide July 8th, 2013.
Netbeans 6.0 version control configuration for AUV Workbench & various XMSF projects TODO: check changes in all Netbeans 5 screens Don Brutzman
Drupal Commerce Better than Uber Andrew Root: druroot.
09/29/ Cascade Server User's Conference 1 Cascade Server Flash & Data Integration 2009 Cascade Server User’s Conference Justin Klingman Manager,
AEgir Maintain your Drupal sites. The name: AEgir “In Norse mythology, AEgir was the god of the oceans and if Drupal is a drop of water, AEgir is the.
AppSec USA 2014 Denver, Colorado CMS Hacking 101 Hacking and Securing Popular Open Source Content Management Systems.
Drush: The Drupal Shell Utility Trevor Mckeown Founder & Owner Sublime Technologies
Wordpress with Mina Automated Deployment Solution Jonathan Gravato DIG 4104c.
CVS Hudson Build Server krykhudson.desy.de:8282 User Developer.
IBM Lotus Software © 2006 IBM Corporation IBM Lotus Notes Domino Blog Template Steve Castledine.
(1) Installing the Software ICU Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
(1) Introduction to Continuous Integration Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
TOPIC 7.0 LINUX SERVICES AND CONFIGURATION. ROOT USER Root user is called “super user” because it has power far beyond those of mortal user. As root,
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
Build Tools 1. Building a program for a large project is usually managed by a build tool that controls the various steps involved. These steps may include:
Configuring Drupal Information Systems 337 Prof. Harry Plantinga.
Add Automated Testing to Your Project in an Afternoon Michael Sherron, Technical Architect.
Copyright © 2010 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are trademarks of Accenture. ODS Tools – Fannie Mae.
Introduction to Ansible
Drupal Basics May 30, 2012 By Sean Fitzpatrick. Sean Fitzpatrick | Welcome We're going to talk about Drupal We're going to keep it pretty.
Wordpress Overview Wordpress is an open-source and free Web publishing application, content management system( CMS) and blogging tool built by a community.
Testing and delivery Web design principles. Web development is software development.
Open-O Integration Project Introduction
Development Environment
Open OnDemand: Open Source General Purpose HPC Portal
Useful Tools for Testing
Linux Security Presenter: Dolev Farhi |
Build Automation with Gradle
Plan What is Maven ? Links : mvn command line tool
Data Virtualization Tutorial… CORS and CIS
Automatic RElease Service
GLAST Release Manager Automated code compilation via the Release Manager Navid Golpayegani, GSFC/SSAI Overview The Release Manager is a program responsible.
IT Atoumation / Conf. Mgmt...
The GoogleMap API By Cody Littley.
PHP Training at GoLogica in Bangalore
Lab 1 introduction, debrief
PHP / MySQL Introduction
More Scripting & Chapter 11
How to Fix Secure Connection Error in WordPress?.
Instructor: Prasun Dewan (FB 150,
TRANSLATORS AND IDEs Key Revision Points.
Open Source Continuous Integration Server
Simplified Development Toolkit
Introduction to Ansible
Module 01 ETICS Overview ETICS Online Tutorials
JENKINS TIPS Ideas for making your life with Jenkins easier
Introduction to AppInventor
Helping you make your code better
Features Overview.
Overview on CI Use JJB (Jenkins Job Builder) to manage Jenkins jobs.
Web Application Development Using PHP
Presentation transcript:

#! Phil Norton Getting Started With Jenkins and Drupal DrupalCampNW 2013

#! Me Phil Norton #! code ( Technical Lead at Access Help run NWDUG DrupalCampNW2013 co-organizer Help out at PHPNW

#! Jenkins Build and automation server Java application Used to be called Hudson Built for continuous integration Helps you run repetitive tasks

#!

Jenkins Drupal Examples Inspect your code Run cron Build documentation Test drush make files Test Drupal install profiles Run tests Deploy sites

#! Installing Jenkins Different for most platforms Go to jenkins-ci.org Click on your platform on right hand side Follow instructions

#! Installing On Ubuntu wget -q -O - ci.org/debian/jenkins-ci.org.key | sudo apt-key add - Add “deb binary/“ to the file /etc/apt/sources.list sudo apt-get update sudo apt-get install jenkins

#! localhost:8080

#! Authentication Jenkins doesn’t have authentication when first installed Probably a good idea to enable it! Many different models from local user credentials to domain authentication

#! Creating A User In Jenkins Simplest security model for beginners Manage Jenkins > Configure Security > Enable Security Manage Jenkins > Manage Users > Create User

#! ooopss… Quite easy to lock yourself out Open the file config.xml remove the element to remove security

#! Anatomy Of Jenkins Jenkins can be found at /var/lib/jenkins May contain one or more of the following:.ssh config.xml jobs/ nodeMonitors.xml plugins/ secret.key secret.key.not-so-secret updates/ userContent/ users/ workspace/

#! Your First Jenkins Project

#! Drupal Cron Start off using Jenkins with something simple Running a Drupal cron through Jenkins is easy

#! Drupal Cron Create a ‘free-style software project’

#!

Drupal Cron Build Trigger Select ‘build periodically’ Crontab syntax applies Can also to run the job every hour

#! Drupal Cron Build Step Create an Execute shell build task Use 'wget' to call the cron page remotely

#! Notifications Useful to know if a job fails notifications are available Sends detailed notifications on failed jobs

#! Jenkins Job List

#! Jenkins Plugins

#! Jenkins Plugins Jenkins can be extended with plugins Install them via the plugin manager Manage Jenkins > Manage Plugins

#! Drupal Code Analysis In Jenkins

#! Drupal Code Analysis Syntax checking Check for coding standards violations Analyse for duplication of code Check for potential problems in source code

#! STAHP!

#! Some Rules For Using Jenkins With Drupal Use source control Only analyse your own code as priority Know what you are analysing Understand the output Standardise as much as you can

#! Standardise Standard repo structure docroot/ scripts/ make/ Standard theme structure template.php templates/ js/ css/ Standard Drupal setup sites/all/modules/contrib / sites/all/modules/custom/ Standard custom module structure module.module includes/module.inc

#! Git Use source control to pull code into Jenkins To use Git you need the Jenkins Git plugin Best results are using SSH (you will also need some ssh keys) Perhaps the most complex part of the job setup

#! Git Use source control to pull code into Jenkins To use Git you need the Jenkins Git plugin Best results are using SSH (you will also need some ssh keys) Perhaps the most complex part of the job setup

#! Add your git ssh URL to Jenkins Jenkins will give you a warning if it can’t see the repo

#! Syntax Checking

#! PHP Lint Syntax check any PHP file with php -l myfile.php Can only do one file at a time How can we check an entire project?

#! Build tool Controlled with XML files Written in PHP Available through PEAR Integrates with Jenkins Certified awesome!

#! Phing And PHP Lint Add a Phing build file to your source code What we need to do is: 1.Tell Phing what files we want to scan 2.Use the phplint Phing task to scan files 3.Fail the build if any errors found

#!

#! Running Phing Syntax Check Add the Phing file to your source code as build.xml You can run this build using the following: phing -f scripts/build.xml syntaxcheck_php

#! Add Phing Build Step To Jenkins Use the Jenkins Phing Plugin to invoke the syntaxcheck_php Phing target

#! What Next?

#! Drupal Coding Standards

#! Checkstyle Jenkins Plugin Reports on coding standards results Accepts a checkstyle.xml file produces lots of graphs and code reports

#! PHP CodeSniffer Inspect code for Drupal coding standards Produces checkstyle.xml files for Checkstyle Looks for best practice in your code

#! Install PHP CodeSniffer Install the PHP CodeSniffer package sudo pear install PHP_CodeSniffer Download Coder and link the Drupal CodeSniffer standard drush dl coder sudo ln -sv /path/to/coder/coder_sniffer/Drupal $(pear config-get php_dir)/PHP/CodeSniffer/Standards/Drupal

#! phpcs docroot/sites/all/modules/custom

#! phpcs --standard=Drupal docroot/sites/all/modules/custom

#! phpcs --standard=Drupal -- extensions=php,module,inc,install,test,profile, theme docroot/sites/all/modules/custom

#! phpcs --report=checkstyle --standard=Drupal -- extensions=php,module,inc,install,test,profile, theme docroot/sites/all/modules/custom

#! phpcs --report-file=reports/checkstyle.xml -- report=checkstyle --standard=Drupal -- extensions=php,module,inc,install,test,profile, theme docroot/sites/all/modules/custom

#! The Missing Element? Git stores the code phpcs produces the reports Jenkins and processes reports What fits all these elements together?

#! Phing! (did I mention it was awesome?)

#! phpcs Phing Module Tell Phing what files we want to scan Use the phpcs Phing module to scan the files and what standard to use Output the report in a checkstyle.xml file

#!

#!

#!

#! Add PHP CodeSniffer To Jenkins Use the Phing plugin to invoke Phing target

#! Publish PHP CodeSniffer Output Create a Post Build action Reports directory contains PHPCS report Checkstyle plugin creates graphs from this file

#!

Try It Yourself PHP Mess Detect Phing output into PMD Analysis Results graphs in Jenkins PHP Copy Paste Detect Phing output into Duplicate Code Analysis results graphs in Jenkins

#! Do More! Use Phing to run an action Use Jenkins to automate it — or — Use Phing to generate reports Use Jenkins plugins to convert reports into graphs

#! joind.in/10137

#! Me Phil Norton #! code ( Technical Lead at Access Help run NWDUG DrupalCampNW2013 co-organizer Help out at PHPNW