TYPO3 deployment
with Jenkins
Daniel Klockenkämper @derdanne
T3CRR 2014 dk@marketing-factory.de
before Jenkins
multiple people working on every deployment
we were really slow
deployment quality was low
rarely deployed
big changes
rollbacks were painful
the classics:
technically that should work ...
that worked on dev ...
since when we have this in prod?
let’s debug in production, yay
Let’s check out our
mission objectives!
velocity
quality
simplicity
workflow reflection
automation
let us write some shell scripts!
OK, bad idea - so why Jenkins?
natively supports our favorite versioning system
svn, git, cvs ...
it is easy to install
it has dozens of plugins
it uses build management tools like ant or maven
you can trigger build jobs from external sources
easy to monitor
REST API
XML, JSON, Python
you can use notifications
email, jabber, ...
it is free!
everybody loves pushing buttons!
cool story bro!
what are we doing with it?
testing code
syntax, unit, integration ...
deployment to our environments user-dev, dev, staging, live
synchronize environments from live
test performance of
our live websites
minify css
concatenate js
compile sass
any prerequisites for deployment?
use a versioning system!!!
strictly separate configs from userdata
do not push userdata in your versioning system!
develop in local environment (vagrant?)
force devs to not insert TS in DB
force be users to not change config or install / change extensions
install extensions:
coreapi (6.2)
cleartypo3cache and t3deploy (4.5)
then which steps to deploy
TYPO3 6.2
code to production?
new tag of code
triggers minify/concat job
anybody could now push the code to production
even the project manager :)
tests syntax of files that have changed
checks for modifications
on the target
checks out code on the target system
reverts
typo3conf/PackageStates.php
deletes temporary files in typo3temp
Cache/*
compressor/*
cs/*
llxml/*
sprites/*
rtehtmlarea*
clears opcache code of php
opcache_reset();
generates new TYPO3 opcode cache
using curl request
clears cache in db:
cli_dispatch.phpsh extbase cacheapi:clearallcaches
updates the database:
cli_dispatch.phpsh extbase databaseapi:databasecompare 4,2,3
triggers frontend testing suite
(sitespeed.io)
sends notification when build was not successful