SlideShare a Scribd company logo
Building com Phing
   (em 7 minutos)


     Duodraco

      PHPSP
      Arizona
Build em PHP?
●   Build = automação de processos
    –   Testes e artefatos de QA
    –   Deployment
    –   Atualização
    –   Distribuição
    –   Verificação
Phing
●
    PHing Is Not Gnumake
●
    http://phing.info
●   Sintaxe do Apache Ant
    –   Buildfile com XML
●   Lógica
●   Tarefas Core
●   Tarefas Opcionais
Estrutura
 <project default=””>
   <target name=””>
     <task_a param=””/>
     <task_b param=””>
       <aux name=”” value=””/>
     </task_b>
   </target>
 </project
Copiando o projeto...
 <target name=”le_deploy”>
   <copy todir=”/var/www”>
     <fileset dir=".">
       <exclude name=".git" />
     </fileset>
   </copy>
 </target>
PHPUnit...
 <target name=”phpunit”>
   <phpunit bootstrap="src/autoload.php"
            codecoverage="true"
            haltonfailure="true"
            haltonerror="true">
    <formatter type="plain" usefile="false"/>
    <batchtest>
      <fileset dir="tests">
        <include name="**/*Test*.php"/>
      </fileset>
    </batchtest>
   </phpunit>
 </target>
Checando dependencias
    <target name=”check_dep”>
      <composer command=”update”/>
    </target>


●
    composer.json
    {
      require:{
        “php”:”>5.4.0”,
        “ext-imagick”:”*”,
        “monolog/monolog”:”0.8.*”
      }
    }
Variáveis
●
    build.properties
    app.version=13.04
    path.log=/var/log/myapps/app.log
    path.webroot=/var/www

●
    build.xml
    <properties file=”build.properties”/>
    <echo msg=”App ver. ${app.version}”/>
    <copy todir=”${path.webroot}”>
      ...
Combinando tarefas
 <target name=”phpunit”>
   …
 <target name=”pdepend”>
   …
 <target name=”phpcpd”>
   …
 <target name=”qa”
  depends=”phpcpd,pdepend,phpunit”>
Organizando
 <target name=”qa”>
   <phing
     phingfile="qa.xml"
     inheritRefs="true"
     target="qa-tests" />
 </target>
 <target name=”deploy”>
   <phing
     phingfile="deploy.xml"
     inheritRefs="true"
     target="install" />
 </target>
Executando...
●   # phing
●   # phing -f appbuild.xml
●   # phing nossotarget
Instalando...
●   pear
    # pear channel-discover
    pear.phing.info
    # pear install -a phing/phing


●   composer
    phing/phing
Obrigado
http://duodra.co

More Related Content

What's hot (20)

PDF
Alfresco study presentation 38th customize How-To WebDAV
Takeshi Totani
 
PDF
What happens in laravel 4 bootstraping
Jace Ju
 
PDF
HTML5 tutorial: canvas, offfline & sockets
Remy Sharp
 
PDF
The Peanut Butter Cup of Web-dev: Plack and single page web apps
John Anderson
 
PDF
Dependency management in Magento with Composer
Manuele Menozzi
 
PDF
Search 500-video-clips
phanhung20
 
PDF
Write your first WordPress plugin
Anthony Montalbano
 
PDF
JavaScript APIs - The Web is the Platform
Robert Nyman
 
PPTX
1. Hello Popescu in Laravel
Razvan Raducanu, PhD
 
PDF
DevHub 3 - Composer plus Magento
Magento Dev
 
PPTX
2.hello popescu2 in Laravel
Razvan Raducanu, PhD
 
PDF
Hacking ansible
bcoca
 
PDF
jAPS 2 0 - Presentation Layer Comparison
William Ghelfi
 
PDF
Jlook web ui framework
HongSeong Jeon
 
PDF
Como construir uma Aplicação que consuma e produza updates no Twitter usando ...
Cirdes Filho
 
PDF
Dive into Play Framework
Maher Gamal
 
PDF
V2 and beyond
jimi-c
 
PDF
Continuous deployment of puppet modules
William O'Neill
 
PPTX
Django
Abhijeet Shekhar
 
DOCX
Codigo
nildar76
 
Alfresco study presentation 38th customize How-To WebDAV
Takeshi Totani
 
What happens in laravel 4 bootstraping
Jace Ju
 
HTML5 tutorial: canvas, offfline & sockets
Remy Sharp
 
The Peanut Butter Cup of Web-dev: Plack and single page web apps
John Anderson
 
Dependency management in Magento with Composer
Manuele Menozzi
 
Search 500-video-clips
phanhung20
 
Write your first WordPress plugin
Anthony Montalbano
 
JavaScript APIs - The Web is the Platform
Robert Nyman
 
1. Hello Popescu in Laravel
Razvan Raducanu, PhD
 
