SlideShare une entreprise Scribd logo
1  sur  28
Phing
           Automating PHP build deployment




09/07/12             http://coderinsights.blogspot.in   1
Old Way




09/07/12   http://coderinsights.blogspot.in   2
Why use Build Automation?
“We are human, We get bored,
We forget things, We make mistakes”

•   Improve product quality
•   Consolidate scripts
•   Eliminate repetitive tasks
•   Minimize error (bad builds)
•   Eliminate dependencies (Easier handover)
•   Highly extendible
•   Saves time

09/07/12                http://coderinsights.blogspot.in   3
What is [PHing Is Not Gnumake]
•   It's a PHP project build tool based on Apache Ant
•   Opensource
•   Mostly Cross platform
•   Uses XML build files
•   No required external dependencies
•   Built & optimised for PHP5




09/07/12              http://coderinsights.blogspot.in   4
What can you do?
•   Lots –Not just for deployment
•   SVN tasks
•   PHPUnit/SimpleTest
•   Code analysis tasks
•   PhpDocumentor
•   Zip/Unzip
•   File manipulation
•   Various OS tasks

09/07/12           http://coderinsights.blogspot.in   5
Features




09/07/12   http://coderinsights.blogspot.in   6
Phing Philosophy
• Build scripts contains "Targets"
      – Targets should be small and specialized.
      – Example Targets:
           • clean
              – Clear temporary and cached files
           • copy
              – Copy files to their intended destination
           • migrate
              – Upgrade the database schema



09/07/12                      http://coderinsights.blogspot.in   7
Phing Philosophy
• Targets can have dependencies
      – Target "live" can depend on clean, copy, and
        migrate
      – Meaning, when we run the "live" target, it first
        runs clean, copy, then migrate
           • And any tasks they depend on




09/07/12                   http://coderinsights.blogspot.in   8
Installing Phing
• pear channel-discover pear.phing.info
• pear install phing/Phing
• Want all the dependencies?
      –    pear   config-set preferred_state alpha
      –    pear   install –alldeps phing/Phing
      –    pear   config-set preferred_state stable
      –    pear   install phing/phingdocs
• Also available from:
      – SVN
      – Zip Download

09/07/12                 http://coderinsights.blogspot.in   9
Running Phing
• $> phing –v
      – Lists Phing version
• Phing expects to find a file "build.xml" in the
  current directory
      – build.xml defines the targets
      – You can use the "-f <filename>" flag to
        specify an alternate build file like
           • $> phing -f build-live.xml


09/07/12                http://coderinsights.blogspot.in   10
Syntax
• Build File uses XML
• Standard Elements
      – Task: code that performs a specific function
      – Target: groups of tasks
      – Project: root node
• Variables
      – ${variablename}
      – Conventions
           • Psuedo-Namespaces using periods
           • ${namespace.variable.name}

09/07/12                  http://coderinsights.blogspot.in   11
Basic Conventions
• build.xml
      – Central repository of your top-level tasks
• build-*.xml
      – Can be included into build.xml.
      – Usually for grouping by target (dev, staging,prod)
        or task (migrate, test, etc.)
• build.properties
      – Technically an INI file that contains variables to be
        included by build files.

09/07/12                http://coderinsights.blogspot.in     12
Basic build.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <project name=“opx" default="default" basedir=".">
      <property file="build.properties" />
      <target name="default">
          <echo message="Hello World!" />
      </target>
  </project>




09/07/12              http://coderinsights.blogspot.in   13
Basic build.properties
  source.directory = /mnt/work/

  ## Database Configuration
  db.user = username
  db.pass = password
  db.host = localhost
  db.name = database


   Usage:
   $phing –propertyfile build.properties




09/07/12                        http://coderinsights.blogspot.in   14
Most Useful Elements
• Filesets: define once,use many
      <fileset id="src_crons" dir="${dir.crons_path}/statistic-engine/">
              <include name="*.php"/>
              <exclude name="populate_opx_tables.php" />
      </fileset>


• Mappers & Filters: Transform files during
  copy/move/…
      <copy todir="${build}">
             <fileset refid="files"/>
                     <mapper type="glob" from="*.txt" to="*.new.txt"/>
                     <filterchain>
                             <replaceregexp>
                             <regexp pattern="rn" replace="n"/>
                     <expandproperties/>
                     </replaceregexp>
             </filterchain>
      </copy>



09/07/12                                        http://coderinsights.blogspot.in   15
Executing External Tools
• Nearly all file transfer tools will be external
  commands
• For this we need the Exec task
      <exec command="cp file1 file2" />




09/07/12                http://coderinsights.blogspot.in   16
Examples
SVN, Git
<svncopy username=“pavan“ password="test” repositoryurl="svn://localhost/phing/trunk/“
    todir="svn://localhost/phing/tags/1.0"/>

<svnexport repositoryurl="svn://localhost/project/trunk/” todir="/home/pavan/dev"/>

<svnlastrevision repositoryurl="svn://localhost/project/trunk/” propertyname="lastrev"/>
<echo>Last revision: ${lastrev}</echo>

<svnlastrevision repositoryurl="${deploy.svn}” property="deploy.rev"/>

<svnexport repositoryurl="${deploy.svn}" todir="/www/releases/build-${deploy.rev}"/>




09/07/12                           http://coderinsights.blogspot.in                        17
Examples
Packaging – Tar/Zip
<tar compression="gzip" destFile="package.tgz" basedir="build"/>
    <zip destfile="htmlfiles.zip">
    <fileset dir=".">
            <include name="**/*.html"/>
    </fileset>
</zip>




09/07/12                           http://coderinsights.blogspot.in   18
Examples
Documentation:
      – DocBlox
      – PhpDocumentor
      – ApiGen

<docblox title="Phing API Documentation"
output="docs" quiet="true">
<fileset dir="../../classes">
     <include name="**/*.php"/>
</fileset>
</docblox>


09/07/12                          http://coderinsights.blogspot.in   19
Examples
• SCP/FTP
<scp username="john" password="smith" host="webserver" todir="/www/htdocs/project/">
    <fileset dir="test">
            <include name="*.html"/>
    </fileset>
</scp>

<ftpdeploy host="server01” username="john" password="smit" dir="/var/www">
    <fileset dir=".">
            <include name="*.html"/>
    </fileset>
</ftpdeploy>




09/07/12                         http://coderinsights.blogspot.in                      20
Database Migrations
• Set of delta SQL files (1-create-post.sql)
• Tracks current version of your db in changelog
  table
• Generates do and undo SQL files
CREATE TABLE changelog (
change_number BIGINT NOT NULL,
delta_set VARCHAR(10) NOT NULL,
start_dt TIMESTAMP NOT NULL,
complete_dt TIMESTAMP NULL,
applied_by VARCHAR(100) NOT NULL,
description VARCHAR(500) NOT NULL
)

09/07/12                  http://coderinsights.blogspot.in   21
Database Migrations
• Delta scripts with do (up) & undo (down) parts
-- //
CREATE TABLE ‘post‘ (
‘title‘ VARCHAR(255),
‘time_created‘ DATETIME,
‘content‘ MEDIUMTEXT
);
-- //@UNDO
DROP TABLE ‘post‘;
-- //




09/07/12                   http://coderinsights.blogspot.in   22
Database Migrations
<dbdeploy
url="sqlite:test.db"
dir="deltas"
outputfile="deploy.sql"
undooutputfile="undo.sql"/>

<pdosqlexec
src="deploy.sql"
url="sqlite:test.db"/>

Buildfile: /home/pavan/dbdeploy/build.xml
Demo > migrate:
[dbdeploy] Getting applied changed numbers from DB:
mysql:host=localhost;dbname=demo
[dbdeploy] Current db revision: 0
[dbdeploy] Checkall:
[pdosqlexec] Executing file: /home/michiel/dbdeploy/deploy.sql
[pdosqlexec] 3 of 3 SQL statements executed successfully
BUILD FINISHED



09/07/12                                       http://coderinsights.blogspot.in   23
Database Migrations
-- Fragment begins: 1 --
INSERT INTO changelog
(change_number, delta_set, start_dt, applied_by, description)
VALUES (1, ’Main’, NOW(), ’dbdeploy’,
’1-create_initial_schema.sql’);
--//
CREATE TABLE ‘post‘ (
‘title‘ VARCHAR(255),
‘time_created‘ DATETIME,
‘content‘ MEDIUMTEXT
);
UPDATE changelog
SET complete_dt = NOW()
WHERE change_number = 1
AND delta_set = ’Main’;
-- Fragment ends: 1 --

