From b6e2ceb8f3f8b9669c13ac0e6d272d452ebbfaf3 Mon Sep 17 00:00:00 2001 From: Richard Brandon Date: Thu, 30 Jan 2020 12:45:31 -0500 Subject: [PATCH 01/90] Issue #cache - cache the composer/drupal install --- .travis.yml | 60 ++++++++++++++++++---- .travis/RoboFile.php | 118 ++++++++++++++++++++++++++++--------------- 2 files changed, 126 insertions(+), 52 deletions(-) diff --git a/.travis.yml b/.travis.yml index 842de85a4bd..eb7e4540319 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,64 +25,102 @@ env: - TRAVIS_NODE_VERSION="4" stages: + - prepare for tests - test - name: codecov if: branch = 8.x-1.x-dev jobs: include: - - script: robo job:check-coding-standards - - script: robo job:run-unit-tests - - script: robo job:check-module-circular-dependency - - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4" - - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" - - script: robo job:run-kernel-tests "cp-1,cp-2,other,cp-menu,profiles,redirect,cp-appearance,os-search" - - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" - - script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" - - script: robo job:run-functional-javascript-tests "classes,pages,publications,cp-appearance,cp-menu,profiles,cp,mailchimp,metatag,redirect" - - script: robo job:run-functional-javascript-tests "os-search" - - script: robo job:run-functional-javascript-tests "events,os,vsite,os-theme-preview,widgets,blog,faq,news,presentations" + - stage: prepare for tests + script: robo job:check-coding-standards + - stage: prepare for tests + script: robo job:check-module-circular-dependency + after_success: + - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql + - aws s3 sync ./web s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER + - stage: test + script: robo job:run-unit-tests + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + - stage: test + script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + - stage: test + script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + - stage: test + script: robo job:run-kernel-tests "cp-1,cp-2,other,cp-menu,profiles,redirect,cp-appearance,os-search" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + - stage: test + script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + - stage: test + script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + - stage: test + script: robo job:run-functional-javascript-tests "classes,pages,publications,cp-appearance,cp-menu,profiles,cp,mailchimp,metatag,redirect" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + - stage: test + script: robo job:run-functional-javascript-tests "os-search" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + - stage: test + script: robo job:run-functional-javascript-tests "events,os,vsite,os-theme-preview,widgets,blog,faq,news,presentations" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web - stage: codecov script: robo job:run-unit-tests-code-coverage + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-1" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-2" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-3" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-4" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os-theme-preview,cp-appearance,profiles" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "publications-1,redirect,vsite" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "publications-2,wysiwyg" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-1" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-2" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "other" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-menu" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os-search" + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web after_success: bash <(curl -s https://codecov.io/bash) before_install: diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 1c5202197fc..ea1932a6474 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -42,7 +42,8 @@ public function __construct() public function jobRunUnitTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); } @@ -56,7 +57,8 @@ public function jobRunUnitTests($groups = '') public function jobRunUnitTestsCodeCoverage($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDB()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); @@ -71,7 +73,8 @@ public function jobRunUnitTestsCodeCoverage($groups = '') public function jobCheckCodingStandards() { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->runCheckCodingStandards()); return $collection->run(); } @@ -85,7 +88,8 @@ public function jobCheckCodingStandards() public function jobCheckModuleCircularDependency() { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->installDrupal()); $collection->addTaskList($this->runCheckModuleCircularDependency()); return $collection->run(); @@ -100,8 +104,8 @@ public function jobCheckModuleCircularDependency() public function jobRunKernelTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDB()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); @@ -116,8 +120,8 @@ public function jobRunKernelTests($groups = '') public function jobRunKernelTestsCodeCoverage($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDB()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runKernelTests($groups)); @@ -135,8 +139,8 @@ public function jobRunKernelTestsCodeCoverage($groups = '') public function jobRunFunctionalTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDB()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalTests($groups)); return $collection->run(); @@ -153,8 +157,8 @@ public function jobRunFunctionalTests($groups = '') public function jobRunFunctionalJavascriptTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDB()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); return $collection->run(); @@ -170,7 +174,8 @@ public function jobRunBehatTests() { $collection = $this->collectionBuilder(); $collection->addTaskList($this->downloadDatabase()); - $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDB()); $collection->addTask($this->waitForDrupal()); $collection->addTaskList($this->runUpdatePath()); $collection->addTaskList($this->runBehatTests()); @@ -198,35 +203,66 @@ protected function downloadDatabase() return $tasks; } - /** - * Builds the Docker environment. - * - * @return \Robo\Task\Base\Exec[] - * An array of tasks. - */ - protected function buildEnvironment() - { - $force = true; - $tasks = []; - $tasks[] = $this->taskFilesystemStack() - ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force) - ->copy('.travis/traefik.yml', 'traefik.yml', $force) - ->copy('.travis/.env', '.env', $force) - ->copy('.travis/config/behat.yml', 'tests/behat.yml', $force); - - $tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env'); - $tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env'); - $tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env'); - $tasks[] = $this->taskExec('docker-compose --verbose pull --parallel'); - $tasks[] = $this->taskExec('docker-compose up -d'); - $tasks[] = $this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo'); - $tasks[] = $this->taskExec('make'); - $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml'); - $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php'); - $tasks[] = $this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest'); + /** + * Creates the Docker environment. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function buildDocker() + { + $force = true; + $tasks = []; + $tasks[] = $this->taskFilesystemStack() + ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force) + ->copy('.travis/traefik.yml', 'traefik.yml', $force) + ->copy('.travis/.env', '.env', $force) + ->copy('.travis/config/behat.yml', 'tests/behat.yml', $force); + + $tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env'); + $tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env'); + $tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env'); + $tasks[] = $this->taskExec('docker-compose --verbose pull --parallel'); + $tasks[] = $this->taskExec('docker-compose up -d'); + + return $tasks; + } - return $tasks; - } + /** + * Imports the datbase. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function importDB() + { + $force = true; + $tasks = []; + + $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); + + return $tasks; + } + + /** + * Builds the Code Base. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function buildComposer() + { + $force = true; + $tasks = []; + + $tasks[] = $this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo'); + $tasks[] = $this->taskExec('make'); + $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml'); + $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php'); + $tasks[] = $this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest'); + + return $tasks; + } /** * Enables xdebug in the Docker environment. From b914a9f52a91e0ec8aa41acf13da8760a3c3b0bc Mon Sep 17 00:00:00 2001 From: Richard Brandon Date: Thu, 30 Jan 2020 12:54:30 -0500 Subject: [PATCH 02/90] Issue #cache - sync everything --- .travis.yml | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb7e4540319..bb45c981246 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,89 +38,89 @@ jobs: script: robo job:check-module-circular-dependency after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - - aws s3 sync ./web s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER + - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test script: robo job:run-unit-tests - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: test script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: test script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: test script: robo job:run-kernel-tests "cp-1,cp-2,other,cp-menu,profiles,redirect,cp-appearance,os-search" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: test script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: test script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: test script: robo job:run-functional-javascript-tests "classes,pages,publications,cp-appearance,cp-menu,profiles,cp,mailchimp,metatag,redirect" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: test script: robo job:run-functional-javascript-tests "os-search" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: test script: robo job:run-functional-javascript-tests "events,os,vsite,os-theme-preview,widgets,blog,faq,news,presentations" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - stage: codecov script: robo job:run-unit-tests-code-coverage - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-1" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-2" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-3" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-4" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os-theme-preview,cp-appearance,profiles" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "publications-1,redirect,vsite" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "publications-2,wysiwyg" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-1" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-2" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "other" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-menu" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os-search" - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER ./web + before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . after_success: bash <(curl -s https://codecov.io/bash) before_install: From 73eae01ba5233c378643a989f1fd33a1e0742e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 16:37:07 +0100 Subject: [PATCH 03/90] Issue #12947 - Remove tests for debug reason --- .travis.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 369225dc76a..e1daa2708b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,15 +42,15 @@ jobs: - stage: test script: robo job:run-unit-tests before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" - - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" - - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" - - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" - - script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" - - script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance" - - script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" - - script: robo job:run-functional-javascript-tests "events,vsite,widgets" - - script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" +# - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" +# - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" +# - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" +# - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" +# - script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" +# - script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance" +# - script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" +# - script: robo job:run-functional-javascript-tests "events,vsite,widgets" +# - script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" - stage: codecov script: robo job:run-unit-tests-code-coverage after_success: bash <(curl -s https://codecov.io/bash) From cdc10b14c6bb6a596c6f215df00b2712bca6c3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 19:49:44 +0100 Subject: [PATCH 04/90] Issue #12947 - Install awscli in travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e1daa2708b9..6a1b57928d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -105,6 +105,7 @@ jobs: before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - pip install awscli install: - composer global require consolidation/robo From b8c763adc36a2dbee31061fcb3b85ac5ea6b344e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 20:01:17 +0100 Subject: [PATCH 05/90] Issue #12947 - Fix Install awscli in travis --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a1b57928d6..a2a26af7559 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,8 +32,8 @@ stages: jobs: include: - - stage: prepare for tests - script: robo job:check-coding-standards +# - stage: prepare for tests +# script: robo job:check-coding-standards - stage: prepare for tests script: robo job:check-module-circular-dependency after_success: @@ -105,6 +105,8 @@ jobs: before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - pyenv global 3.7.1 + - pip install -U pip - pip install awscli install: From 75f617479136d0da65e5436994b492bb290c2547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 20:07:20 +0100 Subject: [PATCH 06/90] Issue #12947 - Install pyenv --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a2a26af7559..607b7dc0e08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -105,7 +105,7 @@ jobs: before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - pyenv global 3.7.1 + - pyenv install 3.7.1 - pip install -U pip - pip install awscli From 2718e9bfa0f3984f04a4fdbb7385fa7e4a8aae3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 20:10:18 +0100 Subject: [PATCH 07/90] Issue #12947 - Upgrade dist --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 607b7dc0e08..dc4a8c044d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: trusty +dist: xenial cache: directories: @@ -105,7 +105,7 @@ jobs: before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - pyenv install 3.7.1 + - pyenv global 3.7.1 - pip install -U pip - pip install awscli From 8abcedd1d06570a5527f7fc5923970ad4524b7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 20:27:52 +0100 Subject: [PATCH 08/90] Issue #12947 - Debug travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index dc4a8c044d2..07c1327c0ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,8 @@ jobs: script: robo job:check-module-circular-dependency after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql + - la -la + - aws configure list - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test script: robo job:run-unit-tests From 757b932f64b1d965d47d00b8cc69703145d12528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 20:29:10 +0100 Subject: [PATCH 09/90] Issue #12947 - fix before install (wip) --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 07c1327c0ba..743f13f6382 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,12 @@ jobs: - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test script: robo job:run-unit-tests - before_install: aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . + before_install: + - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - pyenv global 3.7.1 + - pip install -U pip + - pip install awscli + - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . # - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" From 99f8dbd69955ccdca0c0a0b46a73562fcdc1aa88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 20:42:38 +0100 Subject: [PATCH 10/90] Issue #12947 - fix aws credential (wip) --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 743f13f6382..7d9d4259948 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,8 @@ env: - DRUPAL_BASE_URL="http://127.0.0.1:8080" - PATH="$PATH:$HOME/.composer/vendor/bin" - TRAVIS_NODE_VERSION="4" + - AWS_ACCESS_KEY_ID=$ARTIFACTS_KEY + - AWS_SECRET_ACCESS_KEY=$ARTIFACTS_SECRET stages: - prepare for tests @@ -38,7 +40,7 @@ jobs: script: robo job:check-module-circular-dependency after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - - la -la + - ls -la - aws configure list - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test From 866501ce5782c7771e3681e87da49d5b461c40e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 20:57:43 +0100 Subject: [PATCH 11/90] Issue #12947 - delete node_modules --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7d9d4259948..e941e4fd931 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,8 +40,8 @@ jobs: script: robo job:check-module-circular-dependency after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql + - rm -rf node_modules - ls -la - - aws configure list - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test script: robo job:run-unit-tests From 487d4579b309ef093b6038da66f97bf14db2451d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 21:29:18 +0100 Subject: [PATCH 12/90] Issue #12947 - delete node_modules 2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e941e4fd931..d45fc36e29b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ jobs: script: robo job:check-module-circular-dependency after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - - rm -rf node_modules + - docker-compose exec -T php rm -rf node_modules - ls -la - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test From aeef14e98529a6f351c80d1f5dde643abc4d8d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 21:47:13 +0100 Subject: [PATCH 13/90] Issue #12947 - Debug travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d45fc36e29b..3ac7809a69f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,8 @@ jobs: script: robo job:check-module-circular-dependency after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - - docker-compose exec -T php rm -rf node_modules + - docker-compose exec -T php sudo rm -rf node_modules + - sudo rm -rf node_modules - ls -la - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test From 63e9ca514b11c6e508d26c6e4ed31046cfe8e3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 22:06:01 +0100 Subject: [PATCH 14/90] Issue #12947 - Try tar and upload --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3ac7809a69f..b206d4b48cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,10 +40,9 @@ jobs: script: robo job:check-module-circular-dependency after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - - docker-compose exec -T php sudo rm -rf node_modules - sudo rm -rf node_modules - - ls -la - - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER + - tar -czf /tmp/os-build.tar.gz . + - aws s3 sync /tmp/os-build.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test script: robo job:run-unit-tests before_install: From 8aa7717ca7b83986764f59104e4e79123177cfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 22:20:43 +0100 Subject: [PATCH 15/90] Issue #12947 - Try tar and upload 2 --- .travis.yml | 4 ++-- .travis/RoboFile.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b206d4b48cb..511251dde56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,8 @@ jobs: after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - sudo rm -rf node_modules - - tar -czf /tmp/os-build.tar.gz . - - aws s3 sync /tmp/os-build.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER + - tar -czf ../os-build.tar.gz . + - aws s3 sync ../os-build.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test script: robo job:run-unit-tests before_install: diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index ea1932a6474..237b6a488fc 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -90,7 +90,7 @@ public function jobCheckModuleCircularDependency() $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildComposer()); - $collection->addTaskList($this->installDrupal()); + //$collection->addTaskList($this->installDrupal()); $collection->addTaskList($this->runCheckModuleCircularDependency()); return $collection->run(); } From 8ff64aa061c3aab1dc055c0676797d3e6dfdb086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 22:26:08 +0100 Subject: [PATCH 16/90] Issue #12947 - Debug travis --- .travis/RoboFile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 237b6a488fc..14f32526111 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -43,7 +43,7 @@ public function jobRunUnitTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->buildComposer()); + //$collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); } @@ -91,7 +91,7 @@ public function jobCheckModuleCircularDependency() $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildComposer()); //$collection->addTaskList($this->installDrupal()); - $collection->addTaskList($this->runCheckModuleCircularDependency()); + //$collection->addTaskList($this->runCheckModuleCircularDependency()); return $collection->run(); } From bb605507a9ac313caaf13fa782e1c0b69edb9661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 22:37:44 +0100 Subject: [PATCH 17/90] Issue #12947 - Debug travis --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 511251dde56..1bdd4692974 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,8 +41,10 @@ jobs: after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - sudo rm -rf node_modules - - tar -czf ../os-build.tar.gz . - - aws s3 sync ../os-build.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER + - tar -czf os-build-web.tar.gz web + - tar -czf os-build-vendor.tar.gz vendor + - aws s3 sync os-build-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER + - aws s3 sync os-build-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - stage: test script: robo job:run-unit-tests before_install: From acfddbca49493c007404558d9adf781e5323bb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 17 Feb 2020 22:49:16 +0100 Subject: [PATCH 18/90] Issue #12947 - Debug travis --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1bdd4692974..3bb0e38b7d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,10 +41,7 @@ jobs: after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - sudo rm -rf node_modules - - tar -czf os-build-web.tar.gz web - - tar -czf os-build-vendor.tar.gz vendor - - aws s3 sync os-build-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER - - aws s3 sync os-build-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER + - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER --quiet - stage: test script: robo job:run-unit-tests before_install: From e3478cbfa2983fb4a8aed3cb152a8355e4cd825d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 09:13:13 +0100 Subject: [PATCH 19/90] Issue #12947 - Debug travis --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3bb0e38b7d9..8f804a13eaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,6 +41,8 @@ jobs: after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - sudo rm -rf node_modules + - echo ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz + - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz . - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER --quiet - stage: test script: robo job:run-unit-tests @@ -49,7 +51,7 @@ jobs: - pyenv global 3.7.1 - pip install -U pip - pip install awscli - - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . + - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . --quiet # - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" From 4d1072ecf90ab768106abfc0e0cb005fe75008f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 09:43:16 +0100 Subject: [PATCH 20/90] Issue #12947 - Upload only tar file --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8f804a13eaa..c4e5c960f1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,8 @@ jobs: - sudo rm -rf node_modules - echo ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz . - - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER --quiet + - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER +# - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/build --quiet - stage: test script: robo job:run-unit-tests before_install: From 4edeeaefa2e9d9c66a56a12a6ef282851755a98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 10:09:55 +0100 Subject: [PATCH 21/90] Issue #12947 - Debug travis --- .travis.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c4e5c960f1d..5fe4b7a78cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,9 +42,8 @@ jobs: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - sudo rm -rf node_modules - echo ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz - - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz . - - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER -# - aws s3 sync . s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/build --quiet + - tar -zcf ${TRAVIS_BUILD_DIR}/os-build-${TRAVIS_BUILD_NUMBER}.tar.gz . + - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}.tar.gz - stage: test script: robo job:run-unit-tests before_install: @@ -52,7 +51,11 @@ jobs: - pyenv global 3.7.1 - pip install -U pip - pip install awscli - - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . --quiet + - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . + - ls -la + - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}.tar.gz + - ls -la + - chmod +x vendor/bin/phpunit # - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" From 3a0479459b07d6cb895aafa64076e3d229aa6c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 10:17:00 +0100 Subject: [PATCH 22/90] Issue #12947 - Fix path --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5fe4b7a78cc..12f4d4a71bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ jobs: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - sudo rm -rf node_modules - echo ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz - - tar -zcf ${TRAVIS_BUILD_DIR}/os-build-${TRAVIS_BUILD_NUMBER}.tar.gz . + - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz . - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}.tar.gz - stage: test script: robo job:run-unit-tests From 68ab2684f515df47f0b2bc24b28f11242079e20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 10:40:57 +0100 Subject: [PATCH 23/90] Issue #12947 - Try to minimalize tar.gz --- .travis.yml | 9 ++++++++- .travis/RoboFile.php | 5 ++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 12f4d4a71bf..99dd2e1c932 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,12 @@ jobs: - sudo rm -rf node_modules - echo ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz . + - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz web + - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz vendor + - ls -la - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}.tar.gz + - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz + - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz - stage: test script: robo job:run-unit-tests before_install: @@ -53,7 +58,9 @@ jobs: - pip install awscli - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - ls -la - - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}.tar.gz + - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz + - ls -la + - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz - ls -la - chmod +x vendor/bin/phpunit # - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 14f32526111..699dbd9359e 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -43,7 +43,6 @@ public function jobRunUnitTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); - //$collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); } @@ -90,8 +89,8 @@ public function jobCheckModuleCircularDependency() $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildComposer()); - //$collection->addTaskList($this->installDrupal()); - //$collection->addTaskList($this->runCheckModuleCircularDependency()); + $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->runCheckModuleCircularDependency()); return $collection->run(); } From b00a64ed7deb92c547526033ea2b7aa321899d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 11:10:37 +0100 Subject: [PATCH 24/90] Issue #12947 - Enable more test and try xz tar --- .travis.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99dd2e1c932..695379b78da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,11 +42,11 @@ jobs: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - sudo rm -rf node_modules - echo ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz - - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz . - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz web - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz vendor + - tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web + - tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor - ls -la - - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}.tar.gz - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz - stage: test @@ -63,7 +63,17 @@ jobs: - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz - ls -la - chmod +x vendor/bin/phpunit -# - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" + - stage: test + script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" + before_install: + - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini + - pyenv global 3.7.1 + - pip install -U pip + - pip install awscli + - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . + - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz + - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz + - chmod +x vendor/bin/phpunit # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" # - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" From a6fa4947d6fe6b75e2f0eb9ea919b76d4d23c25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 11:36:40 +0100 Subject: [PATCH 25/90] Issue #12947 - Upload xz and extend permissions --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 695379b78da..d2f6d1ceb84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,6 +49,8 @@ jobs: - ls -la - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz + - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz + - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xzvbn - stage: test script: robo job:run-unit-tests before_install: @@ -74,6 +76,9 @@ jobs: - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz - chmod +x vendor/bin/phpunit + - sudo chmod 755 web/modules/test + - sudo chmod 777 web/sites/default/files + - sudo chmod 777 web/sites/default/simpletest # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" # - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" From a71a700f09faf25fb94519c24d1279bc10ea453d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 12:03:35 +0100 Subject: [PATCH 26/90] Issue #12947 - Fix path and dir --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d2f6d1ceb84..d71f80f747c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,8 +49,8 @@ jobs: - ls -la - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz - - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xzvbn + - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz + - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - stage: test script: robo job:run-unit-tests before_install: @@ -76,7 +76,7 @@ jobs: - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz - chmod +x vendor/bin/phpunit - - sudo chmod 755 web/modules/test + - sudo chmod 777 web/modules - sudo chmod 777 web/sites/default/files - sudo chmod 777 web/sites/default/simpletest # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" From 99e38acdf7d4cb4dda5643ff759d5ae3d7e3d56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 12:20:25 +0100 Subject: [PATCH 27/90] Issue #12947 - Replace zip to LZMA --- .travis.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index d71f80f747c..2ce518d6b50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,15 +40,8 @@ jobs: script: robo job:check-module-circular-dependency after_success: - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - - sudo rm -rf node_modules - - echo ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}.tar.gz - - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz web - - tar -zcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz vendor - tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web - tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor - - ls -la - - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz - - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - stage: test @@ -60,9 +53,9 @@ jobs: - pip install awscli - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - ls -la - - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz + - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - ls -la - - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz + - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - ls -la - chmod +x vendor/bin/phpunit - stage: test @@ -73,8 +66,8 @@ jobs: - pip install -U pip - pip install awscli - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.gz - - tar -zxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.gz + - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz + - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - chmod +x vendor/bin/phpunit - sudo chmod 777 web/modules - sudo chmod 777 web/sites/default/files From 2038ec115dc4c4f51535bd1292713449ecb38ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 12:24:00 +0100 Subject: [PATCH 28/90] Issue #12947 - Fix path --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2ce518d6b50..e4f479e80e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,7 @@ jobs: - chmod +x vendor/bin/phpunit - sudo chmod 777 web/modules - sudo chmod 777 web/sites/default/files - - sudo chmod 777 web/sites/default/simpletest + - sudo chmod 777 web/sites/simpletest # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" # - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" From cb0f6524631a0f4911fb4a7b5c52d1f1d8118721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 13:38:05 +0100 Subject: [PATCH 29/90] Issue #12947 - Debug sql file --- .travis.yml | 2 ++ .travis/RoboFile.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e4f479e80e4..c5c003f78e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,6 +72,8 @@ jobs: - sudo chmod 777 web/modules - sudo chmod 777 web/sites/default/files - sudo chmod 777 web/sites/simpletest + - ls -la web + - sudo chmod 777 web/travis-backup.sql # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" # - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 699dbd9359e..c9f89ae9de3 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -228,7 +228,7 @@ protected function buildDocker() } /** - * Imports the datbase. + * Imports the database. * * @return \Robo\Task\Base\Exec[] * An array of tasks. From 3e90b3f746b439c0250b3da6961900678936e7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 13:56:45 +0100 Subject: [PATCH 30/90] Issue #12947 - Fix chrome name in travis --- .travis/docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/docker-compose.yml b/.travis/docker-compose.yml index d8ff40527a5..adf9b609276 100644 --- a/.travis/docker-compose.yml +++ b/.travis/docker-compose.yml @@ -93,5 +93,6 @@ services: chrome: # Note: chrome 67/68 is giving errors so we pin to 65 for now. image: previousnext/chrome-headless:65 + container_name: "${PROJECT_NAME}_chrome" ports: - "9222:9222" From 765bf1cba994dcbfcc342e7feb852e0e15974404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 14:29:20 +0100 Subject: [PATCH 31/90] Issue #12947 - Try to speed up compression and remove chmod --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c5c003f78e3..9e50154c0dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,6 +53,8 @@ jobs: - pip install awscli - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - ls -la + # Try to speed up compression. + - export XZ_OPT="-T0" - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - ls -la - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz @@ -73,7 +75,6 @@ jobs: - sudo chmod 777 web/sites/default/files - sudo chmod 777 web/sites/simpletest - ls -la web - - sudo chmod 777 web/travis-backup.sql # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" # - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" From 510c405b676485e156488e489acd80458a856f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 16:35:46 +0100 Subject: [PATCH 32/90] Issue #12947 - Debug sql file in double place --- .travis.yml | 1 + .travis/RoboFile.php | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9e50154c0dc..0a30b988f87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -148,4 +148,5 @@ before_script: - cp .travis/RoboFile.php . after_failure: + - docker-compose logs mariadb - artifacts upload diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index c9f89ae9de3..ef38d50eb26 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -239,6 +239,7 @@ protected function importDB() $tasks = []; $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); + $tasks[] = $this->taskExec('docker-compose logs mariadb'); return $tasks; } From 7c4c2a9ef1e8818d4b251bd55fef8b0c9526e7f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 19:56:41 +0100 Subject: [PATCH 33/90] Issue #12947 - Disable cache --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0a30b988f87..1dfcd16a8ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: php dist: xenial -cache: - directories: - - $HOME/.composer/cache/files - +#cache: +# directories: +# - $HOME/.composer/cache/files +# addons: artifacts: s3_region: $ARTIFACTS_S3_REGION From 335e414a7539767a3cb00f799bcf72d642fb6d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 20:00:01 +0100 Subject: [PATCH 34/90] Issue #12947 - Fix version consolidation/robo:2.0.0 --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1dfcd16a8ed..95d2885df60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: php dist: xenial -#cache: -# directories: -# - $HOME/.composer/cache/files -# +cache: + directories: + - $HOME/.composer/cache/files + addons: artifacts: s3_region: $ARTIFACTS_S3_REGION @@ -142,7 +142,7 @@ before_install: - pip install awscli install: - - composer global require consolidation/robo + - composer global require consolidation/robo:2.0.0 before_script: - cp .travis/RoboFile.php . From 82570c9e724dbda5ab92bb18192433dd0b953256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 18 Feb 2020 20:16:18 +0100 Subject: [PATCH 35/90] Issue #12947 - Print all logs --- .travis.yml | 2 +- .travis/RoboFile.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 95d2885df60..281d8762bb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -148,5 +148,5 @@ before_script: - cp .travis/RoboFile.php . after_failure: - - docker-compose logs mariadb + - docker-compose logs - artifacts upload diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index ef38d50eb26..c9f89ae9de3 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -239,7 +239,6 @@ protected function importDB() $tasks = []; $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); - $tasks[] = $this->taskExec('docker-compose logs mariadb'); return $tasks; } From 4c92a41db9d26d3a3def7bd7cc2a8c716e2496a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 19 Feb 2020 13:47:41 +0100 Subject: [PATCH 36/90] Issue #12947 - Test created SQL in same job --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 281d8762bb9..a4cd9d9466f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,7 @@ jobs: - tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz + - docker-compose exec -T php drush sqlq --file=./travis-backup.sql - stage: test script: robo job:run-unit-tests before_install: From 94ebbea8313d1990517befb3c2bbe93bd6e3fb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 10:35:58 +0100 Subject: [PATCH 37/90] Issue #12947 - Debug composer install check --- .travis/RoboFile.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index c9f89ae9de3..b85414d3ba1 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -238,6 +238,7 @@ protected function importDB() $force = true; $tasks = []; + $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); return $tasks; From b37e8f7b46895a873f8cb90812fd69bcd38b448f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 11:08:41 +0100 Subject: [PATCH 38/90] Issue #12947 - Debug check permission problem --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c8d5b343a89..8b5bbe91700 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,9 +72,9 @@ jobs: - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - chmod +x vendor/bin/phpunit - - sudo chmod 777 web/modules - - sudo chmod 777 web/sites/default/files - - sudo chmod 777 web/sites/simpletest + - sudo chmod 777 -R web + - sudo chmod 777 -R vendor + - ls -la - ls -la web # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" From 5aa3cb9d9010127c04114dc207469a15ee86ba5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 11:25:52 +0100 Subject: [PATCH 39/90] Issue #12947 - Debug keep only permission extra, remove composer install --- .travis/RoboFile.php | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index b85414d3ba1..c9f89ae9de3 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -238,7 +238,6 @@ protected function importDB() $force = true; $tasks = []; - $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); return $tasks; From 2a20a3830640914c4689c98184a6dd5d1f7d5cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 11:27:41 +0100 Subject: [PATCH 40/90] Issue #12947 - Debug add less permission --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b5bbe91700..f8c1c19342f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,8 +72,8 @@ jobs: - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - chmod +x vendor/bin/phpunit - - sudo chmod 777 -R web - - sudo chmod 777 -R vendor + - sudo chmod 755 -R web + - sudo chmod 755 -R vendor - ls -la - ls -la web # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" From 31b996baac51a5adf79715f6a9f9a5ccaf0cba71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 12:24:36 +0100 Subject: [PATCH 41/90] Issue #12947 - Debug add more permission --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f8c1c19342f..8b5bbe91700 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,8 +72,8 @@ jobs: - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - chmod +x vendor/bin/phpunit - - sudo chmod 755 -R web - - sudo chmod 755 -R vendor + - sudo chmod 777 -R web + - sudo chmod 777 -R vendor - ls -la - ls -la web # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" From 32e8aea003abde203ee64856542e1152cae298a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 12:24:57 +0100 Subject: [PATCH 42/90] Issue #12947 - Include test configs into build --- .travis/RoboFile.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index c9f89ae9de3..8ebd7a52bdd 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -91,6 +91,7 @@ public function jobCheckModuleCircularDependency() $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->installDrupal()); $collection->addTaskList($this->runCheckModuleCircularDependency()); + $collection->addTaskList($this->installTestConfigs()); return $collection->run(); } @@ -105,7 +106,6 @@ public function jobRunKernelTests($groups = '') $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->importDB()); - $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); } @@ -121,7 +121,6 @@ public function jobRunKernelTestsCodeCoverage($groups = '') $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->importDB()); - $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); @@ -140,7 +139,6 @@ public function jobRunFunctionalTests($groups = '') $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->importDB()); - $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalTests($groups)); return $collection->run(); } @@ -158,7 +156,6 @@ public function jobRunFunctionalJavascriptTests($groups = '') $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->importDB()); - $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); return $collection->run(); } From 5ed6edb242d95538772f90c1193e46460c669f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 12:49:44 +0100 Subject: [PATCH 43/90] Issue #12947 - Move lines to Robo --- .travis.yml | 24 +++--------------------- .travis/RoboFile.php | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b5bbe91700..60ebd354059 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,12 +39,7 @@ jobs: - stage: prepare for tests script: robo job:check-module-circular-dependency after_success: - - docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql - - tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web - - tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor - - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - - aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - - docker-compose exec -T php drush sqlq --file=./travis-backup.sql + - robo job:upload-to-aws - stage: test script: robo job:run-unit-tests before_install: @@ -52,15 +47,7 @@ jobs: - pyenv global 3.7.1 - pip install -U pip - pip install awscli - - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - - ls -la - # Try to speed up compression. - - export XZ_OPT="-T0" - - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - - ls -la - - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - - ls -la - - chmod +x vendor/bin/phpunit + - robo job:extract-from-aws - stage: test script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" before_install: @@ -68,12 +55,7 @@ jobs: - pyenv global 3.7.1 - pip install -U pip - pip install awscli - - aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER . - - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz - - tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz - - chmod +x vendor/bin/phpunit - - sudo chmod 777 -R web - - sudo chmod 777 -R vendor + - robo job:extract-from-aws - ls -la - ls -la web # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 8ebd7a52bdd..734749f7c0e 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -240,6 +240,42 @@ protected function importDB() return $tasks; } + /** + * Create sql dump and compressed build and upload to S3. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function uploadToAws() + { + $tasks = []; + $tasks[] = $this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); + + return $tasks; + } + /** + * Extract from S3. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function extractFromAws() + { + $tasks = []; + $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); + $tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); + $tasks[] = $this->taskExec('sudo chmod 777 -R web'); + $tasks[] = $this->taskExec('sudo chmod 777 -R vendor'); + + return $tasks; + } + /** * Builds the Code Base. * From 0d5645b6576840bc878e42c30c6767fbb279240b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 12:50:29 +0100 Subject: [PATCH 44/90] Issue #12947 - Add composer install again --- .travis/RoboFile.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 734749f7c0e..c7f4aa21b59 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -272,6 +272,7 @@ protected function extractFromAws() $tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); $tasks[] = $this->taskExec('sudo chmod 777 -R web'); $tasks[] = $this->taskExec('sudo chmod 777 -R vendor'); + $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); return $tasks; } From 18bcc562814095e5d1af955ef94b3b09b58ed0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 12:52:39 +0100 Subject: [PATCH 45/90] Issue #12947 - Fix composer install place --- .travis/RoboFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index c7f4aa21b59..87b92eb1998 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -235,6 +235,7 @@ protected function importDB() $force = true; $tasks = []; + $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); return $tasks; @@ -272,7 +273,6 @@ protected function extractFromAws() $tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); $tasks[] = $this->taskExec('sudo chmod 777 -R web'); $tasks[] = $this->taskExec('sudo chmod 777 -R vendor'); - $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); return $tasks; } From 7731986f104e006332ada6b64849accbf9131ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 13:39:21 +0100 Subject: [PATCH 46/90] Issue #12947 - Fix Robo function and refactor return object --- .travis/RoboFile.php | 49 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 87b92eb1998..9191840ada1 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -244,37 +244,37 @@ protected function importDB() /** * Create sql dump and compressed build and upload to S3. * - * @return \Robo\Task\Base\Exec[] - * An array of tasks. + * @return \Robo\Collection\CollectionBuilder + * A collection of tasks. */ - protected function uploadToAws() + public function jobUploadToAws() { - $tasks = []; - $tasks[] = $this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql'); - $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web'); - $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor'); - $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); - $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); - - return $tasks; + return $this + ->collectionBuilder() + ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) + ; } /** - * Extract from S3. + * Extract from S3 and fix permissions. * - * @return \Robo\Task\Base\Exec[] - * An array of tasks. + * @return \Robo\Collection\CollectionBuilder + * A collection of tasks. */ - protected function extractFromAws() + public function jobExtractFromAws() { - $tasks = []; - $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); - $tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); - $tasks[] = $this->taskExec('sudo chmod 777 -R web'); - $tasks[] = $this->taskExec('sudo chmod 777 -R vendor'); - - return $tasks; + return $this + ->collectionBuilder() + ->addTask($this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .')) + ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) + ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) + ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) + ->addTask($this->taskExec('sudo chmod 777 -R web')) + ->addTask($this->taskExec('sudo chmod 777 -R vendor')) + ; } /** @@ -308,7 +308,6 @@ protected function enableXDebug() $tasks[] = $this->taskExecStack() ->exec('echo PHP_XDEBUG_ENABLED=1 >> .env') ->exec('docker-compose up -d'); - return $tasks; } From b68924bffb11ae76bd22590deb8b4d23f68e54d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 14:11:51 +0100 Subject: [PATCH 47/90] Issue #12947 - Fix Robo order --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60ebd354059..1c62287fcc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,15 +49,16 @@ jobs: - pip install awscli - robo job:extract-from-aws - stage: test - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" + script: + - robo job:extract-from-aws + - ls -la + - ls -la web + - robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - pyenv global 3.7.1 - pip install -U pip - pip install awscli - - robo job:extract-from-aws - - ls -la - - ls -la web # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" # - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" From 080a0e9da0e6f94c516bdaa8ed3d4219488bfc76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 14:36:56 +0100 Subject: [PATCH 48/90] Issue #12947 - Fix Robo order 2 --- .travis.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1c62287fcc8..40b7a6c238c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,24 +41,15 @@ jobs: after_success: - robo job:upload-to-aws - stage: test - script: robo job:run-unit-tests - before_install: - - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - pyenv global 3.7.1 - - pip install -U pip - - pip install awscli + script: - robo job:extract-from-aws + - robo job:run-unit-tests - stage: test script: - robo job:extract-from-aws - ls -la - ls -la web - robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" - before_install: - - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - pyenv global 3.7.1 - - pip install -U pip - - pip install awscli # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" # - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" From a8cf40521c5a2d2be5c8ce1abf2f929ce8d7e0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 14:39:50 +0100 Subject: [PATCH 49/90] Issue #12947 - Enable coding standards --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 40b7a6c238c..b7a5913fb49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,8 @@ stages: jobs: include: -# - stage: prepare for tests -# script: robo job:check-coding-standards + - stage: prepare for tests + script: robo job:check-coding-standards - stage: prepare for tests script: robo job:check-module-circular-dependency after_success: @@ -47,8 +47,6 @@ jobs: - stage: test script: - robo job:extract-from-aws - - ls -la - - ls -la web - robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" # - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" From f7c801bfb268920c6936a22994d2fc0ca3583df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 14:40:04 +0100 Subject: [PATCH 50/90] Issue #12947 - Cache more --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b7a5913fb49..acf22945acc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ dist: xenial cache: directories: - - $HOME/.composer/cache/files + - $HOME/.composer/cache addons: artifacts: From b27bcd9d7008ecb008597cb6f829f74f793bb043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 14:42:29 +0100 Subject: [PATCH 51/90] Issue #12947 - Extra comments --- .travis/RoboFile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 9191840ada1..10ba48ba942 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -235,7 +235,9 @@ protected function importDB() $force = true; $tasks = []; + // Fix import issue. $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); + // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); return $tasks; From 8612023c4ee7e0d4aa15225659b2f337c2986805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 15:53:56 +0100 Subject: [PATCH 52/90] Issue #12947 - Debug files --- .travis/RoboFile.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 10ba48ba942..031c2b44de0 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -254,6 +254,8 @@ public function jobUploadToAws() return $this ->collectionBuilder() ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) + ->addTask($this->taskExec('ls -la')) + ->addTask($this->taskExec('ls -la web')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) @@ -274,6 +276,8 @@ public function jobExtractFromAws() ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) + ->addTask($this->taskExec('ls -la')) + ->addTask($this->taskExec('ls -la web')) ->addTask($this->taskExec('sudo chmod 777 -R web')) ->addTask($this->taskExec('sudo chmod 777 -R vendor')) ; From 98b6575d497b7aff9e871859d789f89e302031ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 15:56:47 +0100 Subject: [PATCH 53/90] Issue #12947 - Debug files --- .travis/RoboFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 031c2b44de0..93d8202b5e9 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -275,9 +275,9 @@ public function jobExtractFromAws() ->addTask($this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) - ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) ->addTask($this->taskExec('ls -la')) ->addTask($this->taskExec('ls -la web')) + ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) ->addTask($this->taskExec('sudo chmod 777 -R web')) ->addTask($this->taskExec('sudo chmod 777 -R vendor')) ; From f573f7b4c5ef0505f0451b6992851818f863f70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 16:27:42 +0100 Subject: [PATCH 54/90] Issue #12947 - Debug, change chown --- .travis.yml | 4 ++-- .travis/RoboFile.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index acf22945acc..a5c6d6865d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,8 +34,8 @@ stages: jobs: include: - - stage: prepare for tests - script: robo job:check-coding-standards +# - stage: prepare for tests +# script: robo job:check-coding-standards - stage: prepare for tests script: robo job:check-module-circular-dependency after_success: diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 93d8202b5e9..3139f1eb7e7 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -278,8 +278,8 @@ public function jobExtractFromAws() ->addTask($this->taskExec('ls -la')) ->addTask($this->taskExec('ls -la web')) ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) - ->addTask($this->taskExec('sudo chmod 777 -R web')) - ->addTask($this->taskExec('sudo chmod 777 -R vendor')) + ->addTask($this->taskExec('sudo chown -R 1000:1000 web')) + ->addTask($this->taskExec('sudo chown -R 1000:1000 -R vendor')) ; } From 61d7e75df38ff96ebfb7afa260b10e60e1750061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 16:56:50 +0100 Subject: [PATCH 55/90] Issue #12947 - Debug files --- .travis/RoboFile.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 3139f1eb7e7..b49179f0903 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -254,7 +254,7 @@ public function jobUploadToAws() return $this ->collectionBuilder() ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) - ->addTask($this->taskExec('ls -la')) + ->addTask($this->taskExec('ls -la vendor')) ->addTask($this->taskExec('ls -la web')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) @@ -275,11 +275,13 @@ public function jobExtractFromAws() ->addTask($this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) - ->addTask($this->taskExec('ls -la')) + ->addTask($this->taskExec('ls -la vendor')) ->addTask($this->taskExec('ls -la web')) ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) ->addTask($this->taskExec('sudo chown -R 1000:1000 web')) - ->addTask($this->taskExec('sudo chown -R 1000:1000 -R vendor')) + ->addTask($this->taskExec('sudo chown -R 1000:1000 vendor')) + ->addTask($this->taskExec('ls -la vendor')) + ->addTask($this->taskExec('ls -la web')) ; } From 6b339ee4cc04111022f585740a3e93ee48051877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 17:05:14 +0100 Subject: [PATCH 56/90] Issue #12947 - refactor --- .travis/RoboFile.php | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index b49179f0903..e9d268fe80f 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -227,20 +227,18 @@ protected function buildDocker() /** * Imports the database. * - * @return \Robo\Task\Base\Exec[] - * An array of tasks. + * @return \Robo\Collection\CollectionBuilder + * A collection of tasks. */ protected function importDB() { - $force = true; - $tasks = []; - - // Fix import issue. - $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); - // Import sql. - $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); - - return $tasks; + return $this + ->collectionBuilder() + // Fix import issue. + ->addTask($this->taskExec('docker-compose exec -T php composer install')) + // Import sql. + ->addTask($this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql')) + ; } /** @@ -288,21 +286,19 @@ public function jobExtractFromAws() /** * Builds the Code Base. * - * @return \Robo\Task\Base\Exec[] - * An array of tasks. + * @return \Robo\Collection\CollectionBuilder + * A collection of tasks. */ protected function buildComposer() { - $force = true; - $tasks = []; - - $tasks[] = $this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo'); - $tasks[] = $this->taskExec('make'); - $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml'); - $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php'); - $tasks[] = $this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest'); - - return $tasks; + return $this + ->collectionBuilder() + ->addTask($this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo')) + ->addTask($this->taskExec('make')) + ->addTask($this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml')) + ->addTask($this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php')) + ->addTask($this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest')) + ; } /** From 218e875d3b3f03cd8145dd3b0533f318745bd316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 17:05:55 +0100 Subject: [PATCH 57/90] Issue #12947 - try without composer install --- .travis/RoboFile.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index e9d268fe80f..1f17ae91815 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -234,8 +234,6 @@ protected function importDB() { return $this ->collectionBuilder() - // Fix import issue. - ->addTask($this->taskExec('docker-compose exec -T php composer install')) // Import sql. ->addTask($this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql')) ; From f0038bdd6b08c367f6e2785ed8cdb1c6eb235a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 17:09:47 +0100 Subject: [PATCH 58/90] Issue #12947 - refactor --- .travis/RoboFile.php | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 1f17ae91815..717033c86f0 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -202,26 +202,25 @@ protected function downloadDatabase() /** * Creates the Docker environment. * - * @return \Robo\Task\Base\Exec[] - * An array of tasks. + * @return \Robo\Collection\CollectionBuilder + * A collection of tasks. */ protected function buildDocker() { $force = true; - $tasks = []; - $tasks[] = $this->taskFilesystemStack() - ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force) - ->copy('.travis/traefik.yml', 'traefik.yml', $force) - ->copy('.travis/.env', '.env', $force) - ->copy('.travis/config/behat.yml', 'tests/behat.yml', $force); - - $tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env'); - $tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env'); - $tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env'); - $tasks[] = $this->taskExec('docker-compose --verbose pull --parallel'); - $tasks[] = $this->taskExec('docker-compose up -d'); - - return $tasks; + return $this + ->collectionBuilder() + ->addTask($this->taskFilesystemStack() + ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force) + ->copy('.travis/traefik.yml', 'traefik.yml', $force) + ->copy('.travis/.env', '.env', $force) + ->copy('.travis/config/behat.yml', 'tests/behat.yml', $force)) + ->addTask($this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env')) + ->addTask($this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env')) + ->addTask($this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env')) + ->addTask($this->taskExec('docker-compose --verbose pull --parallel')) + ->addTask($this->taskExec('docker-compose up -d')) + ; } /** @@ -234,6 +233,8 @@ protected function importDB() { return $this ->collectionBuilder() + // Fix import issue. + ->addTask($this->taskExec('docker-compose exec -T php composer install')) // Import sql. ->addTask($this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql')) ; From a5f7f2da39651b5a0ecb88e2988e743ba69b7b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 17:26:41 +0100 Subject: [PATCH 59/90] Issue #12947 - revert refactor --- .travis/RoboFile.php | 51 +++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 717033c86f0..91b003688fb 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -202,42 +202,45 @@ protected function downloadDatabase() /** * Creates the Docker environment. * - * @return \Robo\Collection\CollectionBuilder - * A collection of tasks. + * @return \Robo\Task\Base\Exec[] + * An array of tasks. */ protected function buildDocker() { $force = true; - return $this - ->collectionBuilder() - ->addTask($this->taskFilesystemStack() - ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force) - ->copy('.travis/traefik.yml', 'traefik.yml', $force) - ->copy('.travis/.env', '.env', $force) - ->copy('.travis/config/behat.yml', 'tests/behat.yml', $force)) - ->addTask($this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env')) - ->addTask($this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env')) - ->addTask($this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env')) - ->addTask($this->taskExec('docker-compose --verbose pull --parallel')) - ->addTask($this->taskExec('docker-compose up -d')) - ; + $tasks = []; + $tasks[] = $this->taskFilesystemStack() + ->copy('.travis/docker-compose.yml', 'docker-compose.yml', $force) + ->copy('.travis/traefik.yml', 'traefik.yml', $force) + ->copy('.travis/.env', '.env', $force) + ->copy('.travis/config/behat.yml', 'tests/behat.yml', $force); + + $tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env'); + $tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env'); + $tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env'); + $tasks[] = $this->taskExec('docker-compose --verbose pull --parallel'); + $tasks[] = $this->taskExec('docker-compose up -d'); + + return $tasks; } /** * Imports the database. * - * @return \Robo\Collection\CollectionBuilder - * A collection of tasks. + * @return \Robo\Task\Base\Exec[] + * An array of tasks. */ protected function importDB() { - return $this - ->collectionBuilder() - // Fix import issue. - ->addTask($this->taskExec('docker-compose exec -T php composer install')) - // Import sql. - ->addTask($this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql')) - ; + $force = true; + $tasks = []; + + // Fix import issue. + $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); + // Import sql. + $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); + + return $tasks; } /** From de48f4546629421be93a0c88dfb6554f635e55c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 17:30:04 +0100 Subject: [PATCH 60/90] Issue #12947 - revert refactor --- .travis/RoboFile.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 91b003688fb..b49179f0903 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -288,19 +288,21 @@ public function jobExtractFromAws() /** * Builds the Code Base. * - * @return \Robo\Collection\CollectionBuilder - * A collection of tasks. + * @return \Robo\Task\Base\Exec[] + * An array of tasks. */ protected function buildComposer() { - return $this - ->collectionBuilder() - ->addTask($this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo')) - ->addTask($this->taskExec('make')) - ->addTask($this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml')) - ->addTask($this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php')) - ->addTask($this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest')) - ; + $force = true; + $tasks = []; + + $tasks[] = $this->taskExec('docker-compose exec -T php composer global require hirak/prestissimo'); + $tasks[] = $this->taskExec('make'); + $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config/phpunit.xml web/core/phpunit.xml'); + $tasks[] = $this->taskExec('docker-compose exec -T php cp .travis/config//bootstrap.php web/core/tests/bootstrap.php'); + $tasks[] = $this->taskExec('docker-compose exec -T php mkdir -p web/sites/simpletest'); + + return $tasks; } /** From b72b782de440cc05dec3f42061ba916b73ac3984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Thu, 20 Feb 2020 17:35:34 +0100 Subject: [PATCH 61/90] Issue #12947 - try without composer install --- .travis/RoboFile.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index b49179f0903..8f731f1e41d 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -235,8 +235,6 @@ protected function importDB() $force = true; $tasks = []; - // Fix import issue. - $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From 38aa36a193a2761a0e69e34d15b3b61fd7b0b235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Fri, 21 Feb 2020 09:25:18 +0100 Subject: [PATCH 62/90] Issue #12947 - Debug job --- .travis.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5c6d6865d9..65c5c9d87c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,16 +40,22 @@ jobs: script: robo job:check-module-circular-dependency after_success: - robo job:upload-to-aws +# - stage: test +# script: +# - robo job:extract-from-aws +# - robo job:run-unit-tests +# - stage: test +# script: +# - robo job:extract-from-aws +# - robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" +# - stage: test +# script: +# - robo job:extract-from-aws +# - robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" - stage: test script: - robo job:extract-from-aws - - robo job:run-unit-tests - - stage: test - script: - - robo job:extract-from-aws - - robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" -# - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" -# - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" + - robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" # - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" # - script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" # - script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" From 2b739700c5650a8f56bb7793a86b261de85eb4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Fri, 21 Feb 2020 09:25:29 +0100 Subject: [PATCH 63/90] Issue #12947 - restore composer install --- .travis/RoboFile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 8f731f1e41d..b49179f0903 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -235,6 +235,8 @@ protected function importDB() $force = true; $tasks = []; + // Fix import issue. + $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From d7ecc353b8bf1b42866d397094091cc8ad75be70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Fri, 21 Feb 2020 09:28:21 +0100 Subject: [PATCH 64/90] Issue #12947 - add debug files --- .travis/RoboFile.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index b49179f0903..3a1d857be98 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -275,13 +275,12 @@ public function jobExtractFromAws() ->addTask($this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) - ->addTask($this->taskExec('ls -la vendor')) - ->addTask($this->taskExec('ls -la web')) ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) ->addTask($this->taskExec('sudo chown -R 1000:1000 web')) ->addTask($this->taskExec('sudo chown -R 1000:1000 vendor')) - ->addTask($this->taskExec('ls -la vendor')) - ->addTask($this->taskExec('ls -la web')) + ->addTask($this->taskExec('ls -la web/sites/default')) + ->addTask($this->taskExec('ls -la web/sites/default/files')) + ->addTask($this->taskExec('sudo chmod 777 -R web/sites/default/files')) ; } From f4353147edbb5c55d2b7c26364fb65ee120babd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Fri, 21 Feb 2020 13:19:13 +0100 Subject: [PATCH 65/90] Issue #cache - Issue #12947 - Fix custom themes --- .travis/RoboFile.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 3a1d857be98..10fb6313207 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -254,12 +254,13 @@ public function jobUploadToAws() return $this ->collectionBuilder() ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) - ->addTask($this->taskExec('ls -la vendor')) - ->addTask($this->taskExec('ls -la web')) + ->addTask($this->taskExec('ls -la')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) ; } /** @@ -275,12 +276,11 @@ public function jobExtractFromAws() ->addTask($this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) + ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) ->addTask($this->taskExec('sudo chown -R 1000:1000 web')) ->addTask($this->taskExec('sudo chown -R 1000:1000 vendor')) - ->addTask($this->taskExec('ls -la web/sites/default')) - ->addTask($this->taskExec('ls -la web/sites/default/files')) - ->addTask($this->taskExec('sudo chmod 777 -R web/sites/default/files')) + ->addTask($this->taskExec('sudo chown -R 1000:1000 custom_themes')) ; } From 3a74caa44345cc452df7003b7643bc3f7425ab24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Fri, 21 Feb 2020 16:18:31 +0100 Subject: [PATCH 66/90] Issue #cache - Issue #12947 - Try run separated --- .travis/RoboFile.php | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 10fb6313207..5cff99ce127 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -105,8 +105,12 @@ public function jobRunKernelTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDB()); - $collection->addTaskList($this->runKernelTests($groups)); + $groups = explode(',', $groups); + foreach ($groups as $group) { + $collection->addTaskList($this->importDB()); + $collection->addTaskList($this->runKernelTests($group)); + $collection->addTaskList($this->clearDB()); + } return $collection->run(); } @@ -243,6 +247,23 @@ protected function importDB() return $tasks; } + /** + * Clears the database. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function clearDB() + { + $tasks = []; + + $tasks[] = $this->taskExec('docker-compose stop mariadb'); + $tasks[] = $this->taskExec('docker-compose rm -y mariadb'); + $tasks[] = $this->taskExec('docker-compose up'); + + return $tasks; + } + /** * Create sql dump and compressed build and upload to S3. * From bb6f0ac70a18234cf205c4c2282f599b05c2bc51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Fri, 21 Feb 2020 17:28:46 +0100 Subject: [PATCH 67/90] Issue #cache - Issue #12947 - hotfixes --- .travis/RoboFile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 5cff99ce127..27a915faffa 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -258,8 +258,8 @@ protected function clearDB() $tasks = []; $tasks[] = $this->taskExec('docker-compose stop mariadb'); - $tasks[] = $this->taskExec('docker-compose rm -y mariadb'); - $tasks[] = $this->taskExec('docker-compose up'); + $tasks[] = $this->taskExec('docker-compose rm -f mariadb'); + $tasks[] = $this->taskExec('docker-compose up -d'); return $tasks; } From 9ed8da4a74b937d27a85065b838aa139cff07b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 24 Feb 2020 11:14:55 +0100 Subject: [PATCH 68/90] Issue #cache - Issue #12947 - hotfixes --- .travis.yml | 41 +++++++++++++------------- .travis/RoboFile.php | 70 ++++++++++++-------------------------------- 2 files changed, 38 insertions(+), 73 deletions(-) diff --git a/.travis.yml b/.travis.yml index 65c5c9d87c4..7dcfa3d38b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,34 +34,32 @@ stages: jobs: include: -# - stage: prepare for tests -# script: robo job:check-coding-standards + - stage: prepare for tests + script: robo job:check-coding-standards - stage: prepare for tests script: robo job:check-module-circular-dependency after_success: - robo job:upload-to-aws # - stage: test -# script: -# - robo job:extract-from-aws -# - robo job:run-unit-tests +# script: robo job:run-unit-tests +# - stage: test +# script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" +# - stage: test +# script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" +# - stage: test +# script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" +# - stage: test +# script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" +# - stage: test +# script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" +# - stage: test +# script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" # - stage: test -# script: -# - robo job:extract-from-aws -# - robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" +# script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" # - stage: test -# script: -# - robo job:extract-from-aws -# - robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" +# script: robo job:run-functional-javascript-tests "events,vsite,widgets" - stage: test - script: - - robo job:extract-from-aws - - robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" -# - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" -# - script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" -# - script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" -# - script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" -# - script: robo job:run-functional-javascript-tests "events,vsite,widgets" -# - script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" + script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" - stage: codecov script: robo job:run-unit-tests-code-coverage after_success: bash <(curl -s https://codecov.io/bash) @@ -127,5 +125,6 @@ before_script: - cp .travis/RoboFile.php . after_failure: - - docker-compose logs + - docker-compose logs php + - docker-compose logs mariadb - artifacts upload diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 27a915faffa..190e7e4d5e2 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -57,7 +57,6 @@ public function jobRunUnitTestsCodeCoverage($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDB()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); @@ -105,12 +104,8 @@ public function jobRunKernelTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); - $groups = explode(',', $groups); - foreach ($groups as $group) { - $collection->addTaskList($this->importDB()); - $collection->addTaskList($this->runKernelTests($group)); - $collection->addTaskList($this->clearDB()); - } + $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); } @@ -124,7 +119,7 @@ public function jobRunKernelTestsCodeCoverage($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDB()); + $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); @@ -142,7 +137,7 @@ public function jobRunFunctionalTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDB()); + $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->runFunctionalTests($groups)); return $collection->run(); } @@ -159,7 +154,7 @@ public function jobRunFunctionalJavascriptTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDB()); + $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); return $collection->run(); } @@ -175,7 +170,7 @@ public function jobRunBehatTests() $collection = $this->collectionBuilder(); $collection->addTaskList($this->downloadDatabase()); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDB()); + $collection->addTaskList($this->buildEnvironment()); $collection->addTask($this->waitForDrupal()); $collection->addTaskList($this->runUpdatePath()); $collection->addTaskList($this->runBehatTests()); @@ -222,23 +217,31 @@ protected function buildDocker() $tasks[] = $this->taskExec('echo AWS_ACCESS_KEY_ID=' . getenv('ARTIFACTS_KEY') . ' >> .env'); $tasks[] = $this->taskExec('echo AWS_SECRET_ACCESS_KEY=' . getenv('ARTIFACTS_SECRET') . ' >> .env'); $tasks[] = $this->taskExec('echo AWS_ES_ACCESS_ENDPOINT=' . getenv('ARTIFACTS_ES_ENDPOINT') . ' >> .env'); - $tasks[] = $this->taskExec('docker-compose --verbose pull --parallel'); + $tasks[] = $this->taskExec('docker-compose pull --parallel'); $tasks[] = $this->taskExec('docker-compose up -d'); return $tasks; } /** - * Imports the database. + * Build environment. * * @return \Robo\Task\Base\Exec[] * An array of tasks. */ - protected function importDB() + protected function buildEnvironment() { - $force = true; $tasks = []; + $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); + $tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 custom_themes'); + $tasks[] = $this->taskExec('ls -la'); // Fix import issue. $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); // Import sql. @@ -247,23 +250,6 @@ protected function importDB() return $tasks; } - /** - * Clears the database. - * - * @return \Robo\Task\Base\Exec[] - * An array of tasks. - */ - protected function clearDB() - { - $tasks = []; - - $tasks[] = $this->taskExec('docker-compose stop mariadb'); - $tasks[] = $this->taskExec('docker-compose rm -f mariadb'); - $tasks[] = $this->taskExec('docker-compose up -d'); - - return $tasks; - } - /** * Create sql dump and compressed build and upload to S3. * @@ -284,26 +270,6 @@ public function jobUploadToAws() ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) ; } - /** - * Extract from S3 and fix permissions. - * - * @return \Robo\Collection\CollectionBuilder - * A collection of tasks. - */ - public function jobExtractFromAws() - { - return $this - ->collectionBuilder() - ->addTask($this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .')) - ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) - ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) - ->addTask($this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) - ->addTask($this->taskExec('chmod +x vendor/bin/phpunit')) - ->addTask($this->taskExec('sudo chown -R 1000:1000 web')) - ->addTask($this->taskExec('sudo chown -R 1000:1000 vendor')) - ->addTask($this->taskExec('sudo chown -R 1000:1000 custom_themes')) - ; - } /** * Builds the Code Base. From 959404af1603d4fc394b84b8e144e4e554a52835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 24 Feb 2020 11:47:01 +0100 Subject: [PATCH 69/90] Issue #cache - Issue #12947 - separate tasks --- .travis/RoboFile.php | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 190e7e4d5e2..a60f21ce119 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -103,8 +103,9 @@ public function jobCheckModuleCircularDependency() public function jobRunKernelTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); } @@ -118,8 +119,9 @@ public function jobRunKernelTests($groups = '') public function jobRunKernelTestsCodeCoverage($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); @@ -136,8 +138,9 @@ public function jobRunKernelTestsCodeCoverage($groups = '') public function jobRunFunctionalTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->runFunctionalTests($groups)); return $collection->run(); } @@ -153,8 +156,9 @@ public function jobRunFunctionalTests($groups = '') public function jobRunFunctionalJavascriptTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); return $collection->run(); } @@ -169,8 +173,9 @@ public function jobRunBehatTests() { $collection = $this->collectionBuilder(); $collection->addTaskList($this->downloadDatabase()); - $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->importDatabase()); $collection->addTask($this->waitForDrupal()); $collection->addTaskList($this->runUpdatePath()); $collection->addTaskList($this->runBehatTests()); @@ -244,6 +249,19 @@ protected function buildEnvironment() $tasks[] = $this->taskExec('ls -la'); // Fix import issue. $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); + + return $tasks; + } + /** + * Import database. + * + * @return \Robo\Task\Base\Exec[] + * An array of tasks. + */ + protected function importDatabase() + { + $tasks = []; + // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From c52aac3e9e074abfbe95ec63e659c162074fb377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 24 Feb 2020 12:04:20 +0100 Subject: [PATCH 70/90] Issue #cache - Issue #12947 - move composer install --- .travis/RoboFile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index a60f21ce119..c764f987f54 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -247,8 +247,6 @@ protected function buildEnvironment() $tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); $tasks[] = $this->taskExec('sudo chown -R 1000:1000 custom_themes'); $tasks[] = $this->taskExec('ls -la'); - // Fix import issue. - $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); return $tasks; } @@ -262,6 +260,8 @@ protected function importDatabase() { $tasks = []; + // Fix import issue. + $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From a11a5f22400ac801362169c1ea13ed7e9eb64649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Mon, 24 Feb 2020 15:39:11 +0100 Subject: [PATCH 71/90] Issue #12947 - move unit into prepare (wip) --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7dcfa3d38b9..a367175f042 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,13 +36,13 @@ jobs: include: - stage: prepare for tests script: robo job:check-coding-standards +# - stage: prepare for tests +# script: robo job:run-unit-tests - stage: prepare for tests script: robo job:check-module-circular-dependency after_success: - robo job:upload-to-aws # - stage: test -# script: robo job:run-unit-tests -# - stage: test # script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - stage: test # script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" From 04afa10514f3a5cbc8523c0fb1efd15dceb19afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 10:15:12 +0100 Subject: [PATCH 72/90] Revert to normal install way --- .travis.yml | 8 ++++---- .travis/RoboFile.php | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a367175f042..d3b67ab1ae7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,10 +38,10 @@ jobs: script: robo job:check-coding-standards # - stage: prepare for tests # script: robo job:run-unit-tests - - stage: prepare for tests - script: robo job:check-module-circular-dependency - after_success: - - robo job:upload-to-aws +# - stage: prepare for tests +# script: robo job:check-module-circular-dependency +# after_success: +# - robo job:upload-to-aws # - stage: test # script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - stage: test diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index c764f987f54..8740e5f64a6 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -156,9 +156,11 @@ public function jobRunFunctionalTests($groups = '') public function jobRunFunctionalJavascriptTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + //$collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDatabase()); + //$collection->addTaskList($this->importDatabase()); + $collection->addTaskList($this->buildComposer()); + $collection->addTaskList($this->installDrupal()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); return $collection->run(); } From 9ab376c1661ffe116813fd6b50daa385b76ac77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 10:28:00 +0100 Subject: [PATCH 73/90] Try with only db build --- .travis.yml | 8 ++++---- .travis/RoboFile.php | 27 +++++++++++++++------------ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index d3b67ab1ae7..a367175f042 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,10 +38,10 @@ jobs: script: robo job:check-coding-standards # - stage: prepare for tests # script: robo job:run-unit-tests -# - stage: prepare for tests -# script: robo job:check-module-circular-dependency -# after_success: -# - robo job:upload-to-aws + - stage: prepare for tests + script: robo job:check-module-circular-dependency + after_success: + - robo job:upload-to-aws # - stage: test # script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - stage: test diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 8740e5f64a6..beabb08d83d 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -156,9 +156,9 @@ public function jobRunFunctionalTests($groups = '') public function jobRunFunctionalJavascriptTests($groups = '') { $collection = $this->collectionBuilder(); - //$collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->buildDocker()); - //$collection->addTaskList($this->importDatabase()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->installDrupal()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); @@ -241,12 +241,13 @@ protected function buildEnvironment() $tasks = []; $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); + //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); + //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); - $tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); - $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); - $tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); + //$tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); + //$tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); + //$tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); $tasks[] = $this->taskExec('sudo chown -R 1000:1000 custom_themes'); $tasks[] = $this->taskExec('ls -la'); @@ -263,7 +264,7 @@ protected function importDatabase() $tasks = []; // Fix import issue. - $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); + //$tasks[] = $this->taskExec('docker-compose exec -T php composer install'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); @@ -282,11 +283,13 @@ public function jobUploadToAws() ->collectionBuilder() ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) ->addTask($this->taskExec('ls -la')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql')) + //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) + //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz')) + //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) + //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) ; } From 16b685f4c23c35595f618a2eec4bbfe982504cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 10:35:45 +0100 Subject: [PATCH 74/90] Revert "Try with only db build" This reverts commit 9ab376c1661ffe116813fd6b50daa385b76ac77b. --- .travis.yml | 8 ++++---- .travis/RoboFile.php | 27 ++++++++++++--------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index a367175f042..d3b67ab1ae7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,10 +38,10 @@ jobs: script: robo job:check-coding-standards # - stage: prepare for tests # script: robo job:run-unit-tests - - stage: prepare for tests - script: robo job:check-module-circular-dependency - after_success: - - robo job:upload-to-aws +# - stage: prepare for tests +# script: robo job:check-module-circular-dependency +# after_success: +# - robo job:upload-to-aws # - stage: test # script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - stage: test diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index beabb08d83d..8740e5f64a6 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -156,9 +156,9 @@ public function jobRunFunctionalTests($groups = '') public function jobRunFunctionalJavascriptTests($groups = '') { $collection = $this->collectionBuilder(); - $collection->addTaskList($this->buildEnvironment()); + //$collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDatabase()); + //$collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->installDrupal()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); @@ -241,13 +241,12 @@ protected function buildEnvironment() $tasks = []; $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); - //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); - //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); - //$tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); - //$tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); - //$tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); + $tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); $tasks[] = $this->taskExec('sudo chown -R 1000:1000 custom_themes'); $tasks[] = $this->taskExec('ls -la'); @@ -264,7 +263,7 @@ protected function importDatabase() $tasks = []; // Fix import issue. - //$tasks[] = $this->taskExec('docker-compose exec -T php composer install'); + $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); @@ -283,13 +282,11 @@ public function jobUploadToAws() ->collectionBuilder() ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) ->addTask($this->taskExec('ls -la')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql')) - //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) - //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz')) - //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) - //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) ; } From fd80b691ce40eb3afcec4c55956eeb267893b4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 10:36:26 +0100 Subject: [PATCH 75/90] Old way fix --- .travis/RoboFile.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 8740e5f64a6..9acd8f3215d 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -161,6 +161,7 @@ public function jobRunFunctionalJavascriptTests($groups = '') //$collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); return $collection->run(); } From a739ed98366a57e2b66092c8df7a1a262a1b4eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 10:37:41 +0100 Subject: [PATCH 76/90] Try with only db build (fix test files) --- .travis.yml | 8 ++++---- .travis/RoboFile.php | 27 +++++++++++++++------------ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index d3b67ab1ae7..a367175f042 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,10 +38,10 @@ jobs: script: robo job:check-coding-standards # - stage: prepare for tests # script: robo job:run-unit-tests -# - stage: prepare for tests -# script: robo job:check-module-circular-dependency -# after_success: -# - robo job:upload-to-aws + - stage: prepare for tests + script: robo job:check-module-circular-dependency + after_success: + - robo job:upload-to-aws # - stage: test # script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" # - stage: test diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 9acd8f3215d..5927c443b63 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -156,9 +156,9 @@ public function jobRunFunctionalTests($groups = '') public function jobRunFunctionalJavascriptTests($groups = '') { $collection = $this->collectionBuilder(); - //$collection->addTaskList($this->buildEnvironment()); + $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->buildDocker()); - //$collection->addTaskList($this->importDatabase()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->installDrupal()); $collection->addTaskList($this->installTestConfigs()); @@ -242,12 +242,13 @@ protected function buildEnvironment() $tasks = []; $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); + //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); + //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); - $tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); - $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); - $tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); + //$tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); + //$tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); + //$tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); $tasks[] = $this->taskExec('sudo chown -R 1000:1000 custom_themes'); $tasks[] = $this->taskExec('ls -la'); @@ -264,7 +265,7 @@ protected function importDatabase() $tasks = []; // Fix import issue. - $tasks[] = $this->taskExec('docker-compose exec -T php composer install'); + //$tasks[] = $this->taskExec('docker-compose exec -T php composer install'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); @@ -283,11 +284,13 @@ public function jobUploadToAws() ->collectionBuilder() ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) ->addTask($this->taskExec('ls -la')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql')) + //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) + //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz')) + //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) + //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) ; } From 91f40c4ae48a743969d15aebff7b728ae2b4ec55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 11:00:14 +0100 Subject: [PATCH 77/90] Save settings too and order cahnge and remove install drupal --- .travis/RoboFile.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 5927c443b63..f99d36d096b 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -158,9 +158,8 @@ public function jobRunFunctionalJavascriptTests($groups = '') $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->buildDocker()); - $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->buildComposer()); - $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->importDatabase()); $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalJavascriptTests($groups)); return $collection->run(); @@ -243,6 +242,7 @@ protected function buildEnvironment() $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); @@ -285,10 +285,12 @@ public function jobUploadToAws() ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) ->addTask($this->taskExec('ls -la')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default/settings.php')) //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz')) //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) From f5726a74b3ad722523e45df8a713dcb1b600a697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 11:19:58 +0100 Subject: [PATCH 78/90] Try to fix order --- .travis/RoboFile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index f99d36d096b..4f5e24c9759 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -241,8 +241,6 @@ protected function buildEnvironment() $tasks = []; $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); @@ -266,6 +264,8 @@ protected function importDatabase() // Fix import issue. //$tasks[] = $this->taskExec('docker-compose exec -T php composer install'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); + $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From 86d3bdc970c4cc7b0a71bc1cac6a97e901f39744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 11:36:09 +0100 Subject: [PATCH 79/90] Permission fix --- .travis/RoboFile.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 4f5e24c9759..6f57179ff93 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -266,6 +266,7 @@ protected function importDatabase() //$tasks[] = $this->taskExec('docker-compose exec -T php composer install'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From d7c82d6fb61cf54483ffee7560f38958385fd261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 11:52:22 +0100 Subject: [PATCH 80/90] Permission fix --- .travis/RoboFile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 6f57179ff93..338bbbb75f2 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -264,8 +264,8 @@ protected function importDatabase() // Fix import issue. //$tasks[] = $this->taskExec('docker-compose exec -T php composer install'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); - $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); + $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); + $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From aefb2a5d918ec1704d430f66979552c6fd168894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 12:10:46 +0100 Subject: [PATCH 81/90] Enable all tests --- .travis.yml | 32 ++++++++++++++++---------------- .travis/RoboFile.php | 6 ++++++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index a367175f042..f5e74374421 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,22 +42,22 @@ jobs: script: robo job:check-module-circular-dependency after_success: - robo job:upload-to-aws -# - stage: test -# script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" -# - stage: test -# script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" -# - stage: test -# script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" -# - stage: test -# script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" -# - stage: test -# script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" -# - stage: test -# script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" -# - stage: test -# script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" -# - stage: test -# script: robo job:run-functional-javascript-tests "events,vsite,widgets" + - stage: test + script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" + - stage: test + script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" + - stage: test + script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" + - stage: test + script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" + - stage: test + script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" + - stage: test + script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" + - stage: test + script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" + - stage: test + script: robo job:run-functional-javascript-tests "events,vsite,widgets" - stage: test script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" - stage: codecov diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 338bbbb75f2..3b97618a739 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -105,7 +105,9 @@ public function jobRunKernelTests($groups = '') $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->importDatabase()); + $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); } @@ -121,7 +123,9 @@ public function jobRunKernelTestsCodeCoverage($groups = '') $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->importDatabase()); + $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runKernelTests($groups)); return $collection->run(); @@ -140,7 +144,9 @@ public function jobRunFunctionalTests($groups = '') $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildEnvironment()); $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->importDatabase()); + $collection->addTaskList($this->installTestConfigs()); $collection->addTaskList($this->runFunctionalTests($groups)); return $collection->run(); } From ac40290cfe1e192949ec4f16dd3e681be718f129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Tue, 25 Feb 2020 12:41:32 +0100 Subject: [PATCH 82/90] Save files dir too --- .travis.yml | 16 ++++++++-------- .travis/RoboFile.php | 15 +++++---------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5e74374421..b70119bc325 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,14 +50,14 @@ jobs: script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" - stage: test script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" - - stage: test - script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" - - stage: test - script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" - - stage: test - script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" - - stage: test - script: robo job:run-functional-javascript-tests "events,vsite,widgets" +# - stage: test +# script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" +# - stage: test +# script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" +# - stage: test +# script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" +# - stage: test +# script: robo job:run-functional-javascript-tests "events,vsite,widgets" - stage: test script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" - stage: codecov diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 3b97618a739..1cb9bc93e66 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -247,12 +247,7 @@ protected function buildEnvironment() $tasks = []; $tasks[] = $this->taskExec('aws s3 sync s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER .'); - //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz'); - //$tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz'); $tasks[] = $this->taskExec('tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); - //$tasks[] = $this->taskExec('chmod +x vendor/bin/phpunit'); - //$tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); - //$tasks[] = $this->taskExec('sudo chown -R 1000:1000 vendor'); $tasks[] = $this->taskExec('sudo chown -R 1000:1000 custom_themes'); $tasks[] = $this->taskExec('ls -la'); @@ -269,10 +264,12 @@ protected function importDatabase() $tasks = []; // Fix import issue. - //$tasks[] = $this->taskExec('docker-compose exec -T php composer install'); $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); + $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default'); $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); + $tasks[] = $this->taskExec('sudo chmod -R 777 web/sites/default/files'); + $tasks[] = $this->taskExec('ls -la'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); @@ -293,14 +290,12 @@ public function jobUploadToAws() ->addTask($this->taskExec('ls -la')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default/settings.php')) - //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz web')) - //->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz vendor')) ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes')) + ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default/files')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz')) - //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-web.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-web.tar.xz')) - //->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-vendor.tar.xz')) ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) + ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz')) ; } From 68c0d7348772ff220e891f9b30ed8d918e9f3477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 26 Feb 2020 09:24:21 +0100 Subject: [PATCH 83/90] Upload to aws at different place --- .travis/RoboFile.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 1cb9bc93e66..d74252db108 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -89,6 +89,7 @@ public function jobCheckModuleCircularDependency() $collection->addTaskList($this->buildDocker()); $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->installDrupal()); + $collection->addTaskList($this->uploadToAws()); $collection->addTaskList($this->runCheckModuleCircularDependency()); $collection->addTaskList($this->installTestConfigs()); return $collection->run(); @@ -299,6 +300,28 @@ public function jobUploadToAws() ; } + /** + * Create sql dump and compressed build and upload to S3. + * + * @return \Robo\Task\Base\Exec[] + * A collection of tasks. + */ + public function uploadToAws() + { + $tasks[] = $this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql'); + $tasks[] = $this->taskExec('ls -la'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default/settings.php'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes'); + $tasks[] = $this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default/files'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz'); + $tasks[] = $this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz'); + + return $tasks; + } + /** * Builds the Code Base. * From 54a7f7d555beca89a8c13306da431b340c7497fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 26 Feb 2020 09:24:33 +0100 Subject: [PATCH 84/90] Upload to aws at different place --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b70119bc325..569139ff55c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,12 +40,12 @@ jobs: # script: robo job:run-unit-tests - stage: prepare for tests script: robo job:check-module-circular-dependency - after_success: - - robo job:upload-to-aws - - stage: test - script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" - - stage: test - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" +# after_success: +# - robo job:upload-to-aws +# - stage: test +# script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" +# - stage: test +# script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" - stage: test script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" - stage: test From d0c9cf36228a017d9c29f643a40e24212d7e959d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 26 Feb 2020 12:07:45 +0100 Subject: [PATCH 85/90] Enable all tests --- .travis.yml | 30 ++++++++++++++---------------- .travis/RoboFile.php | 25 +------------------------ 2 files changed, 15 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 569139ff55c..7992c508d67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,28 +36,26 @@ jobs: include: - stage: prepare for tests script: robo job:check-coding-standards -# - stage: prepare for tests -# script: robo job:run-unit-tests + - stage: prepare for tests + script: robo job:run-unit-tests - stage: prepare for tests script: robo job:check-module-circular-dependency -# after_success: -# - robo job:upload-to-aws -# - stage: test -# script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" -# - stage: test -# script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" + - stage: test + script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" + - stage: test + script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" - stage: test script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" - stage: test script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" -# - stage: test -# script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" -# - stage: test -# script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" -# - stage: test -# script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" -# - stage: test -# script: robo job:run-functional-javascript-tests "events,vsite,widgets" + - stage: test + script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" + - stage: test + script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" + - stage: test + script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" + - stage: test + script: robo job:run-functional-javascript-tests "events,vsite,widgets" - stage: test script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" - stage: codecov diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index d74252db108..e23d8d46db5 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -277,36 +277,13 @@ protected function importDatabase() return $tasks; } - /** - * Create sql dump and compressed build and upload to S3. - * - * @return \Robo\Collection\CollectionBuilder - * A collection of tasks. - */ - public function jobUploadToAws() - { - return $this - ->collectionBuilder() - ->addTask($this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql')) - ->addTask($this->taskExec('ls -la')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz web/travis-backup.sql')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default/settings.php')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz custom_themes')) - ->addTask($this->taskExec('tar -Jcf ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default/files')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-db.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-settings.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-custom_themes.tar.xz')) - ->addTask($this->taskExec('aws s3 cp ${TRAVIS_BUILD_DIR}-${TRAVIS_BUILD_NUMBER}-files.tar.xz s3://$ARTIFACTS_BUCKET/build_files/$TRAVIS_BUILD_NUMBER/os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz')) - ; - } - /** * Create sql dump and compressed build and upload to S3. * * @return \Robo\Task\Base\Exec[] * A collection of tasks. */ - public function uploadToAws() + protected function uploadToAws() { $tasks[] = $this->taskExec('docker-compose exec -T php drush sql-dump --result-file=./travis-backup.sql'); $tasks[] = $this->taskExec('ls -la'); From 1c6dcb455d80a00e3a1581006eb721d345994b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 26 Feb 2020 12:09:46 +0100 Subject: [PATCH 86/90] Try without 777, only chown --- .travis/RoboFile.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index e23d8d46db5..5b456cac8cf 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -268,8 +268,7 @@ protected function importDatabase() $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default'); - $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); - $tasks[] = $this->taskExec('sudo chmod -R 777 web/sites/default/files'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web/sites/default'); $tasks[] = $this->taskExec('ls -la'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From 718b874a218a0ecf774885bf2b69d40c3a0f1382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 26 Feb 2020 12:16:31 +0100 Subject: [PATCH 87/90] Revert "Try without 777, only chown" This reverts commit 1c6dcb455d80a00e3a1581006eb721d345994b27. --- .travis/RoboFile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 5b456cac8cf..e23d8d46db5 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -268,7 +268,8 @@ protected function importDatabase() $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default'); - $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web/sites/default'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); + $tasks[] = $this->taskExec('sudo chmod -R 777 web/sites/default/files'); $tasks[] = $this->taskExec('ls -la'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From 4fa78957d1f9953713df8ac636ba332bcfdcfe8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 26 Feb 2020 12:17:39 +0100 Subject: [PATCH 88/90] Missing composer install --- .travis/RoboFile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index e23d8d46db5..02b3ed660e9 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -43,6 +43,7 @@ public function jobRunUnitTests($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); } @@ -57,6 +58,7 @@ public function jobRunUnitTestsCodeCoverage($groups = '') { $collection = $this->collectionBuilder(); $collection->addTaskList($this->buildDocker()); + $collection->addTaskList($this->buildComposer()); $collection->addTaskList($this->enableXDebug()); $collection->addTaskList($this->runUnitTests($groups)); return $collection->run(); From 461aaf2b0d84b77cf36a26a7e3998a369b18d836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 26 Feb 2020 12:23:26 +0100 Subject: [PATCH 89/90] Try without 777, only chown --- .travis/RoboFile.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis/RoboFile.php b/.travis/RoboFile.php index 02b3ed660e9..8b6db6cde7b 100644 --- a/.travis/RoboFile.php +++ b/.travis/RoboFile.php @@ -270,8 +270,7 @@ protected function importDatabase() $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-db.tar.xz web'); $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-settings.tar.xz web/sites/default'); $tasks[] = $this->taskExec('sudo tar -Jxf os-build-${TRAVIS_BUILD_NUMBER}-files.tar.xz web/sites/default'); - $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web'); - $tasks[] = $this->taskExec('sudo chmod -R 777 web/sites/default/files'); + $tasks[] = $this->taskExec('sudo chown -R 1000:1000 web/sites/default'); $tasks[] = $this->taskExec('ls -la'); // Import sql. $tasks[] = $this->taskExec('docker-compose exec -T php drush sqlq --file=./travis-backup.sql'); From c57954233ba85450fd3f6889f5f84943f140bedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Sztreha?= Date: Wed, 26 Feb 2020 16:00:25 +0100 Subject: [PATCH 90/90] Test codecov part --- .travis.yml | 52 +++++++++++++++++----------------------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7992c508d67..1f99b3c7f54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,7 @@ env: stages: - prepare for tests - test - - name: codecov - if: branch = 8.x-1.x-dev + - codecov jobs: include: @@ -42,73 +41,56 @@ jobs: script: robo job:check-module-circular-dependency - stage: test script: robo job:run-kernel-tests "widgets-1,widgets-2,widgets-3,widgets-4,widgets-5" - - stage: test - script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" - - stage: test - script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" - - stage: test - script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" - - stage: test - script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" - - stage: test - script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" - - stage: test - script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" - - stage: test - script: robo job:run-functional-javascript-tests "events,vsite,widgets" - - stage: test - script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" +# - stage: test +# script: robo job:run-kernel-tests "publications-1,publications-2,wysiwyg,vsite,os,os-theme-preview" +# - stage: test +# script: robo job:run-kernel-tests "cp-1,cp-2,other-1,other-2,cp-menu,profiles,redirect,cp-appearance,os-search" +# - stage: test +# script: robo job:run-functional-tests "classes,events,pages,cp,media-browser,os-theme-preview,breadcrumbs,cp-menu,vsite_favicon" +# - stage: test +# script: robo job:run-functional-tests "os-search,analytics,publications,cp-appearance,redirect,twitter,os,vsite,cp-import" +# - stage: test +# script: robo job:run-functional-javascript-tests "publications,mailchimp,metatag,redirect,cp-appearance,vsite-preset" +# - stage: test +# script: robo job:run-functional-javascript-tests "os-search,cp,profiles,classes,pages" +# - stage: test +# script: robo job:run-functional-javascript-tests "events,vsite,widgets" +# - stage: test +# script: robo job:run-functional-javascript-tests "os,os-theme-preview,blog,faq,news,presentations,cp-menu" - stage: codecov script: robo job:run-unit-tests-code-coverage - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-1" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-2" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-3" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-4" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "widgets-5" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os-theme-preview,cp-appearance,profiles" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "publications-1,redirect" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "vsite" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "publications-2,wysiwyg" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-1" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-2" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "other-1" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "other-2" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "cp-menu" - after_success: bash <(curl -s https://codecov.io/bash) - stage: codecov script: robo job:run-kernel-tests-code-coverage "os-search" - after_success: bash <(curl -s https://codecov.io/bash) before_install: - echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini