SlideShare a Scribd company logo
Continuous
Delivery
@wajrcs
folio3, 26 Jan 2017
https://github.com/waqar-alamgir/learning-travis
Case
Studies
Agile 101
&
The first sprint of a Team
Iteration
Analysis + Design
Development
Testing + Showcase
0 1 2 3 4
Integration + QA Release and operation
Customer
Centralized QA IT Operations
"Agile" team
The "last mile"
Agile 101
Barnes&Noble | NOOK
disrupting traditional businesses
http://code.flickr.net/
Flickr, a Yahoo company - Web 2.0
Why
Releasing
Frequently?
1. Build the right thing
Eric Ries, “The Lean Startup” http://bit.ly/8ZoX5F
Customer
development
Agile product
development
Releasing Frequently
Do Less
“Far More than 50% of functionality in
the Software is never or rarely used.
Many are no value features.”
• Create hypothesis
• Deliver minimum viable product
• Get feedback (repeat)
Eric Ries, “The Lean Startup” http://bit.ly/8ZoX5F
Data
Ideas
BuildLearn
Scientific Method
Measure
Code
“How long would it take your
organization to deploy a change that
involved just one single line of code? Do
you do this on a repeatable, reliable
basis?”
Mary and Tom Poppendieck, Implementing Lean Software Development, p59.
Ask this Question
1. build the right thing
2. reduce risk of release
John Allspaw: “Ops Metametrics”http://slidesha.re/dsSZIr
Releasing Frequently
Optimize for MTRS
Mean Time
Between Failures
Mean Time
Restore Service
John Allspaw: “Building Resilience in Web Development and Operations”
http://www.usievents.com/en/conferences/8-paris-usi-2011/sessions/968-john-allspaw
Optimize for MTRS
1. build the right thing
2. reduce risk of release
3. real project progress
Releasing Frequently
Releasing Frequently
Our highest priority is to satisfy
the customer through early and
continuous delivery of valuable
software
Agile Manifesto
Software always be production ready.
Releases tied to business needs, not operational
constraints.
Continuous Delivery
Fast, automated feedback on
the production readiness of
your applications every time
there is a change - to code,
infrastructure, or configuration
Production-ready Software
automation
patterns and practices
collaboration
Continuous Delivery
configuration management
More:
http://www.slideshare.net/wajrcs/infrastructure-automation-with-chef-ansible
continuous integration
automated testing
Ingredients
Develop
Build
Mainline
Server
Build
pull
Local
Workstation
Build
push
✔
Done!
“Cease dependence on
mass inspection to
achieve quality.
Improve the process
and build quality into
the product in the first
place”
W. Edwards Deming
Build quality
Business facing
Technology facing
Critiqueproject
Supportprogramming
AUTOMATED
Functional
acceptance tests
MANUAL
Showcases
Usability
testing
Exploratory
testing
Unit tests Non-functional
Integration tests acceptance tests
System tests (performance, scaling, ...)
AUTOMATED MANUAL /AUTOMATED
Diagram invented by Brian Marick
Different Kinds of Testing
an automated implementation of your
system’s build, deploy, test, release process
visibility
feedback
control
Deployment pipeline
Delivery team Version control Build & unit
tests
Automated
acceptance tests
User acceptance
tests
Release
Check in
Feedback
Trigger
Check in
Feedback
Trigger
Trigger
Check in
Trigger
Trigger
Approval
Approval
Feedback
Feedback
Feedback
Feedback
Deployment Pipeline
Why?
• Easier to test
• Easier to measure
• Easier to follow
• Streamlines the development process
Code Quality
When someone doesn’t follow the coding style guidelines
• PEAR coding standard -
http://pear.php.net/manual/en/standards.php
• PEAR2 coding standard -
http://pear.php.net/manual/en/pear2cs.rules.
php
• PHP Standards Working Group -
http://groups.google.com/group/php-
standards
Measuring Code Quality
• Use an indent of 4 spaces, with no tabs.
• Control Structures:
<?php
if ((condition1) || (condition2)) {
action1;
} elseif ((condition3) && (condition4)) {
action2;
} else {
defaultAction;
}
?>
PEAR Coding Standard
• Broad
• Strict, but flexible
• Based on a “standard” standard
• Everyone must follow
Custom Standards
"tokenises your PHP, JavaScript and CSS files and
detects violations of a defined set of coding
standards“
http://pear.php.net/package/PHP_CodeSniffer
• PEAR package
• Single file or entire directory
• Preset and customizable
PHP_CodeSniffer
$ phpcs /myDir/myFile.php
FILE: /myDir/myFile.php
--------------------------------------------------------------------------------
FOUND 3 ERROR(S) AFFECTING 3 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
20 | ERROR | PHP keywords must be lowercase;
expected "false" but found "FALSE"
47 | ERROR | Line not indented correctly;
expected 4 spaces but found 1
--------------------------------------------------------------------------------
Output
• Unit - the smallest piece of testable code
within my application or script.
• Unit test - a piece of code that executes the
unit and then evaluates the result returned.
Unit Tests
• Make sure the unit is small enough so the test
is testing a single function.
• Make sure the test is efficient enough to run
repeatedly, perhaps even a thousand times a
day.
• Make sure the tests do not depend on each
other. Each test should be able to run
completely separately from other tests.
Tips
function validateName($name) {
if ((strlen($name) > 1) && (strlen($name) < 50)) {
if (ctype_alpha(str_replace(array(" ",",","-","'"),"",$name))) {
return true;
}
else {
return false;
}
}
else {
return false;
}
}
assert(validateName("Beth's Test Name"));
How Many Tests?
Enough to test every basic function of the code.
• Standardize test format
• Easily run tests
• Analyze results
Testing Frameworks
PHPUnit - http://www.phpunit.de
Pros:
• Good documentation
• Lots of examples online
• Integrates with many other popular tools and
platforms
Cons:
• Command line only
SimpleTest - http://www.simpletest.org/
Pros:
• Run on command line or in browser
• Can test front-end functionality
Cons:
• Not as integrated as PHPUnit
Selenium - http://seleniumhq.org/
Pros:
• Can test front-end functionality
• Selenium-WebDriver (makes direct calls to the
browser using each browser’s native support
for automation)
Cons:
• Not a native PHP tool, but bindings are
available from several third-parties
• Perform a DB query to update the schema,
clear a cache, upload files, run cron tasks, etc.
Automate The Build
Phing - http://phing.info
• PHP project build system
• Based on Apache Ant
• XML build files and PHP "task" classes
• Integrates with both PHPUnit and SimpleTest
as well as phpDocumentor
• Platform independent
• No required external dependencies
PhingBuildfile:
<?xml version="1.0" encoding="UTF-8"?>
<project name="FooBar" default="dist">
<!-- ============================================ -->
<!-- Target: prepare -->
<!-- ============================================ -->
<target name="prepare">
<echo msg="Making directory ./build" />
<mkdir dir="./build" />
</target>
<!-- ============================================ -->
<!-- Target: build -->
<!-- ============================================ -->
<target name="build" depends="prepare">
<echo msg="Copying ./about.php to ./build directory..." />
<copy file="./about.php" tofile="./build/about.php" />
</target>
<!-- ============================================ -->
<!-- (DEFAULT) Target: dist -->
<!-- ============================================ -->
<target name="dist" depends="build">
<echo msg="Creating archive..." />
<tar destfile="./build/build.tar.gz"
compression="gzip">
<fileset dir="./build">
<include name="*" />
</fileset>
</tar>
<echo msg="Files copied and compressed in build
directory OK!"/>
</target>
</project>
Maven - http://maven.apache.org
• Supports Ant tasks
• Large library of third-party plug-ins to
integrate other continuous integration tools
• Helps shield you from the details of the build
• For Java-based projects, so you’ll need Maven
for PHP: http://www.php-maven.org/
Capistrano - http://www.capistranorb.com
• A remote server automation and
deployment tool written in Ruby.
Capistrano File:
set :application, "yii_blog" #Edit your app name
set :repo_url, "https://github.com/waqar-alamgir/yii-capistrano.git" # EDIT your git repository
if ENV['user']
set :repo_url, "https://" + ENV['user'] + "@github.com/waqar-alamgir/yii-capistrano.git" # EDIT your git repository
end
set :deploy_to, "/var/www/html/yii-capistrano/" # EDIT folder where files should be deployed to
set :scm, "git"
set :branch, ENV['branch'] || "master"
namespace :deploy do
# Writing permissions to /protected/runtime/ and /assets/
desc "Restart"
after :updated, :build do
on roles(:app) do
within release_path do
execute :chmod, "-R 777 #{release_path}/protected/runtime/"
execute :chmod, "-R 777 #{release_path}/assets/"
end
end
end
# Copy yii configuration files /protected/config/
desc "Copy config file"
after :updated, :build do
on roles(:all) do |host|
%w[ yii-config/main.php , yii-config/console.php ].each do |f|
upload! "" + f , "#{release_path}/protected/config/" + f
end
end
end
# Run yii database migrations
desc "Build"
after :updated, :build do
on roles(:app) do
within release_path do
execute :php, "#{release_path}/protected/yiic migrate --interactive=0"
end
end
end
end
https://github.com/waqar-alamgir/yii-capistrano
• phpDocumentor 2:
http://www.phpdoc.org/
• Merging phpDocumentor and DocBlox
• Automates documentation
• Tutorial:
http://manual.phpdoc.org/HTMLSmartyConverte
r/HandS/phpDocumentor/tutorial_phpDocument
or.howto.pkg.html
Documentation
http://stackoverflow.com/questions/1310050/php-function-comments/3823007#3823007
/**
* Does something interesting
*
* @param Place $where Where something interesting takes place
* @param integer $repeat How many times something interesting should happen
*
* @throws Some_Exception_Class If something interesting cannot happen
* @author Waqar Alamgir <bonjour@waqaralamgir.t>
* @return Status
*/
/**
* Short description for class
*
* Long description for class (if any)...
*
* @copyright 2016 Zend Technologies
* @license http://www.zend.com/license/3_0.txt PHP License 7.0
* @version Release: @package_version@
* @link http://dev.zend.com/package/PackageName
* @since Class available since Release 1.2.0
*/
Technical Debt
Assigns a technical debt value
• The debt
• The cost to reimburse
• The work to reimburse
• The breakdown
When the technical debt unrolls
1. Email plugin
Sends a build status email.
2. Lint plugin/ Php parallel lint plugin
This plugin runs PHP's built in Lint (syntax / error check) functionality.
Similar to the standard PHP Lint plugin, except that it uses the PHP Parallel Lint project to run.
3. Pdepend plugin
Runs PDepend software metrics.
4. PHP Code Sniffer plugin
Runs PHP Code Sniffer against your build.
5. Php copy paste detector plugin
Runs PHP Copy / Paste Detector against your build.
6. PHP Docblock Checker
Runs the PHP Docblock Checker against your build. This tool verifies that all classes and methods have
docblocks.
7. Php loc plugin
Runs PHPLoc against your project and records some key metrics.
8. Php mess detector plugin
Runs PHP Mess Detector against your build. Records some key metrics, and also reports errors and warnings.
9. PhpUnit Plugin
Runs PHPUnit tests against your build.
10. Technical Debt Plugin
Checks all files in your project for TODOs and other technical debt.
• Cruise Control
• Hudson / Jenkins
• PHP CI
• Travis CI
Continuous Integration Tools
PHPCI - Reporting
• Project is small, budget is small…
• Evaluate which tools are worthwhile to your
specific project.
Yes, But…
• Consider including unit tests or code
cost/coverage reports in your deliverables to
your customers as an added value to them
(and you down the road).
Make It a Deliverable
Project:
A customer hires you to create a registration
form for a one-time event. It’s a small
customer with a small budget. It should take a
couple hundred lines of code in a single file,
results will be e-mailed. It will be tested by the
event staff and the marketing department on
the live site as they do not have a test
environment, and it will only be live for two
months.
What they need:
1. If they do not have an in-house standard for
you to follow, write it using one of the main
coding standards, like PEAR.
2. Create unit tests for it.
What they don’t need:
1. In-depth reporting
2. Full automation, including build.
3. Documentation
Project:
A customer hires you for an ongoing project. On
the 15th of every month, they need you to go
in and add a new survey to collect data and
write it to a database. The previous month’s
survey data needs to be backed up and
cleared out of the database when the new
survey goes live.
What they need:
1. If they do not have an in-house standard for
you to follow, write it using one of the main
coding standards, like PEAR.
2. Create unit tests for it and use a testing
framework.
3. Automate the build.
What they don’t need:
1. In-depth reporting (Maybe)
2. Documentation (Maybe)
Project:
A customer hires you to write one part of a very
large application. Other consultants that you
do not have access to will be working on other
parts of the application at the same time.
What they need:
1. All of it
In this situation, see if you can convince them to
get everyone working on a unified
continuous integration platform utilizing a
complete suite of continuous integration
tools from standards to documentation and
fully automated everywhere in between.
Not everything is beneficial
enough to use in every
situation, so choose the right
tools for your project and
needs.
Take Away #1
The fewer steps I have to
remember to do manually, the
more successful my project will
be.
Take Away #2
release ! = deployment
No builds. No change. No upgrades. Is it read-only Day?
NAH! NOT NECESSARILY
Take Away #3
[featureToggles]
wobblyFoobars: true
flightyForkHandles: false
Config File
<?if ($wobblyFoobars) {?>
... various UI elements
<?}?>
some.php
$fork_handle = ($featureConfig->isOn(‘flightlyForkHandles‘)) ?
new flightyForkHander(aCandle) :
new forkHandler(aCandle);
other.php
Stolen from Martin Fowler http://martinfowler.com/bliki/FeatureToggle.html
Feature Toggles
https://github.com/waqar-alamgir/learning-travis
Travis Demo
Resources
• CruiseControl - http://cruisecontrol.sourceforge.net
• Guide to writing your own PHP_CodeSniffer standards (Official) -
http://pear.php.net/manual/en/package.php.php-codesniffer.coding-standard-tutorial.php
• Guide to writing your own PHP_CodeSniffer standards (Alternate) - http://luhman.org/blog/2009/12/17/setting-
custom-coding-standards-php-codesniffer
• Hudson - http://hudson-ci.org
• Jenkins - http://jenkins-ci.org
• Maven - http://www.php-maven.org
• PEAR coding standard - http://pear.php.net/manual/en/standards.php
• PEAR Package Manager Installation - http://pear.php.net/manual/en/installation.php
• PEAR Packages Installation - http://pear.php.net/manual/en/guide.users.commandline.installing.php
• PEAR2 coding standard - http://pear.php.net/manual/en/pear2cs.rules.php
• Phing - http://phing.info
• PHP Standards Working Group - http://groups.google.com/group/php-standards
• PHP_CodeSniffer - http://pear.php.net/package/PHP_CodeSniffer
• phpDocumentor 2 - http://www.phpdoc.org/
• PHPUnit - http://www.phpunit.de/manual/3.6/en/automating-tests.html
• phpUnderControl - http://phpundercontrol.org
• Selenium - http://seleniumhq.org/
• SimpleTest - http://www.simpletest.org
• Sonar - http://www.sonarsource.org
• Sonar PHP Plug-in - http://docs.codehaus.org/display/SONAR/PHP+Plugin
• Sonar Technical Debt Plugin - http://docs.codehaus.org/display/SONAR/Technical+Debt+Plugin
• Template for Jenkins Jobs for PHP Projects by Sebastian Bergmann - http://jenkins-php.org
QA
Please send your Feedback at
@wajrcs / walamgir@folio3.com
Thank Y u