09/07/12                        http://coderinsights.blogspot.in   24
Database Migrations
-- Fragment begins: 1 --
DROP TABLE ‘post‘;
--//
DELETE FROM changelog
WHERE change_number = 1
AND delta_set = ’Main’;
-- Fragment ends: 1 --




09/07/12                   http://coderinsights.blogspot.in   25
Phing Way




09/07/12   http://coderinsights.blogspot.in   26
Pitfalls
• Cleanup Deleted Source Files
      – Usually only a problem when you have * include
        patterns
• Undefined properties not raised as an error
• Little to no IDE support (Minimal support
  using Ant Plugin for Eclipse)



09/07/12              http://coderinsights.blogspot.in   27
More!!
SAMPLE
https://bitbucket.org/arnavawasthi/php-phing
WEBSITE
http://phing.info
MAILING LISTS
users@phing.tigris.org
dev@phing.tigris.org

09/07/12         http://coderinsights.blogspot.in   28

Contenu connexe

Tendances

Putting Phing to Work for You
Putting Phing to Work for YouPutting Phing to Work for You
Putting Phing to Work for Youhozn
 
Automated Deployment With Phing
Automated Deployment With PhingAutomated Deployment With Phing
Automated Deployment With PhingDaniel Cousineau
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentShahar Evron
 
11 tools for your PHP devops stack
11 tools for your PHP devops stack11 tools for your PHP devops stack
11 tools for your PHP devops stackKris Buytaert
 
Propel Your PHP Applications
Propel Your PHP ApplicationsPropel Your PHP Applications
Propel Your PHP Applicationshozn
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsAdam Culp
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayPuppet
 
Zend Framework 1.8 workshop
Zend Framework 1.8 workshopZend Framework 1.8 workshop
Zend Framework 1.8 workshopNick Belhomme
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselPuppet
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Clark Everetts
 
Virtual Bolt Workshop - Dell - April 8 2020
Virtual Bolt Workshop - Dell - April 8 2020Virtual Bolt Workshop - Dell - April 8 2020
Virtual Bolt Workshop - Dell - April 8 2020Puppet
 
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)Puppet
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is DockerNick Belhomme
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginnersAdam Englander
 
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...Puppet
 
PHP Quality Assurance Workshop PHPBenelux
PHP Quality Assurance Workshop PHPBeneluxPHP Quality Assurance Workshop PHPBenelux
PHP Quality Assurance Workshop PHPBeneluxNick Belhomme
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentsparkfabrik
 
Frequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last timeFrequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last timeAndreas Jung
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package developmentTihomir Opačić
 
Getting started with Django 1.8
Getting started with Django 1.8Getting started with Django 1.8
Getting started with Django 1.8rajkumar2011
 

Tendances (20)

Putting Phing to Work for You
Putting Phing to Work for YouPutting Phing to Work for You
Putting Phing to Work for You
 
Automated Deployment With Phing
Automated Deployment With PhingAutomated Deployment With Phing
Automated Deployment With Phing
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application Deployment
 
11 tools for your PHP devops stack
11 tools for your PHP devops stack11 tools for your PHP devops stack
11 tools for your PHP devops stack
 
Propel Your PHP Applications
Propel Your PHP ApplicationsPropel Your PHP Applications
Propel Your PHP Applications
 
Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 
Zend Framework 1.8 workshop
Zend Framework 1.8 workshopZend Framework 1.8 workshop
Zend Framework 1.8 workshop
 
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim MeuselModulesync- How vox pupuli manages 133 modules, Tim Meusel
Modulesync- How vox pupuli manages 133 modules, Tim Meusel
 
Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016Php Dependency Management with Composer ZendCon 2016
Php Dependency Management with Composer ZendCon 2016
 
Virtual Bolt Workshop - Dell - April 8 2020
Virtual Bolt Workshop - Dell - April 8 2020Virtual Bolt Workshop - Dell - April 8 2020
Virtual Bolt Workshop - Dell - April 8 2020
 
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
Puppet Virtual Bolt Workshop - 23 April 2020 (Singapore)
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is Docker
 
Zend con 2016 bdd with behat for beginners
Zend con 2016   bdd with behat for beginnersZend con 2016   bdd with behat for beginners
Zend con 2016 bdd with behat for beginners
 
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...
 
PHP Quality Assurance Workshop PHPBenelux
PHP Quality Assurance Workshop PHPBeneluxPHP Quality Assurance Workshop PHPBenelux
PHP Quality Assurance Workshop PHPBenelux
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend development
 
Frequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last timeFrequently asked questions answered frequently - but now for the last time
Frequently asked questions answered frequently - but now for the last time
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package development
 
Getting started with Django 1.8
Getting started with Django 1.8Getting started with Django 1.8
Getting started with Django 1.8
 

En vedette

öZkan şAhin
öZkan şAhinöZkan şAhin
öZkan şAhinyardimt
 
SöZcüKte Anlam
SöZcüKte AnlamSöZcüKte Anlam
SöZcüKte Anlamyardimt
 
Tugbapalta
TugbapaltaTugbapalta
Tugbapaltayardimt
 
CüMlenyn Yapisi
CüMlenyn YapisiCüMlenyn Yapisi
CüMlenyn Yapisiyardimt
 
Group Profile
Group ProfileGroup Profile
Group Profileajaybc
 
Fler Sunusu
Fler SunusuFler Sunusu
Fler Sunusuyardimt
 
Are you a life-long learner?
Are you a life-long learner?Are you a life-long learner?
Are you a life-long learner?Jeremy Williams
 
「Rubyで描くビジネスモデル」池澤 一廣
「Rubyで描くビジネスモデル」池澤 一廣「Rubyで描くビジネスモデル」池澤 一廣
「Rubyで描くビジネスモデル」池澤 一廣toRuby
 
Test First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in GrailsTest First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in GrailsTim Berglund
 
Kelime Tuerleri
Kelime TuerleriKelime Tuerleri
Kelime Tuerleriyardimt
 
Hurricanes In Sandwich
Hurricanes In  SandwichHurricanes In  Sandwich
Hurricanes In SandwichLucyGauthier
 
Yapilarina GöRe Isimler
Yapilarina GöRe IsimlerYapilarina GöRe Isimler
Yapilarina GöRe Isimleryardimt
 
Steps to change address online.
Steps to change address online.Steps to change address online.
Steps to change address online.Wassim Merheby
 
Increased FDI in defence manufacturing Press Note (7), 2014 series.
Increased FDI in defence manufacturing Press Note (7), 2014 series.Increased FDI in defence manufacturing Press Note (7), 2014 series.
Increased FDI in defence manufacturing Press Note (7), 2014 series.Ankur Gupta
 
Mevlananin Ogutlari
Mevlananin OgutlariMevlananin Ogutlari
Mevlananin Ogutlariyardimt
 
大川祐介
大川祐介大川祐介
大川祐介toRuby
 
Paragrafyn Yapysy
Paragrafyn YapysyParagrafyn Yapysy
Paragrafyn Yapysyyardimt
 

En vedette (20)

öZkan şAhin
öZkan şAhinöZkan şAhin
öZkan şAhin
 
Meat 2.0 vr7
Meat 2.0 vr7Meat 2.0 vr7
Meat 2.0 vr7
 
SöZcüKte Anlam
SöZcüKte AnlamSöZcüKte Anlam
SöZcüKte Anlam
 
Tugbapalta
TugbapaltaTugbapalta
Tugbapalta
 
CüMlenyn Yapisi
CüMlenyn YapisiCüMlenyn Yapisi
CüMlenyn Yapisi
 
Group Profile
Group ProfileGroup Profile
Group Profile
 
Fler Sunusu
Fler SunusuFler Sunusu
Fler Sunusu
 
Are you a life-long learner?
Are you a life-long learner?Are you a life-long learner?
Are you a life-long learner?
 
「Rubyで描くビジネスモデル」池澤 一廣
「Rubyで描くビジネスモデル」池澤 一廣「Rubyで描くビジネスモデル」池澤 一廣
「Rubyで描くビジネスモデル」池澤 一廣
 
Economy in a nutshell
Economy in a nutshellEconomy in a nutshell
Economy in a nutshell
 
Art 245 photo montage
Art 245 photo montageArt 245 photo montage
Art 245 photo montage
 
Test First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in GrailsTest First, Refresh Second: Web App TDD in Grails
Test First, Refresh Second: Web App TDD in Grails
 
Kelime Tuerleri
Kelime TuerleriKelime Tuerleri
Kelime Tuerleri
 
Hurricanes In Sandwich
Hurricanes In  SandwichHurricanes In  Sandwich
Hurricanes In Sandwich
 
Yapilarina GöRe Isimler
Yapilarina GöRe IsimlerYapilarina GöRe Isimler
Yapilarina GöRe Isimler
 
Steps to change address online.
Steps to change address online.Steps to change address online.
Steps to change address online.
 
Increased FDI in defence manufacturing Press Note (7), 2014 series.
Increased FDI in defence manufacturing Press Note (7), 2014 series.Increased FDI in defence manufacturing Press Note (7), 2014 series.
Increased FDI in defence manufacturing Press Note (7), 2014 series.
 
Mevlananin Ogutlari
Mevlananin OgutlariMevlananin Ogutlari
Mevlananin Ogutlari
 
大川祐介
大川祐介大川祐介
大川祐介
 
Paragrafyn Yapysy
Paragrafyn YapysyParagrafyn Yapysy
Paragrafyn Yapysy
 

Similaire à Build Automation of PHP Applications

Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Drupalcon Paris
 
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...buildacloud
 
Open writing-cloud-collab
Open writing-cloud-collabOpen writing-cloud-collab
Open writing-cloud-collabKaren Vuong
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011Bachkoutou Toutou
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Apache ant
Apache antApache ant
Apache antkoniik
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under controlMarcin Przepiórowski
 
Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程jeffz
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Phase2
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesAlfresco Software
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Codemotion
 
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
WorkFlow:  An Inquiry Into Productivity by Timothy BoltonWorkFlow:  An Inquiry Into Productivity by Timothy Bolton
WorkFlow: An Inquiry Into Productivity by Timothy BoltonMiva
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbtFabio Fumarola
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkBryan Ollendyke
 

Similaire à Build Automation of PHP Applications (20)

Write php deploy everywhere tek11
Write php deploy everywhere   tek11Write php deploy everywhere   tek11
Write php deploy everywhere tek11
 
Intro to-ant
Intro to-antIntro to-ant
Intro to-ant
 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
 
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
Open Writing! Collaborative Authoring for CloudStack Documentation by Jessica...
 
Open writing-cloud-collab
Open writing-cloud-collabOpen writing-cloud-collab
Open writing-cloud-collab
 
Django
DjangoDjango
Django
 
Stress Free Deployment - Confoo 2011
Stress Free Deployment  - Confoo 2011Stress Free Deployment  - Confoo 2011
Stress Free Deployment - Confoo 2011
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Apache ant
Apache antApache ant
Apache ant
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
 
Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程Documentation Insight技术架构与开发历程
Documentation Insight技术架构与开发历程
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
 
BP-6 Repository Customization Best Practices
BP-6 Repository Customization Best PracticesBP-6 Repository Customization Best Practices
BP-6 Repository Customization Best Practices
 
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
Gianluca Varisco - DevOoops (Increase awareness around DevOps infra security)
 
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
WorkFlow:  An Inquiry Into Productivity by Timothy BoltonWorkFlow:  An Inquiry Into Productivity by Timothy Bolton
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talk
 

