SlideShare a Scribd company logo
WordPress
automation and ci
RAN BAR-ZIK, HEWLETT PACKARD ENTERPRISE, 2016
Ran Bar-Zik (that’s me!) @barzik
 Web developer at Hewlett Packard Enterprise.
 Proud owner of internet-Israel.com website.
 Connect me on LinkedIn, Facebook or Twitter!
 What I do when I am not programming?
4 children, long distance marathoner, Tolkien enthusiastic.
What is automation
Scripts that doing the heavy lifting mundane tasks
• Running code evaluation tasks.
• Running clean-ups
• Running processes before after deployment
Automation benefit
 Time efficient.
 Less errors.
 Scaling.
DEVOPS – The magic word
 CICD process that mitigate the pain in the develop process.
 CI: continuous integration – about integrating the new code to our existing
code base.
 CD: Continuous deployment – about deploying the code to our servers.
Continuous Integration Tools in
WordPress
The heavy lifting tools:
 BASH scripts (With WP CLI integration).
 Node.js tools.
The GUI management tools
 Jenkins.
 Travis.
The CI cycle
Local code
change
Pre commitpush
local tools
Commit with
GitSVN
CI scripts
By CI tools
BASH Scripts
 Make sure that the server has the PHPMySQL versions.
 Download WordPress develop and install it.
 Download the plugin template and install it to WordPress develop
 Running the tests and other tools.
 If OK, report to Jenkins travis.
Example of BASH script that integrate
with Travis and WordPress
 https://github.com/Koodimonni/wordpress-test-template
Travis CI integration example in wp-
tutorial
https://travis-ci.org/barzik/wp-tutorial-maker/jobs/116392034
BASH is not everything
 BASH can be run only on Linux.
 Used for setting up environment.
 Can cause errors.
Here come node.js
 Node.js can be run on Linux, Mac and even……. [drum roles] windows!
 Node.js is easy to install and very easy to run.
 Node.js can be run on you personal computer to run tasks.
 There are two major tasks runner: gulp and grunt.
Grunt VS gulp
 Gulp pros: more efficient, more dynamic, fast pace growth.
 Grunt pros: easier to understand, have a lot of modules, excellent
documentation and enterprise ready.
SCSS
 SASS is the future! Everyone use scss!
Source
SCSS
compiler
Ruby
compiler
output
CSS
How to do it with Grunt?
Source
SCSS
Grunt.js
Watching the
file and
running the
compiler every
time scss file
changes
compiler
Ruby compiler
output
CSS
And now for some code
 Install node.js on you machine
 Install grunt by npm install grunt –g
 Create Grunt.js and insert the tasks that you need.
What about automatic prefix?
 Prefix is the CSS attribute that you have to add to some
advanced CSS3 modules in order to make them work in several
browsers.
 Adding prefixes can be very tiresome job.
 Let the machine do it!
You know I like
it!
Grunt auto prefixer to the recue!
Source
SCSS
Grunt.js
Watching the
file and running
the compiler
every time scss
file changes
compiler
Ruby compiler
output
CSS
Grunt
Watching the
file and running
automatic
prefixer
according to
browser matrix
Grunt code
autoprefixer:{
dist:{
files:{
'css/*.css':'css/*.css'
}
}
}
sass: {
options: {
sourceMap: true
},
dist: {
options: {
outputStyle: 'compressed'
},
files: {
'css/*.css': 'scss/*.scss'
}
}
},
grunt.registerTask('build', ['sass', 'autoprefixer']);
Many more tasks!
 Uglify
 Jshint for static analysis tools
 Compression
 Security tests
Grunt is not just for JavaScript!
 Meet grunt phpunit!
 Meet grunt wpi18n! For automating the *.po-mo process!
https://github.com/cedaro/grunt-wp-i18n
 Contribute to WordPress repo but maintainging it on GitHub? Meet
https://github.com/gruntjs/grunt-contrib-copy
Grunt is excellent for static analysis
jobs
 Static analysis tool is important part of the CI process. It ensures:
 Quality of the code.
 XSSSQLCSRF problems.
 WordPress coding standards.
 Working on both PHP and JS
Grunt tools for static code analysis
 Meet grunt phpcs!
Grunt runner for static analysis tool for PHP!
https://github.com/SaschaGalley/grunt-phpcs
 Meet eslint, jslint and friends for JS.
 There are static code analysis tools for SCSS and HTML!
