From 1b1752a0e94b97c36c585fb124c53a182a6473c9 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 10 Oct 2016 17:44:50 -0600 Subject: [PATCH] uses drupal console instead of drush (#184) * uses drupal console instead of drush --- appengine/flexible/drupal8/Dockerfile | 6 - appengine/flexible/drupal8/README.md | 44 +- appengine/flexible/drupal8/app.yaml | 5 +- appengine/flexible/drupal8/composer.json | 8 +- appengine/flexible/drupal8/composer.lock | 1218 +++++++++++++++-- .../flexible/drupal8/tests/DeployTest.php | 95 +- .../drupal8/tests/config/install_drupal8.yml | 22 - pubsub/app/app.yaml | 2 +- testing/ExecuteCommandTrait.php | 5 +- 9 files changed, 1200 insertions(+), 205 deletions(-) delete mode 100644 appengine/flexible/drupal8/Dockerfile delete mode 100644 appengine/flexible/drupal8/tests/config/install_drupal8.yml diff --git a/appengine/flexible/drupal8/Dockerfile b/appengine/flexible/drupal8/Dockerfile deleted file mode 100644 index 661b1ab13f..0000000000 --- a/appengine/flexible/drupal8/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -# This file will go away once gcloud implements fingerprinting. -FROM gcr.io/php-mvm-a/php-nginx:latest - -# The docker image will configure the document root according to this -# environment variable. -ENV DOCUMENT_ROOT /app diff --git a/appengine/flexible/drupal8/README.md b/appengine/flexible/drupal8/README.md index b984cc844c..03dcb61af7 100644 --- a/appengine/flexible/drupal8/README.md +++ b/appengine/flexible/drupal8/README.md @@ -17,13 +17,22 @@ Before setting up Drupal 8 on Managed VMs, you will need to complete the followi ### Download -Use the [Drupal 8 Console][4] to install a drupal project with the following command: +Use the [Drupal 8 Drush CLI][4] to install a drupal project. This can be installed locally +by running `composer install` in this directory: ```sh -drupal site:new PROJECT_NAME 8.0.0 +composer install +./vendor/bin/drush ``` -Alternatively, you can download a compressed file from the [Drupal Website][5]. +Now you can run the command to download drupal: + +```sh +cd /path/to/drupal +/path/to/drush dl drupal +``` + +Alternatively, you can download a compressed file of Druapl 8 from the [Drupal Website][5]. ### Installation @@ -34,17 +43,14 @@ Alternatively, you can download a compressed file from the [Drupal Website][5]. ``` Open [http://localhost:8080](http://localhost:8080) in your browser after running these steps - 1. **BETA** You can also try setting up your Drupal 8 instance using the [Drupal 8 Console][4] + 1. You can also try setting up your Drupal 8 instance using [Drush][4] ```sh cd /path/to/drupal - drupal site:install \ - --langcode en \ - --db-type mysql \ - --db-name DATABASE_NAME - --db-user DATABASE_USERNAME - --db-pass DATABASE_PASSWORD - --site-name 'My Drupal Site On Google' \ - --site-mail you@example.com \ + /path/to/drush site-install \ + --locale=en \ + --db-path=mysql://user@pass:host/db_name \ + --site-name='My Drupal Site On Google' \ + --site-mail=you@example.com \ --account-name admin \ --account-mail you@example.com \ --account-pass admin @@ -64,13 +70,12 @@ git clone https://github.com/GoogleCloudPlatform/php-docs-samples /path/to/php-d cd /path/to/php-docs-samples/ # copy the four files below to the root directory of your Drupal project -cp managed_vms/drupal8/{app.yaml,php.ini,Dockerfile,nginx-app.conf} /path/to/drupal +cp managed_vms/drupal8/{app.yaml,php.ini,nginx-app.conf} /path/to/drupal ``` The four files needed are as follows: 1. [`app.yaml`](app.yaml) - The App Engine configuration for your project - 1. [`Dockerfile`](Dockerfile) - Container configuration for the PHP runtime 1. [`php.ini`](php.ini) - Optional ini used to extend the runtime configuration. 1. [`nginx-app.conf`](nginx-app.conf) - Nginx web server configuration needed for `Drupal 8` @@ -80,19 +85,20 @@ For now, you need to disable the CSS and JS preprocessed caching that Drupal 8 e To do this, go to `/admin/config/development/performance` and deselect the two chechboxes (`Aggregate CSS files` and `Aggregate JS files`) under **Bandwidth Optimizations**. -Alternatively, you can use the [Drupal 8 Console][4] to change this config setting: +Alternatively, you can use [Drush][4] to change this config setting: ```sh # this command must be run inside the root directory of a drupal project $ cd /path/to/drupal -# this will expand your text editor -$ drupal config:edit system.performance +$ /path/to/drush pm-enable config -y +$ /path/to/drush config-set system.performance css.preprocess 0 +$ /path/to/drush config-set system.performance js.preprocess 0 ``` -Change the values `preprocess` under `css` and `js` to `false`. +This will change the values `preprocess` under `css` and `js` to `false`. [1]: https://cloud.google.com/appengine/docs/managed-vms/ [2]: https://console.cloud.google.com [3]: https://cloud.google.com/sql/docs/getting-started -[4]: https://www.drupal.org/project/console +[4]: http://docs.drush.org/en/master/install/ [5]: https://www.drupal.org/8/download \ No newline at end of file diff --git a/appengine/flexible/drupal8/app.yaml b/appengine/flexible/drupal8/app.yaml index e8b7397059..784be7ea02 100644 --- a/appengine/flexible/drupal8/app.yaml +++ b/appengine/flexible/drupal8/app.yaml @@ -1,2 +1,5 @@ -runtime: custom +runtime: php vm: true + +runtime_config: + document_root: "" \ No newline at end of file diff --git a/appengine/flexible/drupal8/composer.json b/appengine/flexible/drupal8/composer.json index 24932f6652..d946374f12 100644 --- a/appengine/flexible/drupal8/composer.json +++ b/appengine/flexible/drupal8/composer.json @@ -1,9 +1,11 @@ { + "require": { + "drush/drush": "^8.1" + }, "require-dev": { "guzzlehttp/guzzle": "^6.2", "monolog/monolog": "^1.19", - "symfony/console": " ~2.6.0", - "symfony/process": "^3.0", - "symfony/yaml": "^3.0" + "symfony/console": " ^2.7", + "symfony/process": "^3.0" } } diff --git a/appengine/flexible/drupal8/composer.lock b/appengine/flexible/drupal8/composer.lock index 6023897287..d8858680fc 100644 --- a/appengine/flexible/drupal8/composer.lock +++ b/appengine/flexible/drupal8/composer.lock @@ -4,10 +4,246 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a7f74d2e52d30e7fba246b25452aa016", - "content-hash": "6a45e24c0c381fbcb05a07af592978ec", + "hash": "8fe1e49264d9dafda5e7f061eba52b14", + "content-hash": "03146c12e434da59151471cbd09b964a", "packages": [], "packages-dev": [ + { + "name": "consolidation/annotated-command", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/consolidation/annotated-command.git", + "reference": "c2dc2464e1edf0498bf97a99f34cac5805d00946" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/c2dc2464e1edf0498bf97a99f34cac5805d00946", + "reference": "c2dc2464e1edf0498bf97a99f34cac5805d00946", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "psr/log": "~1.0", + "symfony/console": "~2.5|~3.0", + "symfony/event-dispatcher": "~2.5|~3.0", + "symfony/finder": "~2.5|~3.0" + }, + "require-dev": { + "consolidation/output-formatters": "~1", + "phpunit/phpunit": "4.*", + "satooshi/php-coveralls": "^1.0", + "squizlabs/php_codesniffer": "2.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\AnnotatedCommand\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Initialize Symfony Console commands from annotated command class methods.", + "time": "2016-09-13 21:37:50" + }, + { + "name": "consolidation/output-formatters", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/consolidation/output-formatters.git", + "reference": "aadb1ed2deb72bc1351bb6f3b3ddd328222e9261" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/aadb1ed2deb72bc1351bb6f3b3ddd328222e9261", + "reference": "aadb1ed2deb72bc1351bb6f3b3ddd328222e9261", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "symfony/console": "~2.5|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "satooshi/php-coveralls": "^1.0", + "squizlabs/php_codesniffer": "2.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\OutputFormatters\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Format text by applying transformations provided by plug-in formatters.", + "time": "2016-09-14 23:51:08" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "type": "project", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2014-10-24 07:27:01" + }, + { + "name": "drush/drush", + "version": "8.1.5", + "source": { + "type": "git", + "url": "https://github.com/drush-ops/drush.git", + "reference": "1cf4b2df22d1940bec1637d56c69ba5634a982f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/drush-ops/drush/zipball/1cf4b2df22d1940bec1637d56c69ba5634a982f5", + "reference": "1cf4b2df22d1940bec1637d56c69ba5634a982f5", + "shasum": "" + }, + "require": { + "consolidation/annotated-command": "~1", + "consolidation/output-formatters": "~1", + "pear/console_table": "~1.3.0", + "php": ">=5.4.5", + "psr/log": "~1.0", + "psy/psysh": "~0.6", + "symfony/console": "~2.7", + "symfony/event-dispatcher": "~2.7", + "symfony/finder": "~2.7", + "symfony/var-dumper": "~2.7", + "symfony/yaml": "~2.3", + "webmozart/path-util": "~2" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/process": "2.7.*" + }, + "suggest": { + "drush/config-extra": "Provides configuration workflow commands, such as config-merge.", + "ext-pcntl": "*" + }, + "bin": [ + "drush", + "drush.launcher", + "drush.php", + "drush.complete.sh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Drush": "lib/", + "Consolidation": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Moshe Weitzman", + "email": "weitzman@tejasa.com" + }, + { + "name": "Owen Barton", + "email": "drupal@owenbarton.com" + }, + { + "name": "Mark Sonnabaum", + "email": "marksonnabaum@gmail.com" + }, + { + "name": "Antoine Beaupré", + "email": "anarcat@koumbit.org" + }, + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + }, + { + "name": "Jonathan Araña Cruz", + "email": "jonhattan@faita.net" + }, + { + "name": "Jonathan Hedstrom", + "email": "jhedstrom@gmail.com" + }, + { + "name": "Christopher Gervais", + "email": "chris@ergonlogic.com" + }, + { + "name": "Dave Reid", + "email": "dave@davereid.net" + }, + { + "name": "Damian Lee", + "email": "damiankloip@googlemail.com" + } + ], + "description": "Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.", + "homepage": "http://www.drush.org", + "time": "2016-09-25 16:55:26" + }, { "name": "guzzlehttp/guzzle", "version": "6.2.1", @@ -179,18 +415,105 @@ ], "time": "2016-06-24 23:00:38" }, + { + "name": "jakub-onderka/php-console-color", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", + "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "3.7.*", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleColor": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com", + "homepage": "http://www.acci.cz" + } + ], + "time": "2014-04-08 15:00:19" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "shasum": "" + }, + "require": { + "jakub-onderka/php-console-color": "~0.1", + "php": ">=5.3.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JakubOnderka\\PhpConsoleHighlighter": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "time": "2015-04-20 18:58:01" + }, { "name": "monolog/monolog", - "version": "1.20.0", + "version": "1.21.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037" + "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/55841909e2bcde01b5318c35f2b74f8ecc86e037", - "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952", + "reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952", "shasum": "" }, "require": { @@ -255,133 +578,145 @@ "logging", "psr-3" ], - "time": "2016-07-02 14:02:10" + "time": "2016-07-29 03:23:52" }, { - "name": "psr/http-message", - "version": "1.0", + "name": "nikic/php-parser", + "version": "v2.1.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "4dd659edadffdc2143e4753df655d866dbfeedf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", - "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4dd659edadffdc2143e4753df655d866dbfeedf0", + "reference": "4dd659edadffdc2143e4753df655d866dbfeedf0", "shasum": "" }, "require": { - "php": ">=5.3.0" + "ext-tokenizer": "*", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.1-dev" } }, "autoload": { "psr-4": { - "Psr\\Http\\Message\\": "src/" + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Nikita Popov" } ], - "description": "Common interface for HTTP messages", + "description": "A PHP parser written in PHP", "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" + "parser", + "php" ], - "time": "2015-05-04 20:22:00" + "time": "2016-09-16 12:04:44" }, { - "name": "psr/log", - "version": "1.0.0", + "name": "pear/console_table", + "version": "v1.3.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" + "url": "https://github.com/pear/Console_Table.git", + "reference": "64100b9ee81852f4fa17823e55d0b385a544f976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", + "url": "https://api.github.com/repos/pear/Console_Table/zipball/64100b9ee81852f4fa17823e55d0b385a544f976", + "reference": "64100b9ee81852f4fa17823e55d0b385a544f976", "shasum": "" }, + "require": { + "php": ">=5.2.0" + }, + "suggest": { + "pear/Console_Color2": ">=0.1.2" + }, "type": "library", "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } + "classmap": [ + "Table.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-2-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Jan Schneider", + "homepage": "http://pear.php.net/user/yunosh" + }, + { + "name": "Tal Peer", + "homepage": "http://pear.php.net/user/tal" + }, + { + "name": "Xavier Noguer", + "homepage": "http://pear.php.net/user/xnoguer" + }, + { + "name": "Richard Heyes", + "homepage": "http://pear.php.net/user/richard" } ], - "description": "Common interface for logging libraries", + "description": "Library that makes it easy to build console style tables.", + "homepage": "http://pear.php.net/package/Console_Table/", "keywords": [ - "log", - "psr", - "psr-3" + "console" ], - "time": "2012-12-21 11:40:51" + "time": "2016-01-21 16:14:31" }, { - "name": "symfony/console", - "version": "v2.6.13", - "target-dir": "Symfony/Component/Console", + "name": "phpdocumentor/reflection-common", + "version": "1.0", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "0e5e18ae09d3f5c06367759be940e9ed3f568359" + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0e5e18ae09d3f5c06367759be940e9ed3f568359", - "reference": "0e5e18ae09d3f5c06367759be940e9ed3f568359", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5" }, "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" + "phpunit/phpunit": "^4.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -390,30 +725,580 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" } ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2015-07-26 09:08:40" + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27 11:43:31" }, { - "name": "symfony/process", - "version": "v3.1.2", + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5c11a1a4d4016662eeaf0f8757958c7de069f9a0", - "reference": "5c11a1a4d4016662eeaf0f8757958c7de069f9a0", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-09-30 07:12:33" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", + "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-06-10 07:14:17" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06 14:39:51" + }, + { + "name": "psr/log", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "5277094ed527a1c4477177d102fe4c53551953e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/5277094ed527a1c4477177d102fe4c53551953e0", + "reference": "5277094ed527a1c4477177d102fe4c53551953e0", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-09-19 16:02:08" + }, + { + "name": "psy/psysh", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e64e10b20f8d229cac76399e1f3edddb57a0f280", + "reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1", + "jakub-onderka/php-console-highlighter": "0.3.*", + "nikic/php-parser": "^1.2.1|~2.0", + "php": ">=5.3.9", + "symfony/console": "~2.3.10|^2.4.2|~3.0", + "symfony/var-dumper": "~2.7|~3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "~1.5", + "phpunit/phpunit": "~3.7|~4.0|~5.0", + "squizlabs/php_codesniffer": "~2.0", + "symfony/finder": "~2.1|~3.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/Psy/functions.php" + ], + "psr-4": { + "Psy\\": "src/Psy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2016-03-09 05:03:14" + }, + { + "name": "symfony/console", + "version": "v2.8.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "d7a5a88178f94dcc29531ea4028ea614e35452d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/d7a5a88178f94dcc29531ea4028ea614e35452d4", + "reference": "d7a5a88178f94dcc29531ea4028ea614e35452d4", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/debug": "~2.7,>=2.7.2|~3.0.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2016-09-28 00:10:16" + }, + { + "name": "symfony/debug", + "version": "v3.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/697c527acd9ea1b2d3efac34d9806bf255278b0a", + "reference": "697c527acd9ea1b2d3efac34d9806bf255278b0a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2016-07-30 07:22:48" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/889983a79a043dfda68f38c38b6dba092dd49cd8", + "reference": "889983a79a043dfda68f38c38b6dba092dd49cd8", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-07-28 16:56:28" + }, + { + "name": "symfony/finder", + "version": "v2.8.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "bc24c8f5674c6f6841f2856b70e5d60784be5691" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/bc24c8f5674c6f6841f2856b70e5d60784be5691", + "reference": "bc24c8f5674c6f6841f2856b70e5d60784be5691", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2016-09-28 00:10:16" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "dff51f72b0706335131b00a7f49606168c582594" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", + "reference": "dff51f72b0706335131b00a7f49606168c582594", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-05-18 14:26:46" + }, + { + "name": "symfony/process", + "version": "v3.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "66de154ae86b1a07001da9fbffd620206e4faf94" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/66de154ae86b1a07001da9fbffd620206e4faf94", + "reference": "66de154ae86b1a07001da9fbffd620206e4faf94", "shasum": "" }, "require": { @@ -449,29 +1334,92 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:42:25" + "time": "2016-09-29 14:13:09" + }, + { + "name": "symfony/var-dumper", + "version": "v2.8.12", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "08761341cc4a3b2d9d9578364f7c655b178254aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/08761341cc4a3b2d9d9578364f7c655b178254aa", + "reference": "08761341cc4a3b2d9d9578364f7c655b178254aa", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2016-09-29 14:06:15" }, { "name": "symfony/yaml", - "version": "v3.1.2", + "version": "v2.8.12", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de" + "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/2884c26ce4c1d61aebf423a8b912950fe7c764de", - "reference": "2884c26ce4c1d61aebf423a8b912950fe7c764de", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e7540734bad981fe59f8ef14b6fc194ae9df8d9c", + "reference": "e7540734bad981fe59f8ef14b6fc194ae9df8d9c", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -498,7 +1446,103 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-06-29 05:41:56" + "time": "2016-09-02 01:57:56" + }, + { + "name": "webmozart/assert", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", + "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2016-08-09 15:02:57" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "time": "2015-12-17 08:42:14" } ], "aliases": [], diff --git a/appengine/flexible/drupal8/tests/DeployTest.php b/appengine/flexible/drupal8/tests/DeployTest.php index 7b64cf135a..0ecd5bcc5a 100644 --- a/appengine/flexible/drupal8/tests/DeployTest.php +++ b/appengine/flexible/drupal8/tests/DeployTest.php @@ -18,8 +18,6 @@ namespace Google\Cloud\Samples\AppEngine\Drupal; use Google\Cloud\TestUtils\ExecuteCommandTrait; -use Symfony\Component\Process\Process; -use Symfony\Component\Yaml\Yaml; use Monolog\Logger; use GuzzleHttp\Client; @@ -56,14 +54,6 @@ private static function getTargetDir() $versionId = self::getVersion(); $targetDir = sprintf('%s/%s', $tmp, $versionId); - if (!file_exists($targetDir)) { - mkdir($targetDir); - } - - if (!is_writable($targetDir)) { - throw new \Exception(sprintf('Cannot write to %s', $targetDir)); - } - return $targetDir; } @@ -83,10 +73,8 @@ public static function setUpBeforeClass() $projectId = self::getProjectId(); $version = self::getVersion(); - // move into the target directory - self::setWorkingDirectory($targetDir); - $console = self::installDrupalConsole($targetDir); - self::downloadAndInstallDrupal($targetDir, $console); + // download, install, and deploy + self::downloadAndInstallDrupal($targetDir); self::deploy($projectId, $version, $targetDir); } @@ -108,75 +96,52 @@ private static function verifyEnvironmentVariables() } } - private static function installDrupalConsole($targetDir) - { - $console = sprintf('%s/drupal', $targetDir); - if (!file_exists($console)) { - $cmd = sprintf( - 'curl https://drupalconsole.com/installer -Lo %s', - $console - ); - self::execute($cmd); - self::execute(sprintf('chmod +x %s', $console)); - } - - return $console; - } - - private static function downloadAndInstallDrupal($targetDir, $console) + private static function downloadAndInstallDrupal($targetDir) { - $installFile = sprintf('%s/config/install_drupal8.yml', __DIR__); - $config = Yaml::parse(file_get_contents($installFile)); - - $configVars = [ - 'db-host' => 'DRUPAL_DATABASE_HOST', - 'db-name' => 'DRUPAL_DATABASE_NAME', - 'db-user' => 'DRUPAL_DATABASE_USER', - 'db-pass' => 'DRUPAL_DATABASE_PASS', - 'account-name' => 'DRUPAL_ADMIN_USERNAME', - 'account-pass' => 'DRUPAL_ADMIN_PASSWORD', - ]; + $console = __DIR__ . '/../vendor/bin/drush'; - foreach ($configVars as $key => $name) { - $config['commands'][1]['options'][$key] = getenv($name); - } + $dbUrl = sprintf('mysql://%s:%s@%s/%s', + getenv('DRUPAL_DATABASE_USER'), + getenv('DRUPAL_DATABASE_PASS'), + getenv('DRUPAL_DATABASE_HOST'), + getenv('DRUPAL_DATABASE_NAME') + ); - $newInstallFile = sprintf('%s/install_drupal8.yml', $targetDir); - file_put_contents($newInstallFile, Yaml::dump($config)); + // download + self::setWorkingDirectory(dirname($targetDir)); + $downloadCmd = sprintf('%s dl drupal --drupal-project-rename=%s', + $console, + basename($targetDir)); + self::execute($downloadCmd); // install - self::execute(sprintf('%s init', $console)); - self::execute(sprintf('%s chain --file=%s', $console, $newInstallFile)); - - // move into the drupal directory so additional commands can be loaded - self::setWorkingDirectory($targetDir . '/drupal8.test'); - - // run setup commands - self::execute(sprintf('%s theme:download bootstrap 8.x-3.0-beta2', $console)); - - // this one is long, so create the process to extend the timeout - $process = self::createProcess(sprintf('%s cache:rebuild all', $console)); - $process->setTimeout(300); // 5 minutes + self::setWorkingDirectory($targetDir); + $installCmd = sprintf('%s site-install standard ' . + '--db-url=%s --account-name=%s --account-pass=%s -y', + $console, + $dbUrl, + getenv('DRUPAL_ADMIN_USERNAME'), + getenv('DRUPAL_ADMIN_PASSWORD')); + $process = self::createProcess($installCmd); + $process->setTimeout(null); self::executeProcess($process); - // install drupal dependencies - self::execute('composer install'); // this is to fix a PHP runtime bug // @TODO - FIX THIS!! self::execute('rm composer.*'); // move the code for the sample to the new drupal installation - $files = ['app.yaml', 'php.ini', 'Dockerfile', 'nginx-app.conf']; + $files = ['app.yaml', 'php.ini', 'nginx-app.conf']; foreach ($files as $file) { $source = sprintf('%s/../%s', __DIR__, $file); - $target = sprintf('%s/drupal8.test/%s', $targetDir, $file); + $target = sprintf('%s/%s', $targetDir, $file); copy($source, $target); } // if a service name has been defined, add it to "app.yaml" if ($service = self::getServiceName()) { - $appYaml = sprintf('%s/drupal8.test/app.yaml', $targetDir); - file_put_contents($appYaml, "service: $service\n", FILE_APPEND); + $appYaml = sprintf('%s/app.yaml', $targetDir); + file_put_contents($appYaml, "\nservice: $service\n", FILE_APPEND); } } @@ -187,7 +152,7 @@ public static function deploy($projectId, $versionId, $targetDir) "gcloud -q app deploy " . "--version $versionId " . "--project $projectId --no-promote -q " - . "$targetDir/drupal8.test/app.yaml" + . "$targetDir/app.yaml" ); $process->setTimeout(60 * 30); // 30 minutes if (self::executeProcess($process, false)) { diff --git a/appengine/flexible/drupal8/tests/config/install_drupal8.yml b/appengine/flexible/drupal8/tests/config/install_drupal8.yml deleted file mode 100644 index 2bc628fe79..0000000000 --- a/appengine/flexible/drupal8/tests/config/install_drupal8.yml +++ /dev/null @@ -1,22 +0,0 @@ -commands: -# Download Drupal - - command: site:new - arguments: - directory: drupal8.test - version: 8.1.0 -# Install Drupal - - command: site:install - options: - langcode: en - db-type: mysql - db-host: DRUPAL_DATABASE_HOST - db-name: DRUPAL_DATABASE_NAME - db-user: DRUPAL_DATABASE_USER - db-pass: DRUPAL_DATABASE_PASS - site-name: 'Drupal 8 on Managed VMs E2E Test' - site-mail: betterbrent@google.com - account-name: DRUPAL_ADMIN_USERNAME - account-pass: DRUPAL_ADMIN_PASSWORD - account-mail: betterbrent@google.com - arguments: - profile: standard diff --git a/pubsub/app/app.yaml b/pubsub/app/app.yaml index e9fd7704da..2d595af9ff 100644 --- a/pubsub/app/app.yaml +++ b/pubsub/app/app.yaml @@ -9,4 +9,4 @@ handlers: script: index.php env_variables: - GOOGLE_PROJECT_ID: "cloud-samples-tests-php" \ No newline at end of file + GOOGLE_PROJECT_ID: "YOUR_PROJECT_ID" \ No newline at end of file diff --git a/testing/ExecuteCommandTrait.php b/testing/ExecuteCommandTrait.php index 1fc1def9aa..d687dc8ea2 100644 --- a/testing/ExecuteCommandTrait.php +++ b/testing/ExecuteCommandTrait.php @@ -35,9 +35,12 @@ public static function setWorkingDirectory($workingDirectory) * @param $cmd * @throws \Exception */ - public static function execute($cmd) + public static function execute($cmd, $timeout = null) { $process = self::createProcess($cmd); + if ($timeout) { + $process->setTimeout($timeout); + } self::executeProcess($process); return $process->getOutput();