Dernier

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Dernier (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Build Automation of PHP Applications

  • 1. Phing Automating PHP build deployment 09/07/12 http://coderinsights.blogspot.in 1
  • 2. Old Way 09/07/12 http://coderinsights.blogspot.in 2
  • 3. Why use Build Automation? “We are human, We get bored, We forget things, We make mistakes” • Improve product quality • Consolidate scripts • Eliminate repetitive tasks • Minimize error (bad builds) • Eliminate dependencies (Easier handover) • Highly extendible • Saves time 09/07/12 http://coderinsights.blogspot.in 3
  • 4. What is [PHing Is Not Gnumake] • It's a PHP project build tool based on Apache Ant • Opensource • Mostly Cross platform • Uses XML build files • No required external dependencies • Built & optimised for PHP5 09/07/12 http://coderinsights.blogspot.in 4
  • 5. What can you do? • Lots –Not just for deployment • SVN tasks • PHPUnit/SimpleTest • Code analysis tasks • PhpDocumentor • Zip/Unzip • File manipulation • Various OS tasks 09/07/12 http://coderinsights.blogspot.in 5
  • 6. Features 09/07/12 http://coderinsights.blogspot.in 6
  • 7. Phing Philosophy • Build scripts contains "Targets" – Targets should be small and specialized. – Example Targets: • clean – Clear temporary and cached files • copy – Copy files to their intended destination • migrate – Upgrade the database schema 09/07/12 http://coderinsights.blogspot.in 7
  • 8. Phing Philosophy • Targets can have dependencies – Target "live" can depend on clean, copy, and migrate – Meaning, when we run the "live" target, it first runs clean, copy, then migrate • And any tasks they depend on 09/07/12 http://coderinsights.blogspot.in 8
  • 9. Installing Phing • pear channel-discover pear.phing.info • pear install phing/Phing • Want all the dependencies? – pear config-set preferred_state alpha – pear install –alldeps phing/Phing – pear config-set preferred_state stable – pear install phing/phingdocs • Also available from: – SVN – Zip Download 09/07/12 http://coderinsights.blogspot.in 9
  • 10. Running Phing • $> phing –v – Lists Phing version • Phing expects to find a file "build.xml" in the current directory – build.xml defines the targets – You can use the "-f <filename>" flag to specify an alternate build file like • $> phing -f build-live.xml 09/07/12 http://coderinsights.blogspot.in 10
  • 11. Syntax • Build File uses XML • Standard Elements – Task: code that performs a specific function – Target: groups of tasks – Project: root node • Variables – ${variablename} – Conventions • Psuedo-Namespaces using periods • ${namespace.variable.name} 09/07/12 http://coderinsights.blogspot.in 11
  • 12. Basic Conventions • build.xml – Central repository of your top-level tasks • build-*.xml – Can be included into build.xml. – Usually for grouping by target (dev, staging,prod) or task (migrate, test, etc.) • build.properties – Technically an INI file that contains variables to be included by build files. 09/07/12 http://coderinsights.blogspot.in 12
  • 13. Basic build.xml <?xml version="1.0" encoding="UTF-8"?> <project name=“opx" default="default" basedir="."> <property file="build.properties" /> <target name="default"> <echo message="Hello World!" /> </target> </project> 09/07/12 http://coderinsights.blogspot.in 13
  • 14. Basic build.properties source.directory = /mnt/work/ ## Database Configuration db.user = username db.pass = password db.host = localhost db.name = database Usage: $phing –propertyfile build.properties 09/07/12 http://coderinsights.blogspot.in 14
  • 15. Most Useful Elements • Filesets: define once,use many <fileset id="src_crons" dir="${dir.crons_path}/statistic-engine/"> <include name="*.php"/> <exclude name="populate_opx_tables.php" /> </fileset> • Mappers & Filters: Transform files during copy/move/… <copy todir="${build}"> <fileset refid="files"/> <mapper type="glob" from="*.txt" to="*.new.txt"/> <filterchain> <replaceregexp> <regexp pattern="rn" replace="n"/> <expandproperties/> </replaceregexp> </filterchain> </copy> 09/07/12 http://coderinsights.blogspot.in 15
  • 16. Executing External Tools • Nearly all file transfer tools will be external commands • For this we need the Exec task <exec command="cp file1 file2" /> 09/07/12 http://coderinsights.blogspot.in 16
  • 17. Examples SVN, Git <svncopy username=“pavan“ password="test” repositoryurl="svn://localhost/phing/trunk/“ todir="svn://localhost/phing/tags/1.0"/> <svnexport repositoryurl="svn://localhost/project/trunk/” todir="/home/pavan/dev"/> <svnlastrevision repositoryurl="svn://localhost/project/trunk/” propertyname="lastrev"/> <echo>Last revision: ${lastrev}</echo> <svnlastrevision repositoryurl="${deploy.svn}” property="deploy.rev"/> <svnexport repositoryurl="${deploy.svn}" todir="/www/releases/build-${deploy.rev}"/> 09/07/12 http://coderinsights.blogspot.in 17
  • 18. Examples Packaging – Tar/Zip <tar compression="gzip" destFile="package.tgz" basedir="build"/> <zip destfile="htmlfiles.zip"> <fileset dir="."> <include name="**/*.html"/> </fileset> </zip> 09/07/12 http://coderinsights.blogspot.in 18
  • 19. Examples Documentation: – DocBlox – PhpDocumentor – ApiGen <docblox title="Phing API Documentation" output="docs" quiet="true"> <fileset dir="../../classes"> <include name="**/*.php"/> </fileset> </docblox> 09/07/12 http://coderinsights.blogspot.in 19
  • 20. Examples • SCP/FTP <scp username="john" password="smith" host="webserver" todir="/www/htdocs/project/"> <fileset dir="test"> <include name="*.html"/> </fileset> </scp> <ftpdeploy host="server01” username="john" password="smit" dir="/var/www"> <fileset dir="."> <include name="*.html"/> </fileset> </ftpdeploy> 09/07/12 http://coderinsights.blogspot.in 20
  • 21. Database Migrations • Set of delta SQL files (1-create-post.sql) • Tracks current version of your db in changelog table • Generates do and undo SQL files CREATE TABLE changelog ( change_number BIGINT NOT NULL, delta_set VARCHAR(10) NOT NULL, start_dt TIMESTAMP NOT NULL, complete_dt TIMESTAMP NULL, applied_by VARCHAR(100) NOT NULL, description VARCHAR(500) NOT NULL ) 09/07/12 http://coderinsights.blogspot.in 21
  • 22. Database Migrations • Delta scripts with do (up) & undo (down) parts -- // CREATE TABLE ‘post‘ ( ‘title‘ VARCHAR(255), ‘time_created‘ DATETIME, ‘content‘ MEDIUMTEXT ); -- //@UNDO DROP TABLE ‘post‘; -- // 09/07/12 http://coderinsights.blogspot.in 22
  • 23. Database Migrations <dbdeploy url="sqlite:test.db" dir="deltas" outputfile="deploy.sql" undooutputfile="undo.sql"/> <pdosqlexec src="deploy.sql" url="sqlite:test.db"/> Buildfile: /home/pavan/dbdeploy/build.xml Demo > migrate: [dbdeploy] Getting applied changed numbers from DB: mysql:host=localhost;dbname=demo [dbdeploy] Current db revision: 0 [dbdeploy] Checkall: [pdosqlexec] Executing file: /home/michiel/dbdeploy/deploy.sql [pdosqlexec] 3 of 3 SQL statements executed successfully BUILD FINISHED 09/07/12 http://coderinsights.blogspot.in 23
  • 24. Database Migrations -- Fragment begins: 1 -- INSERT INTO changelog (change_number, delta_set, start_dt, applied_by, description) VALUES (1, ’Main’, NOW(), ’dbdeploy’, ’1-create_initial_schema.sql’); --// CREATE TABLE ‘post‘ ( ‘title‘ VARCHAR(255), ‘time_created‘ DATETIME, ‘content‘ MEDIUMTEXT ); UPDATE changelog SET complete_dt = NOW() WHERE change_number = 1 AND delta_set = ’Main’; -- Fragment ends: 1 -- 09/07/12 http://coderinsights.blogspot.in 24
  • 25. Database Migrations -- Fragment begins: 1 -- DROP TABLE ‘post‘; --// DELETE FROM changelog WHERE change_number = 1 AND delta_set = ’Main’; -- Fragment ends: 1 -- 09/07/12 http://coderinsights.blogspot.in 25
  • 26. Phing Way 09/07/12 http://coderinsights.blogspot.in 26
  • 27. Pitfalls • Cleanup Deleted Source Files – Usually only a problem when you have * include patterns • Undefined properties not raised as an error • Little to no IDE support (Minimal support using Ant Plugin for Eclipse) 09/07/12 http://coderinsights.blogspot.in 27

Notes de l'éditeur

  1. We are human We get bored We forget things We make mistakes Repetitive tasks like Versioncontrol (Unit)Testing Configuring Packaging Uploading DBchanges
  2. Phing is Recursive acronym In its simplest form, Phing allows you to copy code from your source control repository (SVN or Git) to your server via SSH, and perform pre and post-deploy functions like restarting a webserver, busting cache, renaming files, running database migrations and so on. With Phing it’s also possible to deploy to many machines at once. Original PHP4 version by Andreas Aderhold Cross-platform(for Windows) Build Systems Apache ANT Capastrano Plain PHP or BASH or BAT Files
  3. Interface to various popular (PHP)tools
  4. Introduced facade targets • Moved all the properties out • Used properties for configurability • Defined and reused elements with ids • Use of reflexives and replacements • Separating build files
  5. Optional documentation Pear install phing/phingdocs
  6. Other useful options: – Help (-h) – Specify properties (-D propname=value) – List targets (-l) – Get more output (-verbose or -debug)
  7. Task : code that performs a specific function (svncheckout, mkdir,etc.) Target : groups of tasks, can optionally depend on other targets Project : root node, contains multiple targets
  8. Mappers: Change filename Flatten directories Filters: Strip comments, whitespace Replace values Perform XSLT transformation Translation(i18n)