All together now! In the local
Create the code
While creating the
code, grunt watch is
running
SCSS is being compiled,
prefixes added, uglifier
working and even page
refreshed on every
chage
Developer finish and
commit and push
Static analysis tools are
being activated,
Automatic tests are
running
All together now! In the remote
integration
Travis CI
Jenkins detect
git push
BASH is used to
create the
environment
from scratch
Static test
analysis,
automatic
testing
Everything OK?
Manual QA can
begin
Build failed?
That’s means
death
Fast creation of websites with yeoman
What yeoman can do for us?
 Deploy the WordPress environment on our machine.
 Deploy the DB and insert mock data.
 Install our plugin themes dependency.
 Configure it all with easy to define JSON.
In the end….
 CICD is for EVERY developer.
 It is very easy to implement.
 Even with small part of the CI cycle you are in much better shape than the
others.
 Static analysis tools are extremly important. Start with them.

More Related Content

What's hot

Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
Stéphane Bégaudeau
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
cgack
 
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
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
Drone CI
Drone CIDrone CI
Drone CI
Thomas Boerger
 
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
[English][Test Girls] Zero to Hero: Start Test automation with Cypress[English][Test Girls] Zero to Hero: Start Test automation with Cypress
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
Test Girls
 
Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End Tests
Sriram Angajala
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 
Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium Meetup
Shashikant Jagtap
 
Dockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleDockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber Example
Shashikant Jagtap
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
Peter Gfader
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Ido Green
 
Testing as a container
Testing as a containerTesting as a container
Testing as a container
Irfan Ahmad
 
Automate Thyself
Automate ThyselfAutomate Thyself
Automate Thyself
Ortus Solutions, Corp
 
Continuous delivery of your legacy application
Continuous delivery of your legacy applicationContinuous delivery of your legacy application
Continuous delivery of your legacy application
ColdFusionConference
 
How I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressHow I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPress
Chris Jean
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
Fwdays
 
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Codemotion
 
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
Chen Cheng-Wei
 
Getting Started With WP REST API
Getting Started With WP REST APIGetting Started With WP REST API
Getting Started With WP REST API
Kishor Kumar
 

What's hot (20)

Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
 
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
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small Teams
 
Drone CI
Drone CIDrone CI
Drone CI
 
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
[English][Test Girls] Zero to Hero: Start Test automation with Cypress[English][Test Girls] Zero to Hero: Start Test automation with Cypress
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
 
Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End Tests
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
Dockerising Appium : London Appium Meetup
Dockerising Appium : London Appium MeetupDockerising Appium : London Appium Meetup
Dockerising Appium : London Appium Meetup
 
Dockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleDockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber Example
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
 
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
Modern Web Applications Utilizing HTML5 (Dev Con TLV 06-2013)
 
Testing as a container
Testing as a containerTesting as a container
Testing as a container
 
Automate Thyself
Automate ThyselfAutomate Thyself
Automate Thyself
 
Continuous delivery of your legacy application
Continuous delivery of your legacy applicationContinuous delivery of your legacy application
Continuous delivery of your legacy application
 
How I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressHow I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPress
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
 
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
 
Getting Started With WP REST API
Getting Started With WP REST APIGetting Started With WP REST API
Getting Started With WP REST API
 

Similar to WordPress automation and CI

WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
Evan Mullins
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
Preprocessor Workflow with Grunt
Preprocessor Workflow with GruntPreprocessor Workflow with Grunt
Preprocessor Workflow with Grunt
Vlad Filippov
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small Teams
Joe Ferguson
 
Grunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End TierGrunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End Tier
Erick Brito
 
Grunt training deck
Grunt training deckGrunt training deck
Grunt training deck
James Ford
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
Koji Ishimoto
 
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as CodeConfoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Steve Mercier
 
Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
Ran Bar-Zik
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
Kris Buytaert
 
Continuous Integration - What even is it?
Continuous Integration - What even is it?Continuous Integration - What even is it?
Continuous Integration - What even is it?
Rob Jacoby
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
Erik Osterman
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitAndreas Heim
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
Robert Lujo
 
Hybrid Application Development
Hybrid Application DevelopmentHybrid Application Development
Hybrid Application Development
Yagiz Nizipli
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
AFUP_Limoges
 
Web Development: Making it the right way
Web Development: Making it the right wayWeb Development: Making it the right way
Web Development: Making it the right way
Yagiz Nizipli
 
The swiss knife of a word press developer
The swiss knife of a word press developerThe swiss knife of a word press developer
The swiss knife of a word press developer
Ivelina Dimova
 
Automate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsAutomate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.js
Josh Lee
 

Similar to WordPress automation and CI (20)

WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
 
Preprocessor Workflow with Grunt
Preprocessor Workflow with GruntPreprocessor Workflow with Grunt
Preprocessor Workflow with Grunt
 
DevOps For Small Teams
DevOps For Small TeamsDevOps For Small Teams
DevOps For Small Teams
 
Grunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End TierGrunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End Tier
 
Grunt training deck
Grunt training deckGrunt training deck
Grunt training deck
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
フロントエンドエンジニア(仮) 〜え、ちょっとフロントやること多すぎじゃない!?〜
 
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as CodeConfoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
 
Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
 
Continuous Integration - What even is it?
Continuous Integration - What even is it?Continuous Integration - What even is it?
Continuous Integration - What even is it?
 
The "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/OpsThe "Holy Grail" of Dev/Ops
The "Holy Grail" of Dev/Ops
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Hybrid Application Development
Hybrid Application DevelopmentHybrid Application Development
Hybrid Application Development
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
Web Development: Making it the right way
Web Development: Making it the right wayWeb Development: Making it the right way
Web Development: Making it the right way
 
The swiss knife of a word press developer
The swiss knife of a word press developerThe swiss knife of a word press developer
The swiss knife of a word press developer
 
Automate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsAutomate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.js
 

More from Ran Bar-Zik

How to track users
How to track usersHow to track users
How to track users
Ran Bar-Zik
 
7 deadly front end sins
7 deadly front end sins7 deadly front end sins
7 deadly front end sins
Ran Bar-Zik
 
Javascript static code analysis
Javascript static code analysisJavascript static code analysis
Javascript static code analysis
Ran Bar-Zik
 
How to get your first job at the Israeli high tech industry
How to get your first job at the Israeli high tech industryHow to get your first job at the Israeli high tech industry
How to get your first job at the Israeli high tech industry
Ran Bar-Zik
 
WordPress Security 101 for developers
WordPress Security 101 for developersWordPress Security 101 for developers
WordPress Security 101 for developers
Ran Bar-Zik
 
Javascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stackJavascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stack
Ran Bar-Zik
 
Drupal Security
Drupal SecurityDrupal Security
Drupal Security
Ran Bar-Zik
 
Presentation skills - course example
Presentation skills - course examplePresentation skills - course example
Presentation skills - course example
Ran Bar-Zik
 
Basic web dveleopers terms for UX and graphic designers
Basic web dveleopers terms for UX and graphic designersBasic web dveleopers terms for UX and graphic designers
Basic web dveleopers terms for UX and graphic designers
Ran Bar-Zik
 
HTML55 media api
HTML55 media apiHTML55 media api
HTML55 media api
Ran Bar-Zik
 
Features in Drupal 7/6
Features in Drupal 7/6Features in Drupal 7/6
Features in Drupal 7/6
Ran Bar-Zik
 

More from Ran Bar-Zik (11)

How to track users
How to track usersHow to track users
How to track users
 
7 deadly front end sins
7 deadly front end sins7 deadly front end sins
7 deadly front end sins
 
Javascript static code analysis
Javascript static code analysisJavascript static code analysis
Javascript static code analysis
 
How to get your first job at the Israeli high tech industry
How to get your first job at the Israeli high tech industryHow to get your first job at the Israeli high tech industry
How to get your first job at the Israeli high tech industry
 
WordPress Security 101 for developers
WordPress Security 101 for developersWordPress Security 101 for developers
WordPress Security 101 for developers
 
Javascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stackJavascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stack
 
Drupal Security
Drupal SecurityDrupal Security
Drupal Security
 
Presentation skills - course example
Presentation skills - course examplePresentation skills - course example
Presentation skills - course example
 
Basic web dveleopers terms for UX and graphic designers
Basic web dveleopers terms for UX and graphic designersBasic web dveleopers terms for UX and graphic designers
Basic web dveleopers terms for UX and graphic designers
 
HTML55 media api
HTML55 media apiHTML55 media api
HTML55 media api
 
Features in Drupal 7/6
Features in Drupal 7/6Features in Drupal 7/6
Features in Drupal 7/6
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 