DevHub 3 - Composer plus Magento
Magento Dev
 
2.hello popescu2 in Laravel
Razvan Raducanu, PhD
 
Hacking ansible
bcoca
 
jAPS 2 0 - Presentation Layer Comparison
William Ghelfi
 
Jlook web ui framework
HongSeong Jeon
 
Como construir uma Aplicação que consuma e produza updates no Twitter usando ...
Cirdes Filho
 
Dive into Play Framework
Maher Gamal
 
V2 and beyond
jimi-c
 
Continuous deployment of puppet modules
William O'Neill
 
Codigo
nildar76
 

Similar to Building com Phing - 7Masters PHP (20)

KEY
An introduction to Phing the PHP build system
Jeremy Coates
 
PDF
Phing: Building with PHP
hozn
 
PDF
Building and deploying PHP applications with Phing
Michiel Rook
 
PDF
Phing101 or How to staff a build orchestra
raphaelstolt
 
PDF
Building and Deploying PHP apps with Phing
Michiel Rook
 
PDF
Building and Deploying PHP Apps Using phing
Mihail Irintchev
 
KEY
Phing
Jeremy Coates
 
ODP
Lighning Talk: PHP build process
Bryan Agee
 
KEY
An introduction to Phing the PHP build system (PHPDay, May 2012)
Jeremy Coates
 
PPTX
Automation with phing
Joey Rivera
 
PPTX
Php unit for drupal 8
valuebound
 
PDF
Phing for power users - frOSCon8
Stephan Hochdörfer
 
PDF
Deploying PHP applications with Phing
Michiel Rook
 
PDF
Phing for power users - dpc_uncon13
Stephan Hochdörfer
 
PDF
Putting Phing to Work for You
hozn
 
PDF
Phing
Vladimir Melnic
 
PPTX
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Max Romanovsky
 
PPTX
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
PDF
Сontinuous Integration - step to continuous deployment
Игорь Родионов
 
PDF
Phing i Fabric - Budowanie i deployment aplikacji webowych
leafnode
 
An introduction to Phing the PHP build system
Jeremy Coates
 
Phing: Building with PHP
hozn
 
Building and deploying PHP applications with Phing
Michiel Rook
 
Phing101 or How to staff a build orchestra
raphaelstolt
 
Building and Deploying PHP apps with Phing
Michiel Rook
 
Building and Deploying PHP Apps Using phing
Mihail Irintchev
 
Lighning Talk: PHP build process
Bryan Agee
 
An introduction to Phing the PHP build system (PHPDay, May 2012)
Jeremy Coates
 
Automation with phing
Joey Rivera
 
Php unit for drupal 8
valuebound
 
Phing for power users - frOSCon8
Stephan Hochdörfer
 
Deploying PHP applications with Phing
Michiel Rook
 
Phing for power users - dpc_uncon13
Stephan Hochdörfer
 
Putting Phing to Work for You
hozn
 
Symfony under control. Continuous Integration and Automated Deployments in Sy...
Max Romanovsky
 
Symfony Under Control by Maxim Romanovsky
php-user-group-minsk
 
Сontinuous Integration - step to continuous deployment
Игорь Родионов
 
Phing i Fabric - Budowanie i deployment aplikacji webowych
leafnode
 
Ad

More from iMasters (20)

PPTX
O que você precisa saber para modelar bancos de dados NoSQL - Dani Monteiro
iMasters
 
PDF
Postgres: wanted, beloved or dreaded? - Fabio Telles
iMasters
 
PPTX
Por que minha query esta lenta? - Suellen Moraes
iMasters
 
PPTX
Relato das trincheiras: o dia a dia de uma consultoria de banco de dados - Ig...
iMasters
 
PDF
ORMs heróis ou vilões dentro da arquitetura de dados? - Otávio gonçalves
iMasters
 
PPTX
SQL e NoSQL trabalhando juntos: uma comparação para obter o melhor de ambos -...
iMasters
 
PDF
Arquitetando seus dados na prática para a LGPD - Alessandra Martins
iMasters
 
PDF
O papel do DBA no mundo de ciência de dados e machine learning - Mauro Pichil...
iMasters
 
PDF
Desenvolvimento Mobile Híbrido, Nativo ou Web: Quando usá-los - Juliana Chahoud
iMasters
 
PDF
Use MDD e faça as máquinas trabalharem para você - Andreza Leite
iMasters
 
PDF
Entendendo os porquês do seu servidor - Talita Bernardes
iMasters
 
PDF
Backend performático além do "coloca mais máquina lá" - Diana Arnos
iMasters
 
PPTX
Dicas para uma maior performance em APIs REST - Renato Groffe
iMasters
 
PPTX
7 dicas de desempenho que equivalem por 21 - Danielle Monteiro
iMasters
 
PDF
Quem se importa com acessibilidade Web? - Mauricio Maujor
iMasters
 
PDF
Service Mesh com Istio e Kubernetes - Wellington Figueira da Silva
iMasters
 
PDF
Erros: Como eles vivem, se alimentam e se reproduzem? - Augusto Pascutti
iMasters
 
PDF
Elasticidade e engenharia de banco de dados para alta performance - Rubens G...
iMasters
 
PDF
Construindo aplicações mais confiantes - Carolina Karklis
iMasters
 
PDF
Monitoramento de Aplicações - Felipe Regalgo
iMasters
 
O que você precisa saber para modelar bancos de dados NoSQL - Dani Monteiro
iMasters
 
Postgres: wanted, beloved or dreaded? - Fabio Telles
iMasters
 
Por que minha query esta lenta? - Suellen Moraes
iMasters
 
Relato das trincheiras: o dia a dia de uma consultoria de banco de dados - Ig...
iMasters
 
ORMs heróis ou vilões dentro da arquitetura de dados? - Otávio gonçalves
iMasters
 
SQL e NoSQL trabalhando juntos: uma comparação para obter o melhor de ambos -...
iMasters
 
Arquitetando seus dados na prática para a LGPD - Alessandra Martins
iMasters
 
O papel do DBA no mundo de ciência de dados e machine learning - Mauro Pichil...
iMasters
 
Desenvolvimento Mobile Híbrido, Nativo ou Web: Quando usá-los - Juliana Chahoud
iMasters
 
Use MDD e faça as máquinas trabalharem para você - Andreza Leite
iMasters
 
Entendendo os porquês do seu servidor - Talita Bernardes
iMasters
 
Backend performático além do "coloca mais máquina lá" - Diana Arnos
iMasters
 
Dicas para uma maior performance em APIs REST - Renato Groffe
iMasters
 
7 dicas de desempenho que equivalem por 21 - Danielle Monteiro
iMasters
 
Quem se importa com acessibilidade Web? - Mauricio Maujor
iMasters
 
Service Mesh com Istio e Kubernetes - Wellington Figueira da Silva
iMasters
 
Erros: Como eles vivem, se alimentam e se reproduzem? - Augusto Pascutti
iMasters
 
Elasticidade e engenharia de banco de dados para alta performance - Rubens G...
iMasters
 
Construindo aplicações mais confiantes - Carolina Karklis
iMasters
 
Monitoramento de Aplicações - Felipe Regalgo
iMasters
 
Ad

Building com Phing - 7Masters PHP

  • 1. Building com Phing (em 7 minutos) Duodraco PHPSP Arizona
  • 2. Build em PHP? ● Build = automação de processos – Testes e artefatos de QA – Deployment – Atualização – Distribuição – Verificação
  • 3. Phing ● PHing Is Not Gnumake ● http://phing.info ● Sintaxe do Apache Ant – Buildfile com XML ● Lógica ● Tarefas Core ● Tarefas Opcionais
  • 4. Estrutura <project default=””> <target name=””> <task_a param=””/> <task_b param=””> <aux name=”” value=””/> </task_b> </target> </project
  • 5. Copiando o projeto... <target name=”le_deploy”> <copy todir=”/var/www”> <fileset dir="."> <exclude name=".git" /> </fileset> </copy> </target>
  • 6. PHPUnit... <target name=”phpunit”> <phpunit bootstrap="src/autoload.php" codecoverage="true" haltonfailure="true" haltonerror="true"> <formatter type="plain" usefile="false"/> <batchtest> <fileset dir="tests"> <include name="**/*Test*.php"/> </fileset> </batchtest> </phpunit> </target>
  • 7. Checando dependencias <target name=”check_dep”> <composer command=”update”/> </target> ● composer.json { require:{ “php”:”>5.4.0”, “ext-imagick”:”*”, “monolog/monolog”:”0.8.*” } }
  • 8. Variáveis ● build.properties app.version=13.04 path.log=/var/log/myapps/app.log path.webroot=/var/www ● build.xml <properties file=”build.properties”/> <echo msg=”App ver. ${app.version}”/> <copy todir=”${path.webroot}”> ...
  • 9. Combinando tarefas <target name=”phpunit”> … <target name=”pdepend”> … <target name=”phpcpd”> … <target name=”qa” depends=”phpcpd,pdepend,phpunit”>
  • 10. Organizando <target name=”qa”> <phing phingfile="qa.xml" inheritRefs="true" target="qa-tests" /> </target> <target name=”deploy”> <phing phingfile="deploy.xml" inheritRefs="true" target="install" /> </target>
  • 11. Executando... ● # phing ● # phing -f appbuild.xml ● # phing nossotarget
  • 12. Instalando... ● pear # pear channel-discover pear.phing.info # pear install -a phing/phing ● composer phing/phing