More Related Content

What's hot

Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
JWORKS powered by Ordina
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
Richard Giles
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-to
Nicolas Fränkel
 
Automated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonAutomated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave Sadlon
QA or the Highway
 
The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014
The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014
The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014
Puppet
 
Create, test, secure, repeat
Create, test, secure, repeatCreate, test, secure, repeat
Create, test, secure, repeat
Michelangelo van Dam
 
How To Find Information On Your Own
How To Find Information On Your OwnHow To Find Information On Your Own
How To Find Information On Your Own
Dave Haeffner
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
Marakana Inc.
 
Behat bdd training (php) course slides pdf
Behat bdd training (php) course slides pdfBehat bdd training (php) course slides pdf
Behat bdd training (php) course slides pdf
seleniumbootcamp
 
Unit testing - A&BP CC
Unit testing - A&BP CCUnit testing - A&BP CC
Unit testing - A&BP CC
JWORKS powered by Ordina
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
Nicolas Fränkel
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
Brian Sam-Bodden
 
DevOps & Security: Here & Now
DevOps & Security: Here & NowDevOps & Security: Here & Now
DevOps & Security: Here & Now
Checkmarx
 
Continuous Security Testing in a Devops World #OWASPHelsinki
Continuous Security Testing in a Devops World #OWASPHelsinkiContinuous Security Testing in a Devops World #OWASPHelsinki
Continuous Security Testing in a Devops World #OWASPHelsinki
Stephen de Vries
 