WordPress automation and CI

  • 1. WordPress automation and ci RAN BAR-ZIK, HEWLETT PACKARD ENTERPRISE, 2016
  • 2. Ran Bar-Zik (that’s me!) @barzik  Web developer at Hewlett Packard Enterprise.  Proud owner of internet-Israel.com website.  Connect me on LinkedIn, Facebook or Twitter!  What I do when I am not programming? 4 children, long distance marathoner, Tolkien enthusiastic.
  • 3. What is automation Scripts that doing the heavy lifting mundane tasks • Running code evaluation tasks. • Running clean-ups • Running processes before after deployment
  • 4. Automation benefit  Time efficient.  Less errors.  Scaling.
  • 5. DEVOPS – The magic word  CICD process that mitigate the pain in the develop process.  CI: continuous integration – about integrating the new code to our existing code base.  CD: Continuous deployment – about deploying the code to our servers.
  • 6. Continuous Integration Tools in WordPress The heavy lifting tools:  BASH scripts (With WP CLI integration).  Node.js tools. The GUI management tools  Jenkins.  Travis.
  • 7. The CI cycle Local code change Pre commitpush local tools Commit with GitSVN CI scripts By CI tools
  • 8. BASH Scripts  Make sure that the server has the PHPMySQL versions.  Download WordPress develop and install it.  Download the plugin template and install it to WordPress develop  Running the tests and other tools.  If OK, report to Jenkins travis.
  • 9. Example of BASH script that integrate with Travis and WordPress  https://github.com/Koodimonni/wordpress-test-template
  • 10. Travis CI integration example in wp- tutorial https://travis-ci.org/barzik/wp-tutorial-maker/jobs/116392034
  • 11. BASH is not everything  BASH can be run only on Linux.  Used for setting up environment.  Can cause errors.
  • 12. Here come node.js  Node.js can be run on Linux, Mac and even……. [drum roles] windows!  Node.js is easy to install and very easy to run.  Node.js can be run on you personal computer to run tasks.  There are two major tasks runner: gulp and grunt.
  • 13. Grunt VS gulp  Gulp pros: more efficient, more dynamic, fast pace growth.  Grunt pros: easier to understand, have a lot of modules, excellent documentation and enterprise ready.
  • 14. SCSS  SASS is the future! Everyone use scss! Source SCSS compiler Ruby compiler output CSS
  • 15. How to do it with Grunt? Source SCSS Grunt.js Watching the file and running the compiler every time scss file changes compiler Ruby compiler output CSS
  • 16. And now for some code  Install node.js on you machine  Install grunt by npm install grunt –g  Create Grunt.js and insert the tasks that you need.
  • 17. What about automatic prefix?  Prefix is the CSS attribute that you have to add to some advanced CSS3 modules in order to make them work in several browsers.  Adding prefixes can be very tiresome job.  Let the machine do it! You know I like it!
  • 18. Grunt auto prefixer to the recue! Source SCSS Grunt.js Watching the file and running the compiler every time scss file changes compiler Ruby compiler output CSS Grunt Watching the file and running automatic prefixer according to browser matrix
  • 19. Grunt code autoprefixer:{ dist:{ files:{ 'css/*.css':'css/*.css' } } } sass: { options: { sourceMap: true }, dist: { options: { outputStyle: 'compressed' }, files: { 'css/*.css': 'scss/*.scss' } } }, grunt.registerTask('build', ['sass', 'autoprefixer']);
  • 20. Many more tasks!  Uglify  Jshint for static analysis tools  Compression  Security tests
  • 21. Grunt is not just for JavaScript!  Meet grunt phpunit!  Meet grunt wpi18n! For automating the *.po-mo process! https://github.com/cedaro/grunt-wp-i18n  Contribute to WordPress repo but maintainging it on GitHub? Meet https://github.com/gruntjs/grunt-contrib-copy
  • 22. Grunt is excellent for static analysis jobs  Static analysis tool is important part of the CI process. It ensures:  Quality of the code.  XSSSQLCSRF problems.  WordPress coding standards.  Working on both PHP and JS
  • 23. Grunt tools for static code analysis  Meet grunt phpcs! Grunt runner for static analysis tool for PHP! https://github.com/SaschaGalley/grunt-phpcs  Meet eslint, jslint and friends for JS.  There are static code analysis tools for SCSS and HTML!
  • 24. All together now! In the local Create the code While creating the code, grunt watch is running SCSS is being compiled, prefixes added, uglifier working and even page refreshed on every chage Developer finish and commit and push Static analysis tools are being activated, Automatic tests are running
  • 25. All together now! In the remote integration Travis CI Jenkins detect git push BASH is used to create the environment from scratch Static test analysis, automatic testing Everything OK? Manual QA can begin Build failed? That’s means death
  • 26. Fast creation of websites with yeoman
  • 27. What yeoman can do for us?  Deploy the WordPress environment on our machine.  Deploy the DB and insert mock data.  Install our plugin themes dependency.  Configure it all with easy to define JSON.
  • 28.
  • 29. In the end….  CICD is for EVERY developer.  It is very easy to implement.  Even with small part of the CI cycle you are in much better shape than the others.  Static analysis tools are extremly important. Start with them.