Presentation by Fabrizio Branca at the Jenkins User Conference 2015 in Santa Clara, California
This talk provides a closer look into processes from collaboratively writing code, having it tested automatically and deployed it in a safe and efficient way to multiple server with a push of a button. Learn how to setup solid workflows covering both automated steps for builds, unit and selenium testing as well as manually triggered steps for approval and automated deployments to AWS. Find out how to structure your web project and learn about the underlying deployment patterns.
19. #jenkinsconf / @fbrnc
What is it?
A simple shell script. That’s it!
No Ant, no Phing, no fancy PHP tool/framework
Where is it used?
In the build job of a Jenkins server
What does it need to know?
Where to get all the source code from
What does it do?
add metadata, composer, minify,
packaging, upload to S3
20. #jenkinsconf / @fbrnc
What is it?
A couple of chef cookbooks.
Run by AWS OpsWorks or Vagrant,…
Where is it used?
On the target servers
What does it need to know?
The role of the server (web server, devbox, Redis,…)
What does it do?
Installing and configuring web server,
PHP, MySQL, Redis,…
21. #jenkinsconf / @fbrnc
What is it?
A simple shell script.
Or the “deploy” chef cookbook
Or EasyDeployWorkflows
Where is it used?
On the target servers
What does it need to know?
How to get the build and where to deploy it to
What does it do?
(Resetting the environment), getting the build, extracting it, managing
release folders and symlinks, triggering installer,
cleanup old releases
22. #jenkinsconf / @fbrnc
What is it?
A simple shell script.
Sometimes triggered inside “deploy” before_migrate.rb
Where is it used?
On the target servers, called from deployment step
What does it need to know?
What environment this is. Injected settings
What does it do?
Run modman, apply settings, trigger update scripts, customize cache
prefix, indexing,…
23. #jenkinsconf / @fbrnc
doesn’t know anything about
the app, except where to get it
from and where to put it
knows how to get
the app up and
running
25. #jenkinsconf / @fbrnc
no creating
CMS blocks
no creating
product attributes
no updating of any
configuration settings!
no clearing
the cache
no purging CDN or
Reverse Proxy
content!
36. #jenkinsconf / @fbrnc
Static Code
Analysis
Install on
“Integration”
First system where
code from all
developers/teams
meets each other
unstable system,
might be broken,
will be rebuilt
without warning
38. #jenkinsconf / @fbrnc
Unit Tests Integration Tests
AOE PMD
(for Magento)
broken links,
HTTP headers,
W3C validity,…
Test features that rely on other parts
(e.g. framework, external services,…)
External components
(SSL, Redis, Varnish,
ERP, Data Import,…)
Basically this is also
PHPUnit, but addressing
other things
44. #jenkinsconf / @fbrnc
Again:
multiple servers or
autoscaling setup
Stress
Tests
Install on
“Production”
A/B
Deployments
on different
scales
Plan B:
rollback
Zero Downtime
51. #jenkinsconf / @fbrnc
Version
Control
Code Reviews Build Static Code
Analysis
Install on
“Integration”
Unit Tests Integration
Tests
Acceptance
Tests
Install on
“Staging”
Install on
“Production”
Enable
Features
52. #jenkinsconf / @fbrnc
Pipeline Visualization
#284
#283
#282
#281
#280
Build
Static Code
Analysis
Unit
Tests
Install on
“Integration”
Integration
Tests
Acceptance
Tests
#285
for team dashboards