Continuous Deployment at Etsy — TimesOpen NYC
Continuous Deployment at Etsy — TimesOpen NYCContinuous Deployment at Etsy — TimesOpen NYC
Continuous Deployment at Etsy — TimesOpen NYC
Mike Brittain
 
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Christian Schneider
 
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon
 
JNation - Integration Testing from the Trenches Rebooted
JNation - Integration Testing from the Trenches RebootedJNation - Integration Testing from the Trenches Rebooted
JNation - Integration Testing from the Trenches Rebooted
Nicolas Fränkel
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Steven Smith
 
Jbehave selenium
Jbehave seleniumJbehave selenium
Jbehave selenium
Vadim Goncharenko
 

What's hot (20)

Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
PowerShell Plus v4.7 Overview
PowerShell Plus v4.7 OverviewPowerShell Plus v4.7 Overview
PowerShell Plus v4.7 Overview
 
JavaLand - Integration Testing How-to
JavaLand - Integration Testing How-toJavaLand - Integration Testing How-to
JavaLand - Integration Testing How-to
 
Automated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonAutomated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave Sadlon
 
The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014
The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014
The Seven Habits of Highly Effective Puppet Users - PuppetConf 2014
 
Create, test, secure, repeat
Create, test, secure, repeatCreate, test, secure, repeat
Create, test, secure, repeat
 
How To Find Information On Your Own
How To Find Information On Your OwnHow To Find Information On Your Own
How To Find Information On Your Own
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
 
Behat bdd training (php) course slides pdf
Behat bdd training (php) course slides pdfBehat bdd training (php) course slides pdf
Behat bdd training (php) course slides pdf
 
Unit testing - A&BP CC
Unit testing - A&BP CCUnit testing - A&BP CC
Unit testing - A&BP CC
 
Riga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous IntegrationRiga Dev Day - Automated Android Continuous Integration
Riga Dev Day - Automated Android Continuous Integration
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
DevOps & Security: Here & Now
DevOps & Security: Here & NowDevOps & Security: Here & Now
DevOps & Security: Here & Now
 
Continuous Security Testing in a Devops World #OWASPHelsinki
Continuous Security Testing in a Devops World #OWASPHelsinkiContinuous Security Testing in a Devops World #OWASPHelsinki
Continuous Security Testing in a Devops World #OWASPHelsinki
 
Continuous Deployment at Etsy — TimesOpen NYC
Continuous Deployment at Etsy — TimesOpen NYCContinuous Deployment at Etsy — TimesOpen NYC
Continuous Deployment at Etsy — TimesOpen NYC
 
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
 
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
 
JNation - Integration Testing from the Trenches Rebooted
JNation - Integration Testing from the Trenches RebootedJNation - Integration Testing from the Trenches Rebooted
JNation - Integration Testing from the Trenches Rebooted
 
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
Breaking Dependencies to Allow Unit Testing - DevIntersection Spring 2016
 
Jbehave selenium
Jbehave seleniumJbehave selenium
Jbehave selenium
 

Viewers also liked

1, 2, 3 build - continuous integration für mobile apps
1, 2, 3   build - continuous integration für mobile apps1, 2, 3   build - continuous integration für mobile apps
1, 2, 3 build - continuous integration für mobile apps
Alexander Pacha
 
(DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014
(DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014(DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014
(DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014
Amazon Web Services
 
Continuous Delivery for Open Source Java projects
Continuous Delivery for Open Source Java projectsContinuous Delivery for Open Source Java projects
Continuous Delivery for Open Source Java projects
Tricode (part of Dept)
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
hugo lu
 
Java and DevOps: Supercharge Your Delivery Pipeline with Containers
Java and DevOps: Supercharge Your Delivery Pipeline with ContainersJava and DevOps: Supercharge Your Delivery Pipeline with Containers
Java and DevOps: Supercharge Your Delivery Pipeline with Containers
Red Hat Developers
 
Cloudschool 2014
Cloudschool 2014Cloudschool 2014
Cloudschool 2014
Sébastien ☁ Stormacq
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
amscanne
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
Mike McGarr
 
Continuous Integration 101
Continuous Integration 101Continuous Integration 101
Continuous Integration 101
John Ferguson Smart Limited
 
CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with Jenkins
Martin Málek
 

Viewers also liked (10)

1, 2, 3 build - continuous integration für mobile apps
1, 2, 3   build - continuous integration für mobile apps1, 2, 3   build - continuous integration für mobile apps
1, 2, 3 build - continuous integration für mobile apps
 
(DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014
(DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014(DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014
(DEV308) Automating Your Software Delivery Pipeline | AWS re:Invent 2014
 
Continuous Delivery for Open Source Java projects
Continuous Delivery for Open Source Java projectsContinuous Delivery for Open Source Java projects
Continuous Delivery for Open Source Java projects
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Java and DevOps: Supercharge Your Delivery Pipeline with Containers
Java and DevOps: Supercharge Your Delivery Pipeline with ContainersJava and DevOps: Supercharge Your Delivery Pipeline with Containers
Java and DevOps: Supercharge Your Delivery Pipeline with Containers
 
Cloudschool 2014
Cloudschool 2014Cloudschool 2014
Cloudschool 2014
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Continuous Integration 101
Continuous Integration 101Continuous Integration 101
Continuous Integration 101
 
CI and CD with Jenkins
CI and CD with JenkinsCI and CD with Jenkins
CI and CD with Jenkins
 

Similar to Continuous Delivery - Automate & Build Better Software with Travis CI

Continuous feature-development
Continuous feature-developmentContinuous feature-development
Continuous feature-development
nhm taveer hossain khan
 
No Devops Without Continuous Testing
No Devops Without Continuous TestingNo Devops Without Continuous Testing
No Devops Without Continuous Testing
Parasoft
 
KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdf
QA or the Highway
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
CIVEL Benoit
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
CIVEL Benoit
 
Beginners overview of automated testing with Rspec
Beginners overview of automated testing with RspecBeginners overview of automated testing with Rspec
Beginners overview of automated testing with Rspec
jeffrey1ross
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
Matt Eland
 
Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023
Scott Keck-Warren
 
Automated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and ChallengesAutomated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and Challenges
Tao Xie
 
QuerySurge for DevOps
QuerySurge for DevOpsQuerySurge for DevOps
QuerySurge for DevOps
RTTS
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
TEST Huddle
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
toddbr
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
Taylor Lovett
 
Workshop quality assurance for php projects - phpdublin
Workshop quality assurance for php projects - phpdublinWorkshop quality assurance for php projects - phpdublin
Workshop quality assurance for php projects - phpdublin
Michelangelo van Dam
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
Amazon Web Services
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server Management
Sharkrit JOBBO
 
May: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and ChallengesMay: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and Challenges
TriTAUG
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
egoodwintx
 
Salesforce Continuous Integration with AutoRABIT
Salesforce Continuous Integration with AutoRABITSalesforce Continuous Integration with AutoRABIT
Salesforce Continuous Integration with AutoRABIT
Vishnu Raju Datla
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum
 

Similar to Continuous Delivery - Automate & Build Better Software with Travis CI (20)

Continuous feature-development
Continuous feature-developmentContinuous feature-development
Continuous feature-development
 
No Devops Without Continuous Testing
No Devops Without Continuous TestingNo Devops Without Continuous Testing
No Devops Without Continuous Testing
 
KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdf
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 
Beginners overview of automated testing with Rspec
Beginners overview of automated testing with RspecBeginners overview of automated testing with Rspec
Beginners overview of automated testing with Rspec
 
How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.How do you tame a big ball of mud? One test at a time.
How do you tame a big ball of mud? One test at a time.
 
Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023Getting Started with Test-Driven Development at PHPtek 2023
Getting Started with Test-Driven Development at PHPtek 2023
 
Automated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and ChallengesAutomated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and Challenges
 
QuerySurge for DevOps
QuerySurge for DevOpsQuerySurge for DevOps
QuerySurge for DevOps
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Workshop quality assurance for php projects - phpdublin
Workshop quality assurance for php projects - phpdublinWorkshop quality assurance for php projects - phpdublin
Workshop quality assurance for php projects - phpdublin
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
 
Windows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server ManagementWindows 2012 R2 Multi Server Management
Windows 2012 R2 Multi Server Management
 
May: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and ChallengesMay: Automated Developer Testing: Achievements and Challenges
May: Automated Developer Testing: Achievements and Challenges
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
 
Salesforce Continuous Integration with AutoRABIT
Salesforce Continuous Integration with AutoRABITSalesforce Continuous Integration with AutoRABIT
Salesforce Continuous Integration with AutoRABIT
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
 

More from wajrcs

Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
wajrcs
 
RDF Join Query Processing with Dual Simulation Pruning
RDF Join Query Processing with Dual Simulation PruningRDF Join Query Processing with Dual Simulation Pruning
RDF Join Query Processing with Dual Simulation Pruning
wajrcs
 
A Fairness-aware Machine Learning Interface for End-to-end Discrimination Dis...
A Fairness-aware Machine Learning Interface for End-to-end Discrimination Dis...A Fairness-aware Machine Learning Interface for End-to-end Discrimination Dis...
A Fairness-aware Machine Learning Interface for End-to-end Discrimination Dis...
wajrcs
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
wajrcs
 
Hacking hhvm
Hacking hhvmHacking hhvm
Hacking hhvm
wajrcs
 
Domain Driven Design using Laravel
Domain Driven Design using LaravelDomain Driven Design using Laravel
Domain Driven Design using Laravel
wajrcs
 

More from wajrcs (6)

Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
 
RDF Join Query Processing with Dual Simulation Pruning
RDF Join Query Processing with Dual Simulation PruningRDF Join Query Processing with Dual Simulation Pruning
RDF Join Query Processing with Dual Simulation Pruning
 
A Fairness-aware Machine Learning Interface for End-to-end Discrimination Dis...
A Fairness-aware Machine Learning Interface for End-to-end Discrimination Dis...A Fairness-aware Machine Learning Interface for End-to-end Discrimination Dis...
A Fairness-aware Machine Learning Interface for End-to-end Discrimination Dis...
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
 
Hacking hhvm
Hacking hhvmHacking hhvm
Hacking hhvm
 
Domain Driven Design using Laravel
Domain Driven Design using LaravelDomain Driven Design using Laravel
Domain Driven Design using Laravel
 

Recently uploaded

Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 

Recently uploaded (20)

Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 

Continuous Delivery - Automate & Build Better Software with Travis CI

  • 1. Continuous Delivery @wajrcs folio3, 26 Jan 2017 https://github.com/waqar-alamgir/learning-travis
  • 3. Agile 101 & The first sprint of a Team
  • 4. Iteration Analysis + Design Development Testing + Showcase 0 1 2 3 4 Integration + QA Release and operation Customer Centralized QA IT Operations "Agile" team The "last mile" Agile 101
  • 8. 1. Build the right thing Eric Ries, “The Lean Startup” http://bit.ly/8ZoX5F Customer development Agile product development Releasing Frequently
  • 9. Do Less “Far More than 50% of functionality in the Software is never or rarely used. Many are no value features.”
  • 10. • Create hypothesis • Deliver minimum viable product • Get feedback (repeat) Eric Ries, “The Lean Startup” http://bit.ly/8ZoX5F Data Ideas BuildLearn Scientific Method Measure Code
  • 11. “How long would it take your organization to deploy a change that involved just one single line of code? Do you do this on a repeatable, reliable basis?” Mary and Tom Poppendieck, Implementing Lean Software Development, p59. Ask this Question
  • 12. 1. build the right thing 2. reduce risk of release John Allspaw: “Ops Metametrics”http://slidesha.re/dsSZIr Releasing Frequently
  • 14. Mean Time Between Failures Mean Time Restore Service John Allspaw: “Building Resilience in Web Development and Operations” http://www.usievents.com/en/conferences/8-paris-usi-2011/sessions/968-john-allspaw Optimize for MTRS
  • 15. 1. build the right thing 2. reduce risk of release 3. real project progress Releasing Frequently
  • 16.
  • 18. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software Agile Manifesto
  • 19. Software always be production ready. Releases tied to business needs, not operational constraints. Continuous Delivery
  • 20. Fast, automated feedback on the production readiness of your applications every time there is a change - to code, infrastructure, or configuration Production-ready Software
  • 24. “Cease dependence on mass inspection to achieve quality. Improve the process and build quality into the product in the first place” W. Edwards Deming Build quality
  • 25. Business facing Technology facing Critiqueproject Supportprogramming AUTOMATED Functional acceptance tests MANUAL Showcases Usability testing Exploratory testing Unit tests Non-functional Integration tests acceptance tests System tests (performance, scaling, ...) AUTOMATED MANUAL /AUTOMATED Diagram invented by Brian Marick Different Kinds of Testing
  • 26. an automated implementation of your system’s build, deploy, test, release process visibility feedback control Deployment pipeline
  • 27. Delivery team Version control Build & unit tests Automated acceptance tests User acceptance tests Release Check in Feedback Trigger Check in Feedback Trigger Trigger Check in Trigger Trigger Approval Approval Feedback Feedback Feedback Feedback Deployment Pipeline
  • 28. Why? • Easier to test • Easier to measure • Easier to follow • Streamlines the development process Code Quality When someone doesn’t follow the coding style guidelines
  • 29. • PEAR coding standard - http://pear.php.net/manual/en/standards.php • PEAR2 coding standard - http://pear.php.net/manual/en/pear2cs.rules. php • PHP Standards Working Group - http://groups.google.com/group/php- standards Measuring Code Quality
  • 30. • Use an indent of 4 spaces, with no tabs. • Control Structures: <?php if ((condition1) || (condition2)) { action1; } elseif ((condition3) && (condition4)) { action2; } else { defaultAction; } ?> PEAR Coding Standard
  • 31. • Broad • Strict, but flexible • Based on a “standard” standard • Everyone must follow Custom Standards
  • 32. "tokenises your PHP, JavaScript and CSS files and detects violations of a defined set of coding standards“ http://pear.php.net/package/PHP_CodeSniffer • PEAR package • Single file or entire directory • Preset and customizable PHP_CodeSniffer
  • 33. $ phpcs /myDir/myFile.php FILE: /myDir/myFile.php -------------------------------------------------------------------------------- FOUND 3 ERROR(S) AFFECTING 3 LINE(S) -------------------------------------------------------------------------------- 2 | ERROR | Missing file doc comment 20 | ERROR | PHP keywords must be lowercase; expected "false" but found "FALSE" 47 | ERROR | Line not indented correctly; expected 4 spaces but found 1 -------------------------------------------------------------------------------- Output
  • 34. • Unit - the smallest piece of testable code within my application or script. • Unit test - a piece of code that executes the unit and then evaluates the result returned. Unit Tests
  • 35. • Make sure the unit is small enough so the test is testing a single function. • Make sure the test is efficient enough to run repeatedly, perhaps even a thousand times a day. • Make sure the tests do not depend on each other. Each test should be able to run completely separately from other tests. Tips
  • 36. function validateName($name) { if ((strlen($name) > 1) && (strlen($name) < 50)) { if (ctype_alpha(str_replace(array(" ",",","-","'"),"",$name))) { return true; } else { return false; } } else { return false; } } assert(validateName("Beth's Test Name"));
  • 37. How Many Tests? Enough to test every basic function of the code.
  • 38. • Standardize test format • Easily run tests • Analyze results Testing Frameworks
  • 39. PHPUnit - http://www.phpunit.de Pros: • Good documentation • Lots of examples online • Integrates with many other popular tools and platforms Cons: • Command line only
  • 40. SimpleTest - http://www.simpletest.org/ Pros: • Run on command line or in browser • Can test front-end functionality Cons: • Not as integrated as PHPUnit
  • 41. Selenium - http://seleniumhq.org/ Pros: • Can test front-end functionality • Selenium-WebDriver (makes direct calls to the browser using each browser’s native support for automation) Cons: • Not a native PHP tool, but bindings are available from several third-parties
  • 42. • Perform a DB query to update the schema, clear a cache, upload files, run cron tasks, etc. Automate The Build
  • 43. Phing - http://phing.info • PHP project build system • Based on Apache Ant • XML build files and PHP "task" classes • Integrates with both PHPUnit and SimpleTest as well as phpDocumentor • Platform independent • No required external dependencies
  • 44. PhingBuildfile: <?xml version="1.0" encoding="UTF-8"?> <project name="FooBar" default="dist"> <!-- ============================================ --> <!-- Target: prepare --> <!-- ============================================ --> <target name="prepare"> <echo msg="Making directory ./build" /> <mkdir dir="./build" /> </target> <!-- ============================================ --> <!-- Target: build --> <!-- ============================================ --> <target name="build" depends="prepare"> <echo msg="Copying ./about.php to ./build directory..." /> <copy file="./about.php" tofile="./build/about.php" /> </target> <!-- ============================================ --> <!-- (DEFAULT) Target: dist --> <!-- ============================================ --> <target name="dist" depends="build"> <echo msg="Creating archive..." /> <tar destfile="./build/build.tar.gz" compression="gzip"> <fileset dir="./build"> <include name="*" /> </fileset> </tar> <echo msg="Files copied and compressed in build directory OK!"/> </target> </project>
  • 45. Maven - http://maven.apache.org • Supports Ant tasks • Large library of third-party plug-ins to integrate other continuous integration tools • Helps shield you from the details of the build • For Java-based projects, so you’ll need Maven for PHP: http://www.php-maven.org/
  • 46. Capistrano - http://www.capistranorb.com • A remote server automation and deployment tool written in Ruby.
  • 47. Capistrano File: set :application, "yii_blog" #Edit your app name set :repo_url, "https://github.com/waqar-alamgir/yii-capistrano.git" # EDIT your git repository if ENV['user'] set :repo_url, "https://" + ENV['user'] + "@github.com/waqar-alamgir/yii-capistrano.git" # EDIT your git repository end set :deploy_to, "/var/www/html/yii-capistrano/" # EDIT folder where files should be deployed to set :scm, "git" set :branch, ENV['branch'] || "master" namespace :deploy do # Writing permissions to /protected/runtime/ and /assets/ desc "Restart" after :updated, :build do on roles(:app) do within release_path do execute :chmod, "-R 777 #{release_path}/protected/runtime/" execute :chmod, "-R 777 #{release_path}/assets/" end end end # Copy yii configuration files /protected/config/ desc "Copy config file" after :updated, :build do on roles(:all) do |host| %w[ yii-config/main.php , yii-config/console.php ].each do |f| upload! "" + f , "#{release_path}/protected/config/" + f end end end # Run yii database migrations desc "Build" after :updated, :build do on roles(:app) do within release_path do execute :php, "#{release_path}/protected/yiic migrate --interactive=0" end end end end https://github.com/waqar-alamgir/yii-capistrano
  • 48. • phpDocumentor 2: http://www.phpdoc.org/ • Merging phpDocumentor and DocBlox • Automates documentation • Tutorial: http://manual.phpdoc.org/HTMLSmartyConverte r/HandS/phpDocumentor/tutorial_phpDocument or.howto.pkg.html Documentation
  • 49. http://stackoverflow.com/questions/1310050/php-function-comments/3823007#3823007 /** * Does something interesting * * @param Place $where Where something interesting takes place * @param integer $repeat How many times something interesting should happen * * @throws Some_Exception_Class If something interesting cannot happen * @author Waqar Alamgir <bonjour@waqaralamgir.t> * @return Status */ /** * Short description for class * * Long description for class (if any)... * * @copyright 2016 Zend Technologies * @license http://www.zend.com/license/3_0.txt PHP License 7.0 * @version Release: @package_version@ * @link http://dev.zend.com/package/PackageName * @since Class available since Release 1.2.0 */
  • 50.
  • 51.
  • 52. Technical Debt Assigns a technical debt value • The debt • The cost to reimburse • The work to reimburse • The breakdown When the technical debt unrolls
  • 53. 1. Email plugin Sends a build status email. 2. Lint plugin/ Php parallel lint plugin This plugin runs PHP's built in Lint (syntax / error check) functionality. Similar to the standard PHP Lint plugin, except that it uses the PHP Parallel Lint project to run. 3. Pdepend plugin Runs PDepend software metrics. 4. PHP Code Sniffer plugin Runs PHP Code Sniffer against your build. 5. Php copy paste detector plugin Runs PHP Copy / Paste Detector against your build. 6. PHP Docblock Checker Runs the PHP Docblock Checker against your build. This tool verifies that all classes and methods have docblocks. 7. Php loc plugin Runs PHPLoc against your project and records some key metrics. 8. Php mess detector plugin Runs PHP Mess Detector against your build. Records some key metrics, and also reports errors and warnings. 9. PhpUnit Plugin Runs PHPUnit tests against your build. 10. Technical Debt Plugin Checks all files in your project for TODOs and other technical debt.
  • 54. • Cruise Control • Hudson / Jenkins • PHP CI • Travis CI Continuous Integration Tools
  • 56. • Project is small, budget is small… • Evaluate which tools are worthwhile to your specific project. Yes, But…
  • 57. • Consider including unit tests or code cost/coverage reports in your deliverables to your customers as an added value to them (and you down the road). Make It a Deliverable
  • 58. Project: A customer hires you to create a registration form for a one-time event. It’s a small customer with a small budget. It should take a couple hundred lines of code in a single file, results will be e-mailed. It will be tested by the event staff and the marketing department on the live site as they do not have a test environment, and it will only be live for two months.
  • 59. What they need: 1. If they do not have an in-house standard for you to follow, write it using one of the main coding standards, like PEAR. 2. Create unit tests for it. What they don’t need: 1. In-depth reporting 2. Full automation, including build. 3. Documentation
  • 60. Project: A customer hires you for an ongoing project. On the 15th of every month, they need you to go in and add a new survey to collect data and write it to a database. The previous month’s survey data needs to be backed up and cleared out of the database when the new survey goes live.
  • 61. What they need: 1. If they do not have an in-house standard for you to follow, write it using one of the main coding standards, like PEAR. 2. Create unit tests for it and use a testing framework. 3. Automate the build. What they don’t need: 1. In-depth reporting (Maybe) 2. Documentation (Maybe)
  • 62. Project: A customer hires you to write one part of a very large application. Other consultants that you do not have access to will be working on other parts of the application at the same time.
  • 63. What they need: 1. All of it In this situation, see if you can convince them to get everyone working on a unified continuous integration platform utilizing a complete suite of continuous integration tools from standards to documentation and fully automated everywhere in between.
  • 64. Not everything is beneficial enough to use in every situation, so choose the right tools for your project and needs. Take Away #1
  • 65. The fewer steps I have to remember to do manually, the more successful my project will be. Take Away #2
  • 66. release ! = deployment No builds. No change. No upgrades. Is it read-only Day? NAH! NOT NECESSARILY Take Away #3
  • 67. [featureToggles] wobblyFoobars: true flightyForkHandles: false Config File <?if ($wobblyFoobars) {?> ... various UI elements <?}?> some.php $fork_handle = ($featureConfig->isOn(‘flightlyForkHandles‘)) ? new flightyForkHander(aCandle) : new forkHandler(aCandle); other.php Stolen from Martin Fowler http://martinfowler.com/bliki/FeatureToggle.html Feature Toggles
  • 69. Resources • CruiseControl - http://cruisecontrol.sourceforge.net • Guide to writing your own PHP_CodeSniffer standards (Official) - http://pear.php.net/manual/en/package.php.php-codesniffer.coding-standard-tutorial.php • Guide to writing your own PHP_CodeSniffer standards (Alternate) - http://luhman.org/blog/2009/12/17/setting- custom-coding-standards-php-codesniffer • Hudson - http://hudson-ci.org • Jenkins - http://jenkins-ci.org • Maven - http://www.php-maven.org • PEAR coding standard - http://pear.php.net/manual/en/standards.php • PEAR Package Manager Installation - http://pear.php.net/manual/en/installation.php • PEAR Packages Installation - http://pear.php.net/manual/en/guide.users.commandline.installing.php • PEAR2 coding standard - http://pear.php.net/manual/en/pear2cs.rules.php • Phing - http://phing.info • PHP Standards Working Group - http://groups.google.com/group/php-standards • PHP_CodeSniffer - http://pear.php.net/package/PHP_CodeSniffer • phpDocumentor 2 - http://www.phpdoc.org/ • PHPUnit - http://www.phpunit.de/manual/3.6/en/automating-tests.html • phpUnderControl - http://phpundercontrol.org • Selenium - http://seleniumhq.org/ • SimpleTest - http://www.simpletest.org • Sonar - http://www.sonarsource.org • Sonar PHP Plug-in - http://docs.codehaus.org/display/SONAR/PHP+Plugin • Sonar Technical Debt Plugin - http://docs.codehaus.org/display/SONAR/Technical+Debt+Plugin • Template for Jenkins Jobs for PHP Projects by Sebastian Bergmann - http://jenkins-php.org
  • 70. QA Please send your Feedback at @wajrcs / walamgir@folio3.com Thank Y u