Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Add PHP and Composer support #102

Closed
wants to merge 10 commits into from
Closed

Add PHP and Composer support #102

wants to merge 10 commits into from

Conversation

ArnaudLigny
Copy link

@ArnaudLigny ArnaudLigny commented Nov 7, 2017

  • switch to PHP 5.6(.32)
  • install Composer and run composer install
  • cache vendor and .composer
  • download PHPoole.phar if necessary

@ArnaudLigny
Copy link
Author

ArnaudLigny commented Nov 8, 2017

A test with one of my site builded with PHPoole-library:

➜  build-image git:(php-support) ✗ ./test-tools/start-image.sh ../arnaudligny.fr
buildbot@0f907605175e:/$ build php scripts/build.php -e=prod
Cloning into '/opt/buildhome/repo'...
done.
Installing dependencies: node=6.10.2 ruby=2.1.2 yarn=0.18.1 php=5.6.32
Downloading and installing node v6.10.2...
Downloading https://nodejs.org/dist/v6.10.2/node-v6.10.2-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v6.10.2 (npm v3.10.10)
Using version v6.10.2 of node
Using /opt/buildhome/.rvm/gems/ruby-2.1.2
Switching to PHP 5.6.32
PHP 5.6.32 (cli) (built: Nov  4 2017 19:39:08) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
Downloading https://getcomposer.org/composer.phar via curl extension
[==================================================================] 1.77/1.77MB 100%
Changing permissions to 0755
Downloaded at /opt/buildhome/.phpbrew/bin/composer
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 13 installs, 0 updates, 0 removals
Generating autoload files
Installing missing commands
Executing user command: php scripts/build.php -e=prod
> Time: 0.3 seconds
Caching artifacts
Saved Composer Directory
Saved Vendor Directory
View full log
➜  build-image git:(php-support) ✗ ./test-tools/start-image.sh ../arnaudligny.fr
buildbot@0f907605175e:/$ build php scripts/build.php -e=prod
Cloning into '/opt/buildhome/repo'...
done.
Installing dependencies: node=6.10.2 ruby=2.1.2 yarn=0.18.1 php=5.6.32
Downloading and installing node v6.10.2...
Downloading https://nodejs.org/dist/v6.10.2/node-v6.10.2-linux-x64.tar.xz...
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v6.10.2 (npm v3.10.10)
Using version v6.10.2 of node
Using /opt/buildhome/.rvm/gems/ruby-2.1.2
Switching to PHP 5.6.32
PHP 5.6.32 (cli) (built: Nov  4 2017 19:39:08) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
Downloading https://getcomposer.org/composer.phar via curl extension
[==================================================================] 1.77/1.77MB 100%
Changing permissions to 0755
Downloaded at /opt/buildhome/.phpbrew/bin/composer
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 13 installs, 0 updates, 0 removals
  - Installing erusev/parsedown (1.6.3): Downloading (100%)         
  - Installing matthiasmullie/path-converter (1.1.0): Downloading (100%)         
  - Installing twig/twig (v1.34.4): Downloading (100%)         
  - Installing symfony/yaml (v2.8.27): Downloading (100%)         
  - Installing symfony/process (v2.8.27): Downloading (100%)         
  - Installing symfony/finder (v2.8.28): Downloading (100%)         
  - Installing symfony/filesystem (v2.8.27): Downloading (100%)         
  - Installing myclabs/php-enum (1.5.2): Downloading (100%)         
  - Installing matthiasmullie/minify (1.3.52): Downloading (100%)         
  - Installing erusev/parsedown-extra (0.7.1): Downloading (100%)         
  - Installing dflydev/dot-access-data (v1.1.0): Downloading (100%)         
  - Installing cocur/slugify (v2.5): Downloading (100%)         
  - Installing narno/phpoole-library (1.7.14): Downloading (100%)         
matthiasmullie/minify suggests installing psr/cache-implementation (Cache implementation to use with Minify::cache)
Generating autoload files
Installing missing commands
Executing user command: php scripts/build.php -e=prod

> Creating pages
  (1/16) index
  (2/16) magento-un-projet-e-commerce-a-suivre
  (3/16) magento-la-version-francaise-arrive
  (4/16) modules-payant-pour-magento-attention-aux-arnaques
  (5/16) ghpages-domain-https-cloudflare
  (6/16) magento-ca-prend-forme
  (7/16) utiliser-gettext-pour-traduire-vos-modules-magento
  (8/16) application-mobile-native-ou-hybride
  (9/16) augmenter-la-qualite-des-photos-sur-magento
  (10/16) magento-installation-de-la-beta-0-6
  (11/16) verifier-la-validite-des-fichiers-de-configuration-xml-de-magento
  (12/16) telecharger-manuellement-une-extension-magento
  (13/16) magento-ajouter-une-colonne-dans-une-grille
  (14/16) magento-une-premiere-beta-telechargeable
  (15/16) barcamp-magento-a-paris
  (16/16) magento-et-referencement-naturel-seo

> Converting pages
  (1/16) index
  (2/16) magento-un-projet-e-commerce-a-suivre
  (3/16) magento-la-version-francaise-arrive
  (4/16) modules-payant-pour-magento-attention-aux-arnaques
  (5/16) ghpages-domain-https-cloudflare (not published)
  (6/16) magento-ca-prend-forme
  (7/16) utiliser-gettext-pour-traduire-vos-modules-magento
  (8/16) application-mobile-native-ou-hybride
  (9/16) augmenter-la-qualite-des-photos-sur-magento
  (10/16) magento-installation-de-la-beta-0-6
  (11/16) verifier-la-validite-des-fichiers-de-configuration-xml-de-magento
  (12/16) telecharger-manuellement-une-extension-magento
  (13/16) magento-ajouter-une-colonne-dans-une-grille
  (14/16) magento-une-premiere-beta-telechargeable
  (15/16) barcamp-magento-a-paris
  (16/16) magento-et-referencement-naturel-seo

> Generating pages
  (1/7) Section: 1
  (2/7) Taxonomy: 7
  (3/7) Homepage: 0
  (4/7) ExternalBody: 0
  (5/7) PagesFromConfig: 5
  (6/7) Pagination: 3
  (7/7) Alias: 1

> Copy static files
  Done

> Rendering pages
  (1/31) _site/index.html
  (2/31) _site/blog/magento-un-projet-e-commerce-a-suivre/index.html
  (3/31) _site/blog/magento-la-version-francaise-arrive/index.html
  (4/31) _site/blog/modules-payant-pour-magento-attention-aux-arnaques/index.html
  (5/31) _site/blog/magento-ca-prend-forme/index.html
  (6/31) _site/blog/utiliser-gettext-pour-traduire-vos-modules-magento/index.html
  (7/31) _site/blog/application-mobile-native-ou-hybride/index.html
  (8/31) _site/blog/augmenter-la-qualite-des-photos-sur-magento/index.html
  (9/31) _site/blog/magento-installation-de-la-beta-0-6/index.html
  (10/31) _site/blog/verifier-la-validite-des-fichiers-de-configuration-xml-de-magento/index.html
  (11/31) _site/blog/telecharger-manuellement-une-extension-magento/index.html
  (12/31) _site/blog/magento-ajouter-une-colonne-dans-une-grille/index.html
  (13/31) _site/blog/magento-une-premiere-beta-telechargeable/index.html
  (14/31) _site/blog/barcamp-magento-a-paris/index.html
  (15/31) _site/blog/magento-et-referencement-naturel-seo/index.html
  (16/31) _site/blog/index.html
  (17/31) _site/tags/e-commerce/index.html
  (18/31) _site/tags/magento/index.html
  (19/31) _site/tags/application-mobile/index.html
  (20/31) _site/tags/apache-cordova/index.html
  (21/31) _site/tags/react-native/index.html
  (22/31) _site/tags/seo/index.html
  (23/31) _site/tags/index.html
  (24/31) _site/robots.txt
  (25/31) _site/sitemap.xml
  (26/31) _site/404.html
  (27/31) _site/rss.xml
  (28/31) _site/manifest.json
  (29/31) _site/blog/page/2/index.html
  (30/31) _site/blog/page/3/index.html
  (31/31) _site/blog/page/1/index.html

> Time: 0.3 seconds
Caching artifacts
Saved Composer Directory
Saved Vendor Directory

@calavera
Copy link
Contributor

Thanks for adding this. Unfortunately, there is a conflict in the functions script 😢

Do you mind fixing it?

@ArnaudLigny
Copy link
Author

Hello @calavera, I have just fixed the conflict with the "Cask" PR. I thinks it sound good now :-)

@calavera
Copy link
Contributor

thanks @Narno.

I'm not sure if we want to add vendor to the cache, it could make the tarball very big. Besides, we already cache the repository, if the vendor directly is there, we're already caching it, there is no need to cache it again.

@ArnaudLigny
Copy link
Author

Yep, according to this discussion on the same case for Travis CI, it's not a good practice to cache the vendor directory: travis-ci/travis-ci#4579.

I will update my PR.

Should not cache `vendor`.
@ArnaudLigny
Copy link
Author

@calavera done! :-)

brycekahle added a commit that referenced this pull request Feb 6, 2018
Remove php 5.5, add 7.2.2
Automatically install composer dependencies and cache them.

Fixes #124
Fixes #102

Co-Authored-By: Arnaud Ligny <github@narno.org>
@brycekahle brycekahle mentioned this pull request Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants