diff --git a/.circleci/config.yml b/.circleci/config.yml
index a4acbc1c4..fae0d07bb 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,88 +1,44 @@
+##
+# CircleCI 2.0 configuration file.
+#
+# [META]
+# Content between [META] and [/META] (like the ones above and below this
+# paragraph) is explaining drupal-dev inner works and can be safely removed for
+# specific project.
+# [/META]
version: 2
aliases:
# Variables.
# For YAML support of anchors and references, @see http://blog.daemonl.com/2016/02/yaml.html
- - &workspace_root /home/circleci/project
- - &code_dir code
- - &code_root /home/circleci/project/code
- - &web_dir docroot
- - &web_root /home/circleci/project/code/docroot
- - &data_dir data
- - &data_root /home/circleci/project/data
- - &artifacts_root /tmp/artifacts
- - &server local.mysiteurl
- - &web_url http://local.mysiteurl
- - &deps_cache_key v1-dependencies-{{ checksum "composer.json" }}-{{ epoch }}
- - &deps_cache_key_any v1-dependencies-{{ checksum "composer.json" }}
- - &data_cache_key v1-data-{{ .Branch }}
+ - &workspace_dir /workspace
+ - &code_dir code
+ - &artifacts_dir /tmp/artifacts
+ # SSH key fingerprint to deploy code. Add private key of the user who is
+ # allowed to push to $DEPLOY_REMOTE repo under "SSH Permissions" in
+ # CircleCI UI.
+ #
+ # [META]
+ # This is a fingerprint of the key to push drupal-dev project itself.
+ # Replace this key with your own.
+ # [/META]
- &deploy_ssh_fingerprint "56:f3:3f:51:c3:8f:b3:75:01:90:6e:26:48:e7:48:e1"
- # Configuration shared between all containers.
- &container_config
- working_directory: /home/circleci/project/code
+ working_directory: /app
environment: &container_config_environment
- WORKSPACE_ROOT: *workspace_root
- CODE_ROOT: *code_root
- DATA_ROOT: *data_root
- WEB_ROOT: *web_root
- SERVER: *server
- WEB_URL: *web_url
- ARTIFACTS_ROOT: *artifacts_root
- DRUSH: vendor/bin/drush
- MYSQL_USER: ubuntu
- MYSQL_PASSWORD: ubuntu
- MYSQL_DATABASE: circle_test
- MYSQL_HOST: 127.0.0.1
- MYSQL_ROOT_PASSWORD: ubuntu
- MYSQL_ROOT_HOST: 127.0.0.1
+ WORKSPACE_DIR: *workspace_dir
+ ARTIFACTS_DIR: *artifacts_dir
+ CODE_DIR: *code_dir
DEPLOY_SSH_FINGERPRINT: *deploy_ssh_fingerprint
docker:
- - image: circleci/php:7.1-apache-browsers
+ - image: integratedexperts/circleci2-builder
environment:
- <<: *container_config_environment
- - image: mysql:5.7
- environment:
- <<: *container_config_environment
+ COMPOSER_ALLOW_SUPERUSER: 1
+ COMPOSE_FILE: docker-compose.yml:docker-compose.ci.yml
- # Re-usable steps.
- &step_attach_workspace
attach_workspace:
- at: /home/circleci/project
-
- - &step_common
- run:
- name: Apply common configuration
- command: |
- echo 127.0.0.1 $SERVER | sudo tee -a /etc/hosts
- echo 'export PATH=$HOME/.composer/vendor/bin:$PATH' >> $HOME/.bashrc
- echo 'export PATH=$HOME/.composer/vendor/bin:$PATH' >> $BASH_ENV
- mkdir $ARTIFACTS_ROOT
- echo 'export BEHAT_SCREENSHOT_DIR=$ARTIFACTS_ROOT/behat' >> $BASH_ENV
- mkdir -p $HOME/.drush && echo " '$SERVER', 'root' => '$WEB_ROOT'];" > $HOME/.drush/$SERVER.aliases.drushrc.php && $DRUSH sa && cat $HOME/.drush/$SERVER.aliases.drushrc.php
- printenv
-
- - &step_symlink_data
- run:
- name: Symlink data into local data directory.
- command: ln -s $DATA_ROOT $CODE_ROOT/.data
-
- - &step_php_extensions
- run:
- name: Install PHP extensions
- command: |
- sudo docker-php-ext-install pdo_mysql
- sudo docker-php-ext-install gd
-
- - &step_system_binaries
- run:
- name: Install additional debug binaries
- command: |
- sudo apt-get -y install vim mysql-client libpng-dev
-
- - &step_bootstrap_drupal
- run:
- name: Check that Drupal can be bootstrapped.
- command: $DRUSH --root=$WEB_ROOT status | grep -aqoi "Drupal bootstrap\s*:\s*Successful"
+ at: *workspace_dir
- &add_ssh_keys
add_ssh_keys:
@@ -98,231 +54,160 @@ aliases:
DEPLOY_SSH_FILE="${DEPLOY_SSH_FINGERPRINT//:}" && DEPLOY_SSH_FILE="id_rsa_${DEPLOY_SSH_FILE//\"}" && ssh-add -D && ssh-add ~/.ssh/$DEPLOY_SSH_FILE
jobs:
- # Install and cache code dependencies.
- code_dependencies:
+ build:
<<: *container_config
+ parallelism: 2
steps:
- - *step_common
- *step_attach_workspace
- checkout
- - restore_cache:
- keys:
- - *deps_cache_key_any
- - run:
- name: Validate composer configuration
- command: composer validate --strict
- - run:
- name: Install global dependencies
- command: composer global require hirak/prestissimo
+ - setup_remote_docker:
+ docker_layer_caching: true
- run:
- name: Install dependencies
- command: composer install -n --prefer-dist
- - save_cache:
- paths:
- - $HOME/.composer/cache
- key: *deps_cache_key
- - persist_to_workspace:
- root: *workspace_root
- paths:
- - *code_dir
-
- # Download and cache DB.
- download_db:
- <<: *container_config
- working_directory: /home/circleci/project
- steps:
- - *step_common
- - restore_cache:
- keys:
- - *data_cache_key
+ name: Composer validate.
+ command: composer validate --ansi --strict
# Download DB dump from public URL to test Drupal-dev project/build.
# Remove the line below in your project/build.
- - run: if [ ! -f $DATA_ROOT/db.dist.sql ] ; then mkdir -p $DATA_ROOT && curl -L https://goo.gl/kcC2sE -o $DATA_ROOT/db.dist.sql; fi
- # [META] Uncomment the line below to download DB dump from FTP, using
+ - run: if [ ! -f .data/db.sql ] ; then mkdir -p .data && curl -L https://goo.gl/kcC2sE -o .data/db.sql; fi
+ # [META]
+ # Uncomment the line below to download DB dump from FTP, using
# variables set in Circle CI UI.
# - run: if [ ! -f $DATA_ROOT/db.dist.sql ] ; then mkdir -p $DATA_ROOT && curl -u $FTP_USER:$FTP_PASS "ftp://$FTP_HOST/db.dist.sql" -o $DATA_ROOT/db.dist.sql; fi
- - save_cache:
- paths:
- - $DATA_ROOT
- key: *data_cache_key
- - persist_to_workspace:
- root: *workspace_root
- paths:
- - *data_dir
-
- # Check code style.
- code_style:
- <<: *container_config
- steps:
- - *step_common
- - *step_attach_workspace
+ # [/META]
- run:
- name: Lint code
- command: composer cs
-
- # Build.
- build:
- <<: *container_config
- steps:
- - *step_common
- - *step_attach_workspace
- - *step_system_binaries
- - *step_php_extensions
- - *step_symlink_data
- - run: composer build
- - *step_bootstrap_drupal
+ name: Pull newest Docker images.
+ command: composer docker:pull
- run:
- name: Store built DB as an artifact.
- command: $DRUSH --root=$WEB_ROOT sql-dump > .data/db.sql
- - persist_to_workspace:
- root: *workspace_root
- paths:
- - *data_dir
-
- # Install site from configuration.
- # [META] Test that the website can be installed from the configuration.
- test_site_install:
- <<: *container_config
- steps:
- - *step_attach_workspace
- - *step_common
- - *step_system_binaries
- - *step_php_extensions
- - *step_symlink_data
- - run: composer site-install
- - *step_bootstrap_drupal
-
- # Run tests in parallel.
- test_behat:
- <<: *container_config
- # Increase this value to run tests in parallel.
- parallelism: 2
- steps:
- - *step_common
- - *step_attach_workspace
- - *step_system_binaries
- - *step_php_extensions
- - *step_symlink_data
+ name: Start scontainers.
+ command: |
+ composer docker:start
+ sleep 10 # Wait for DB container to startup.
+ # Since app is being built inside of the containers without dev
+ # dependencies, but they will be installed later to run tests, and
+ # deployment code should not contain any dev dependencies, we have
+ # to store built codebase into workspace to later use it in 'deploy'
+ # job.
+ - run:
+ name: Copy built codebase into workspace for future deployment.
+ command: |
+ mkdir -p $WORKSPACE_DIR/$CODE_DIR
+ docker cp -L $(docker-compose ps -q cli):/app/. $WORKSPACE_DIR/code
- run:
- name: Import previously built DB
- command: $DRUSH @local.mysiteurl sql-cli < $CODE_ROOT/.data/db.sql
- - *step_bootstrap_drupal
+ name: Site setup.
+ command: |
+ composer app:import-db
+ composer docker:cli -- mkdir -p /app/screenshots
- run:
- name: Configure Apache
+ name: Install dev dependencies.
command: |
- echo "
-
- UseCanonicalName Off
- DocumentRoot $WEB_ROOT
- ServerName $SERVER
-
- Options FollowSymLinks
- AllowOverride All
- RewriteEngine On
- RewriteBase /
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule $WEB_ROOT/(.*)$ index.php/?q=$1 [L,QSA]
- Require all granted
-
- " > 000-default.conf
- sudo mv -f 000-default.conf /etc/apache2/sites-available/000-default.conf
- echo "ServerName $SERVER" | sudo tee /etc/apache2/conf-available/servername.conf
- sudo a2enconf servername
- sudo a2enmod rewrite && sudo a2enmod proxy_http && sudo service apache2 restart
- echo " $WEB_ROOT/info.php && curl -k -s -o info.html $WEB_URL/info.php && cat info.html | grep -aqoi "Build Date" && cat info.html && rm $WEB_ROOT/info.php && rm info.html;
+ composer docker:cli -- composer install --ansi
+ composer docker:cli -- npm install
- run:
- name: Start Chrome in the background
- command: google-chrome-stable --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222
- background: true
+ name: Lint code.
+ command: composer docker:cli -- composer app:cs
- run:
- name: Run Behat tests
- # Runs tests in parallel if there are more than 1 parallel node
- # running (set in 'parallelism' property above).
+ name: Run tests.
command: |
if [ "$CIRCLE_NODE_TOTAL" -gt "1" ] ; then
- composer test -- --tags=p$CIRCLE_NODE_INDEX || composer test -- --tags=p$CIRCLE_NODE_INDEX --rerun
+ composer docker:cli -- vendor/bin/behat --format=progress_fail --colors --profile=p$CIRCLE_NODE_INDEX || composer docker:cli -- vendor/bin/behat --format=progress_fail --colors --profile=p$CIRCLE_NODE_INDEX --rerun
else
- composer test || composer test -- --rerun
+ composer docker:cli -- vendor/bin/behat --format=progress_fail --colors || composer docker:cli -- vendor/bin/behat --format=progress_fail --colors --rerun
fi
+ - run:
+ name: Copy artifacts.
+ command: |
+ mkdir -p $ARTIFACTS_DIR/behat
+ docker cp $(docker-compose ps -q cli):/app/screenshots $ARTIFACTS_DIR/behat
- store_artifacts:
- path: *artifacts_root
+ path: *artifacts_dir
+
+ - run:
+ name: Copy built dev codebase into workspace.
+ command: |
+ mkdir -p $WORKSPACE_DIR/code-dev
+ docker cp -L $(docker-compose ps -q cli):/app/. $WORKSPACE_DIR/code-dev
+ - persist_to_workspace:
+ root: *workspace_dir
+ paths:
+ - code
+ - code-dev
# Deploy primary branches.
- # [META] Specify, $SHOULD_DEPLOY, $DEPLOY_REMOTE, $DEPLOY_USER_EMAIL, and
+ # [META]
+ # Specify, $SHOULD_DEPLOY, $DEPLOY_REMOTE, $DEPLOY_USER_EMAIL, and
# $DEPLOY_USER_NAME in "Environment Variables" section in CircleCI UI.
# Also, add private key of the user who is allowed to push to $DEPLOY_REMOTE
# under "SSH Permissions" in CircleCI UI.
- # Deploy feature branches.
- deploy_feature_branch:
+ # [/META]
+ deploy:
<<: *container_config
steps:
- - *step_common
- - *step_attach_workspace
+ - checkout
- *add_ssh_keys
- *step_configure_git
- - run: if [ \"$SHOULD_DEPLOY\" != \"\" ]; then composer deploy -- $DEPLOY_REMOTE --root=$CODE_ROOT --push; else echo "Skipping deployment"; fi
-
- deploy_tag:
- <<: *container_config
- steps:
- - *step_common
- *step_attach_workspace
- - *add_ssh_keys
- - *step_configure_git
- - run: if [ \"$SHOULD_DEPLOY\" != \"\" ]; then composer deploy -- $DEPLOY_REMOTE --root=$CODE_ROOT --push --branch=release/[tags:-]; else echo "Skipping deployment"; fi
+ - run:
+ name: Install dev dependencies.
+ command: |
+ composer install -n --ansi --prefer-dist
+ - run: cp -a .git $WORKSPACE_DIR/$CODE_DIR
+ - run:
+ name: Push artefact to remote repository
+ command: |
+ if [ \"$SHOULD_DEPLOY\" != \"\" ]; then
+ composer app:build-artefact -- $DEPLOY_REMOTE --root=/app --src=$WORKSPACE_DIR/$CODE_DIR --push --report=$ARTIFACTS_DIR/deployment_report.txt --no-cleanup
+ else
+ echo "Skipping deployment"
+ fi
+ - store_artifacts:
+ path: *artifacts_dir
- # [META] Tag deployment for drupal-dev itself. Remove the code below in
+ # [META]
+ # Deployment for drupal-dev itself. Remove the code below in
# your project.
- deploy_drupal_dev_tag:
+ deploy_drupal_dev:
<<: *container_config
steps:
- - *step_common
- - *step_attach_workspace
+ - checkout
- *add_ssh_keys
- *step_configure_git
- - run: if [ \"$SHOULD_DEPLOY\" != \"\" ]; then composer deploy -- $DEPLOY_REMOTE --root=$CODE_ROOT --push --branch=release/[tags:-]; else echo "Skipping deployment"; fi
+ - *step_attach_workspace
+ - run:
+ name: Install dev dependencies.
+ command: |
+ composer install -n --ansi --prefer-dist
+ - run: cp -a .git $WORKSPACE_DIR/$CODE_DIR
+ - run:
+ # @see https://github.com/integratedexperts/drupal-dev-destination
+ name: Push artefact to remote repository for drupal-dev.
+ command: |
+ if [ \"$SHOULD_DEPLOY_DRUPAL_DEV\" != \"\" ]; then
+ composer app:build-artefact -- $DEPLOY_REMOTE --root=/app --src=$WORKSPACE_DIR/$CODE_DIR --push --branch=release/[tags:-];
+ else
+ echo "Skipping deployment";
+ fi
+ # [/META]
workflows:
version: 2
main:
jobs:
- - code_dependencies
- - download_db
- - code_style:
- requires:
- - code_dependencies
- - build:
- requires:
- - code_dependencies
- - download_db
- - test_site_install:
- requires:
- - code_dependencies
- - test_behat:
+ - build
+ - deploy:
requires:
- build
- - deploy_feature_branch:
- requires:
- - test_behat
filters:
branches:
- only: /feature\/[a-zA-z0-9\-]+/
- - deploy_tag:
- requires:
- - test_behat
- filters:
- tags:
- only: /^[0-9]+\.[0-9]+\.[0-9]+$/
- branches:
- only: /master/
- # [META] Tag deployment for drupal-dev itself. Remove the code below in
+ only: /master|develop|ci.*|(release\/)?[0-9]+(\.[0-9]+)+(-rc[0-9]+)?|(hotfix\/)?[0-9]+(\.[0-9]+)+(-rc[0-9]+)?|feature\/[a-zA-z0-9\-\.\,]+/
+
+ # [META]
+ # Tag deployment for drupal-dev itself. Remove the code below in
# your project.
- - deploy_drupal_dev_tag:
+ - deploy_drupal_dev:
requires:
- - test_behat
+ - build
filters:
tags:
only: /^(?:7|8)\.x\-[0-9]+\.[0-9]+(?:[A-z\-])*$/
branches:
only: /^(?:7|8)\.x$/
+ # [/META]
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..b66c83c02
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,17 @@
+.circleci
+.git
+.idea
+*.md
+docker-compose*
+screenshots
+node_modules
+vendor
+docroot/sites/default/files
+
+# Ignore Drupal directories generated by Composer.
+drush/contrib/
+docroot/core
+docroot/modules/contrib
+docroot/themes/contrib
+docroot/profiles/contrib
+docroot/libraries
diff --git a/.env b/.env
new file mode 100644
index 000000000..09afd8840
--- /dev/null
+++ b/.env
@@ -0,0 +1,3 @@
+COMPOSE_FILE=docker-compose.yml:docker-compose.local.yml
+MYSQL_HOST=mariadb
+MYSQL_PORT=3306
diff --git a/.gitignore.artefact b/.gitignore.artefact
index 2d29f1d1e..7edd869a6 100644
--- a/.gitignore.artefact
+++ b/.gitignore.artefact
@@ -3,14 +3,23 @@
*.out
*.log
node_modules
-vendor
screenshots
.data
-.vagrant
-Vagrantfile
-.beetbox
-composer.lock
-package-lock.json
.circleci/config.yml
.sass-cache
*.css.map
+docker-compose*
+Dockerfile.*
+.env
+docker/*
+phpcs.xml
+phpunit.xml
+composer.json
+composer.lock
+package.json
+package-lock.json
+Gruntfile.js
+.sass-lint.yml
+.dockerignore
+.eslintrc.json
+behat.yml
diff --git a/Dockerfile.builder b/Dockerfile.builder
new file mode 100644
index 000000000..097f78d45
--- /dev/null
+++ b/Dockerfile.builder
@@ -0,0 +1,27 @@
+FROM amazeeio/php:7.1-cli-drupal
+
+ENV WEBROOT=docroot \
+ COMPOSER_ALLOW_SUPERUSER=1 \
+ COMPOSER_CACHE_DIR=/tmp/.composer/cache \
+ MYSQL_HOST=mariadb
+
+RUN apk update \
+ && apk del nodejs nodejs-current yarn \
+ && apk add nodejs-npm patch rsync --update-cache --repository http://dl-3.alpinelinux.org/alpine/v3.7/main/ \
+ && rm -rf /var/cache/apk/*
+
+ADD patches /app/patches
+ADD scripts /app/scripts
+
+COPY composer.json composer.lock /app/
+COPY package.json package-lock.json Gruntfile.js /app/
+
+RUN composer install --no-dev --optimize-autoloader --prefer-dist --ansi
+
+RUN npm install
+
+COPY . /app
+COPY .data/db.sql /tmp/.data/db.sql
+
+RUN npm run build
+RUN rm -rf /app/node_modules
diff --git a/Dockerfile.mariadb b/Dockerfile.mariadb
new file mode 100644
index 000000000..cba099678
--- /dev/null
+++ b/Dockerfile.mariadb
@@ -0,0 +1,7 @@
+FROM amazeeio/centos7-mariadb10-drupal
+
+USER root
+COPY docker/server.cnf /etc/my.cnf.d/server.cnf
+RUN fix-permissions /etc/my.cnf.d/
+
+USER mysql
diff --git a/Dockerfile.nginx b/Dockerfile.nginx
new file mode 100644
index 000000000..1ad2885d5
--- /dev/null
+++ b/Dockerfile.nginx
@@ -0,0 +1,11 @@
+ARG CLI_IMAGE
+FROM ${CLI_IMAGE:-builder} as builder
+
+FROM amazeeio/nginx-drupal
+
+ENV WEBROOT=docroot
+
+COPY docker/drupal.conf /etc/nginx/conf.d/app.conf
+RUN fix-permissions /etc/nginx
+
+COPY --from=builder /app /app
diff --git a/Dockerfile.php b/Dockerfile.php
new file mode 100644
index 000000000..f9287f2a3
--- /dev/null
+++ b/Dockerfile.php
@@ -0,0 +1,6 @@
+ARG CLI_IMAGE
+FROM ${CLI_IMAGE:-builder} as builder
+
+FROM amazeeio/php:7.1-fpm
+
+COPY --from=builder /app /app
diff --git a/README.md b/README.md
index 5d93962fa..d48ed0921 100644
--- a/README.md
+++ b/README.md
@@ -76,47 +76,48 @@ Drupal 7 implementation of MYSITE
3. Copy `db.sql` to `.data/db.sql`
4. `composer build`
-## Available commands
-- `build` - build project.
-- `rebuild` - cleanup code dependencies and rebuild site, skipping VM management.
-- `rebuild-full` - cleanup code dependencies, remove VM and rebuild the site.
-- `build-db` - re-import DB and run updates.
-- `build-theme` - build theme assets. Supports watching: `composer build-theme -- watch`.
-- `cleanup` - remove code dependencies, skipping VM management.
-- `cleanup-full` - remove code dependencies and remove VM.
+## Available composer commands
+Run each command as `composer `.
+
+### Application
+- `app:build` - start local development environment and build project.
+- `app:rebuild` - re-build project, removing and re-installing dependencies.
+- `app:rebuild-full` - cleanup code dependencies, remove VM and rebuild the site.
+- `app:import-db` - re-import DB and run updates.
+- `app:build-fed` - build theme assets. Supports watching: `composer build-theme -- watch`.
+- `app:cleanup` - remove and re-install dependencies.
+- `app:cleanup-full` - remove dependencies and docker images.
+- `app:login` - open a web browser login into build application.
+- `app:build-artefact` - build application artefact suitable for deployment in production environment.
+
+### Docker
+- `docker:start` - start environment.
+- `docker:stop` - stop environment preserving data.
+- `docker:restart` - restart environment.
+- `docker:destroy` - destroy environment.
+- `docker:pull` - pull latest images.
+- `docker:cli` - run command in CLI container.
+- `docker:logs` - show logs from docker compose run.
## Adding Drupal modules
+
`composer require drupal/module_name`
## Adding patches for drupal modules
-1. Add `title` and `url` to patch on drupal.org to the `patches` array in `composer.json`.
+
+1. Add `title` and `url` to patch on drupal.org to the `patches` array in `extra` section in `composer.json`.
```
-"repositories": [
- {
- "type": "package",
- "package": {
- "name": "myorg/patches",
- "version": "1.0.0",
- "type": "metapackage",
- "extra": {
+ "extra": {
"patches": {
- "drupal/persistent_update": [
- {
- "title": "Add an ability to bypass all persistent updates",
- "url": "https://www.drupal.org/files/issues/bypass-all-persistent-updates-2824493-3.patch"
+ "drupal/core": {
+ "Contextual links should not be added inside another link - https://www.drupal.org/node/2898875": "https://www.drupal.org/files/issues/contextual_links_should-2898875-3.patch"
}
- ]
- }
- }
+ }
}
- }
-]
```
-2. `composer rebuild`
-
-One caveat is that a removal of composer.lock may be required before step #2 as composer caches dependencies and patches may not be applied.
+2. `composer update --lock`
## Coding standards
PHP and JS code linting uses [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) with Drupal rules from [Coder](https://www.drupal.org/project/coder) module and additional local overrides in `phpcs.xml.dist` and `.eslintrc`.
@@ -130,7 +131,7 @@ Behat configuration uses multiple extensions:
- [Behat Progress Fail Output Extension](https://github.com/integratedexperts/behat-format-progress-fail) - Behat output formatter to show progress as TAP and fail messages inline. Useful to get feedback about failed tests while continuing test run.
- `FeatureContext` - Site-specific context with custom step definitions.
-## Automated builds (Continuous Integration)
+## Automated builds (Cont inuous Integration)
In software engineering, continuous integration (CI) is the practice of merging all developer working copies to a shared mainline several times a day.
Before feature changes can be merged into a shared mainline, a complete build must run and pass all tests on CI server.
@@ -148,6 +149,3 @@ If the build has inconsistent results (build fails in CI but passes locally), tr
### Test artifacts
Test artifacts (screenshots etc.) are available under 'Artifacts' tab in Circle CI UI.
-
-### All Selenium tests are suddenly broken
-Chromedriver (a binary used by Selenium to control Chrome browser) version must follow Chrome version. Currently, Chrome version is set to stable, so when there is an update of the major Chrome version, Chromedriver version needs to be updated as well. The following link contains information about currently available Chromedriver versions: http://chromedriver.storage.googleapis.com
diff --git a/behat.yml b/behat.yml
index 1b490344d..df4cbd9db 100644
--- a/behat.yml
+++ b/behat.yml
@@ -18,13 +18,13 @@ default:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
Behat\MinkExtension:
goutte: ~
- base_url: http://local.mysiteurl
+ base_url: http://nginx:8080
browser_name: chrome
- sessions:
- default:
- chrome:
- api_url: "http://local.mysiteurl:9222"
- javascript_session: default
+ selenium2:
+ wd_host: "http://selenium:4444/wd/hub"
+ capabilities: { "browser": "chrome", "version": "*", "marionette": true }
+ javascript_session: selenium2
+ files_path: %paths.base%/tests/test_data
# Provides integration with Drupal APIs.
Drupal\DrupalExtension:
blackbox: ~
@@ -46,3 +46,12 @@ default:
purge: false
# Show explicit fail information and continue the test run.
IntegratedExperts\BehatFormatProgressFail\FormatExtension: ~
+
+p0:
+ gherkin:
+ filters:
+ tags: "@p0&&~@skipped"
+p1:
+ gherkin:
+ filters:
+ tags: "@p1&&~@skipped"
diff --git a/composer.json b/composer.json
index 3a379b1fc..3a69cd970 100644
--- a/composer.json
+++ b/composer.json
@@ -8,10 +8,10 @@
"drupal-composer/drupal-scaffold": "^2.3",
"drupal/admin_toolbar": "^1.19",
"drupal/better_exposed_filters": "^3.0@alpha",
- "drupal/core": "^8.4"
+ "drupal/core": "^8.4",
+ "webflo/drupal-finder": "^1.0"
},
"require-dev": {
- "beet/box": "^0.8",
"behat/behat": "^3.3.1",
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
"dmore/behat-chrome-extension": "^1.1",
@@ -21,8 +21,7 @@
"drush/drush": "^8.1",
"integratedexperts/behat-format-progress-fail": "^0.2",
"integratedexperts/behat-screenshot": "0.7.0",
- "integratedexperts/robo-git-artefact": "^0.1",
- "mouf/nodejs-installer": "^1.0",
+ "integratedexperts/robo-git-artefact": "^0.2",
"phpunit/phpunit": "^5.7.19",
"symfony/filesystem": "^3.2.8"
},
@@ -53,61 +52,64 @@
}
},
"scripts": {
- "cs":[
+ "app:login": "@composer docker:cli -- drush uli -r /app/docroot -l http://mysite.docker.amazee.io/ | xargs open",
+ "app:cs": [
"phpcs --colors",
"npm run lint"
],
- "test": "behat --format=progress_fail --colors",
- "build": [
+ "app:test": "behat --format=progress_fail --colors",
+ "app:build": [
+ "@docker:start",
"@composer install -n --ansi --prefer-dist",
- "@_start-vm",
- "@build-db"
+ "@app:build-fed",
+ "@app:import-db"
],
- "rebuild": [
- "@cleanup",
- "@build"
+ "app:rebuild": [
+ "@app:cleanup",
+ "@app:build"
],
- "rebuild-full": [
- "@cleanup-full",
- "@build"
+ "app:rebuild-full": [
+ "@app:cleanup-full",
+ "@app:build"
],
- "build-db": [
- "drush @local.mysiteurl sql-drop -y",
- "drush @local.mysiteurl sql-cli < .data/db.dist.sql",
- "drush @local.mysiteurl en mysite_core -y",
- "drush @local.mysiteurl updb -y"
+ "app:import-db": [
+ "@composer docker:cli -- drush -r /app/docroot --debug sql-drop -y",
+ "@composer docker:cli -- bash -c \"drush sqlc -r /app/docroot < /tmp/.data/db.sql\"",
+ "@composer docker:cli -- drush -r /app/docroot en mysite_core -y",
+ "@composer docker:cli -- bash -c \"if [ -e /app/config/sync/*.yml ] ; then drush cim -r /app/docroot -y; fi\"",
+ "@composer docker:cli -- bash -c \"if [ -e /app/config/sync/*.yml ] ; then drush cim -r /app/docroot -y; fi\"",
+ "@composer docker:cli -- drush cr -r /app/docroot -y",
+ "@composer docker:cli -- bash -c \"if [ -e /app/config/sync/*.yml ] ; then drush cim -r /app/docroot -n 2>&1 | grep -q 'There are no changes to import.'; fi\""
],
- "build-fed": "npm run build",
- "build-fed-prod": "npm run build-prod",
- "cleanup": [
- "@_remove-docroot",
- "@_remove-dependencies"
+ "app:site-install": [
+ "@composer docker:cli -- drush -r /app/docroot si mysite_profile -y --account-name=admin --account-pass=admin install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL",
+ "@composer docker:cli -- drush cr -r /app/docroot -y"
],
- "cleanup-full": [
- "@cleanup",
- "@_remove-vm"
- ],
- "deploy": "robo --ansi --load-from $(pwd)/vendor/integratedexperts/robo-git-artefact/RoboFile.php artefact --gitignore=.gitignore.artefact",
- "_start-vm": "if [ $(command -v vagrant) ] ; then vagrant up; fi",
- "_remove-vm": [
- "vagrant destroy -f || true",
- "rm -Rf .vagrant",
- "rm -Rf .beetbox",
- "rm -Rf Vagrantfile"
+ "app:build-fed": [
+ "npm install",
+ "npm run build"
],
- "_remove-dependencies": [
+ "app:build-fed-prod": "npm run build-prod",
+ "app:cleanup": [
+ "chmod -Rf 777 docroot/sites/default",
+ "git ls-files --directory --other -i --exclude-from=.gitignore docroot|xargs rm -Rf",
"rm -Rf vendor",
"rm -Rf node_modules"
],
- "_remove-docroot": [
- "chmod -Rf 777 docroot/sites/default",
- "git ls-files --directory --other -i --exclude-from=.gitignore docroot|xargs rm -Rf"
- ],
- "site-install": [
- "drush @local.mysiteurl si mysite_profile -y install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL",
- "drush @local.mysiteurl cr -y"
+ "app:cleanup-full": [
+ "@app:cleanup",
+ "@docker:stop",
+ "@docker:destroy"
],
- "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
+ "app:build-artefact": "robo --ansi --load-from $(pwd)/vendor/integratedexperts/robo-git-artefact/RoboFile.php artefact --gitignore=.gitignore.artefact",
+ "app:create-settings": "Utilities\\composer\\DrupalSettings::create",
+ "docker:start": "docker-compose up -d --build",
+ "docker:restart": "docker-compose restart",
+ "docker:stop": "docker-compose stop",
+ "docker:destroy": "docker-compose down",
+ "docker:cli": "docker exec -i $(docker-compose ps -q cli)",
+ "docker:pull": "docker image ls --format \"{{.Repository}}:{{.Tag}}\" | grep amazeeio | grep -v none | xargs -n1 docker pull | cat",
+ "docker:logs": "docker-compose logs",
"pre-install-cmd": [
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
@@ -115,26 +117,15 @@
"DrupalProject\\composer\\ScriptHandler::checkComposerVersion"
],
"post-install-cmd": [
- "@drupal-scaffold",
+ "DrupalComposer\\DrupalScaffold\\Plugin::scaffold",
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
- "Utilities\\composer\\DrupalSettings::create",
- "npm install",
- "@build-fed"
+ "export $(cat .env | xargs) && composer app:create-settings"
],
"post-update-cmd": [
"DrupalProject\\composer\\ScriptHandler::createRequiredFiles"
]
},
"extra": {
- "beetbox": {
- "beet_domain": "local.mysiteurl",
- "beet_root": "{{ beet_base }}/docroot",
- "php_version": "7.1",
- "php_mysql_package": "php7.1-mysql",
- "php_packages_state": "latest",
- "php_install_recommends": "yes",
- "php_date_timezone": "Australia/Melbourne"
- },
"drupal-scaffold": {
"source": "http://cgit.drupalcode.org/drupal/plain/{path}?h={version}",
"includes": [
@@ -170,11 +161,6 @@
"docroot/sites/default/default.settings.local.php",
"docroot/sites/default/files"
],
- "mouf": {
- "nodejs": {
- "forceLocal": true
- }
- },
"patches": {
"drupal/core": {
"Contextual links should not be added inside another link - https://www.drupal.org/node/2898875": "https://www.drupal.org/files/issues/contextual_links_should-2898875-3.patch",
diff --git a/composer.lock b/composer.lock
index e3b620e19..473def5d5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "c77013a2d0c32fcd1562cd966fba2da7",
+ "content-hash": "a722a7536854d3c1dc83b37e8fd42f18",
"packages": [
{
"name": "asm89/stack-cors",
@@ -568,20 +568,20 @@
},
{
"name": "doctrine/inflector",
- "version": "v1.2.0",
+ "version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
- "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462"
+ "reference": "5527a48b7313d15261292c149e55e26eae771b0a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462",
- "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462",
+ "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a",
+ "reference": "5527a48b7313d15261292c149e55e26eae771b0a",
"shasum": ""
},
"require": {
- "php": "^7.0"
+ "php": "^7.1"
},
"require-dev": {
"phpunit/phpunit": "^6.2"
@@ -589,7 +589,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "1.3.x-dev"
}
},
"autoload": {
@@ -631,7 +631,7 @@
"singularize",
"string"
],
- "time": "2017-07-22T12:18:28+00:00"
+ "time": "2018-01-09T20:05:19+00:00"
},
{
"name": "doctrine/lexer",
@@ -753,7 +753,7 @@
},
"drupal": {
"version": "8.x-1.22",
- "datestamp": "1514888585",
+ "datestamp": "1515177697",
"security-coverage": {
"status": "covered",
"message": "Covered by Drupal's security advisory policy"
@@ -1784,16 +1784,16 @@
},
{
"name": "symfony/debug",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "543deab3ffff94402440b326fc94153bae2dfa7a"
+ "reference": "53f6af2805daf52a43b393b93d2f24925d35c937"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/543deab3ffff94402440b326fc94153bae2dfa7a",
- "reference": "543deab3ffff94402440b326fc94153bae2dfa7a",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/53f6af2805daf52a43b393b93d2f24925d35c937",
+ "reference": "53f6af2805daf52a43b393b93d2f24925d35c937",
"shasum": ""
},
"require": {
@@ -1836,7 +1836,7 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-12-12T08:27:14+00:00"
+ "time": "2018-01-18T22:16:57+00:00"
},
{
"name": "symfony/dependency-injection",
@@ -2099,16 +2099,16 @@
},
{
"name": "symfony/polyfill-iconv",
- "version": "v1.6.0",
+ "version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git",
- "reference": "7a84ccdb8c953ee274c96dd6bde778d873fc824a"
+ "reference": "bd515d8f392730c833bc1ba993a4f598da64fa5b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/7a84ccdb8c953ee274c96dd6bde778d873fc824a",
- "reference": "7a84ccdb8c953ee274c96dd6bde778d873fc824a",
+ "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/bd515d8f392730c833bc1ba993a4f598da64fa5b",
+ "reference": "bd515d8f392730c833bc1ba993a4f598da64fa5b",
"shasum": ""
},
"require": {
@@ -2120,7 +2120,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6-dev"
+ "dev-master": "1.7-dev"
}
},
"autoload": {
@@ -2154,20 +2154,20 @@
"portable",
"shim"
],
- "time": "2017-10-11T12:05:26+00:00"
+ "time": "2018-01-30T19:27:44+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.6.0",
+ "version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
+ "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
- "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
+ "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
"shasum": ""
},
"require": {
@@ -2179,7 +2179,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6-dev"
+ "dev-master": "1.7-dev"
}
},
"autoload": {
@@ -2213,7 +2213,7 @@
"portable",
"shim"
],
- "time": "2017-10-11T12:05:26+00:00"
+ "time": "2018-01-30T19:27:44+00:00"
},
{
"name": "symfony/process",
@@ -2734,18 +2734,55 @@
],
"time": "2017-09-27T18:06:46+00:00"
},
+ {
+ "name": "webflo/drupal-finder",
+ "version": "1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/webflo/drupal-finder.git",
+ "reference": "8a7886c575d6eaa67a425dceccc84e735c0b9637"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/webflo/drupal-finder/zipball/8a7886c575d6eaa67a425dceccc84e735c0b9637",
+ "reference": "8a7886c575d6eaa67a425dceccc84e735c0b9637",
+ "shasum": ""
+ },
+ "require-dev": {
+ "mikey179/vfsstream": "^1.6",
+ "phpunit/phpunit": "^4.8"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/DrupalFinder.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0+"
+ ],
+ "authors": [
+ {
+ "name": "Florian Weber",
+ "email": "florian@webflo.org"
+ }
+ ],
+ "description": "Helper class to locate a Drupal installation from a given path.",
+ "time": "2017-10-24T08:12:11+00:00"
+ },
{
"name": "zendframework/zend-diactoros",
- "version": "1.6.1",
+ "version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-diactoros.git",
- "reference": "c8664b92a6d5bc229e48b0923486c097e45a7877"
+ "reference": "ed6ce7e2105c400ca10277643a8327957c0384b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/c8664b92a6d5bc229e48b0923486c097e45a7877",
- "reference": "c8664b92a6d5bc229e48b0923486c097e45a7877",
+ "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/ed6ce7e2105c400ca10277643a8327957c0384b7",
+ "reference": "ed6ce7e2105c400ca10277643a8327957c0384b7",
"shasum": ""
},
"require": {
@@ -2764,8 +2801,8 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6-dev",
- "dev-develop": "1.7-dev"
+ "dev-master": "1.7.x-dev",
+ "dev-develop": "1.8.x-dev"
}
},
"autoload": {
@@ -2784,7 +2821,7 @@
"psr",
"psr-7"
],
- "time": "2017-10-12T15:24:51+00:00"
+ "time": "2018-01-04T18:21:48+00:00"
},
{
"name": "zendframework/zend-escaper",
@@ -3002,49 +3039,6 @@
],
"time": "2016-11-03T16:10:31+00:00"
},
- {
- "name": "beet/box",
- "version": "0.8.6",
- "source": {
- "type": "git",
- "url": "https://github.com/beetboxvm/beetbox.git",
- "reference": "3c1371325964057dc7969629fb5fad118ac6a275"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/beetboxvm/beetbox/zipball/3c1371325964057dc7969629fb5fad118ac6a275",
- "reference": "3c1371325964057dc7969629fb5fad118ac6a275",
- "shasum": ""
- },
- "require": {
- "composer-plugin-api": "^1.0"
- },
- "require-dev": {
- "composer/composer": "1.5.5",
- "consolidation/robo": "^1",
- "phpunit/phpunit": "6.5.4",
- "sensiolabs/security-checker": "^4.0"
- },
- "type": "composer-plugin",
- "extra": {
- "class": "Beet\\Box\\Plugin",
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Beet\\Box\\": "composer/src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "A pre-provisioned L*MP stack VM",
- "homepage": "https://github.com/beetboxvm/beetbox",
- "time": "2017-12-10T23:06:17+00:00"
- },
{
"name": "behat/behat",
"version": "v3.4.3",
@@ -4119,16 +4113,16 @@
},
{
"name": "dmore/chrome-mink-driver",
- "version": "2.6.0",
+ "version": "2.6.2",
"source": {
"type": "git",
"url": "https://gitlab.com/DMore/chrome-mink-driver.git",
- "reference": "2b1ebdcd80f0b4055fd25bccdc315f0363da74c8"
+ "reference": "42c5e61d570e3089eca08915d2e2720d81a3fe1b"
},
"dist": {
"type": "zip",
- "url": "https://gitlab.com/api/v4/projects/DMore%2Fchrome-mink-driver/repository/archive.zip?sha=2b1ebdcd80f0b4055fd25bccdc315f0363da74c8",
- "reference": "2b1ebdcd80f0b4055fd25bccdc315f0363da74c8",
+ "url": "https://gitlab.com/api/v4/projects/DMore%2Fchrome-mink-driver/repository/archive.zip?sha=42c5e61d570e3089eca08915d2e2720d81a3fe1b",
+ "reference": "42c5e61d570e3089eca08915d2e2720d81a3fe1b",
"shasum": ""
},
"require": {
@@ -4162,7 +4156,7 @@
}
],
"description": "Mink driver for controlling chrome without selenium",
- "time": "2018-01-04T13:48:43+00:00"
+ "time": "2018-01-31T21:51:21+00:00"
},
{
"name": "dnoegel/php-xdg-base-dir",
@@ -4284,16 +4278,16 @@
},
{
"name": "drupal/console",
- "version": "1.3.1",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/hechoendrupal/drupal-console.git",
- "reference": "3a4f666e6e92bc3e136926ebaac46f28ca760ad9"
+ "reference": "e468cbefc4f157644e4affcfae1a8198a30c87a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/hechoendrupal/drupal-console/zipball/3a4f666e6e92bc3e136926ebaac46f28ca760ad9",
- "reference": "3a4f666e6e92bc3e136926ebaac46f28ca760ad9",
+ "url": "https://api.github.com/repos/hechoendrupal/drupal-console/zipball/e468cbefc4f157644e4affcfae1a8198a30c87a1",
+ "reference": "e468cbefc4f157644e4affcfae1a8198a30c87a1",
"shasum": ""
},
"require": {
@@ -4301,7 +4295,7 @@
"composer/installers": "~1.0",
"doctrine/annotations": "^1.2",
"doctrine/collections": "^1.3",
- "drupal/console-core": "1.3.1",
+ "drupal/console-core": "1.5.0",
"drupal/console-dotenv": "~0",
"drupal/console-extend-plugin": "~0",
"gabordemooij/redbean": "~4.3",
@@ -4359,25 +4353,25 @@
"drupal",
"symfony"
],
- "time": "2017-12-05T17:05:31+00:00"
+ "time": "2018-01-11T19:47:57+00:00"
},
{
"name": "drupal/console-core",
- "version": "1.3.1",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/hechoendrupal/drupal-console-core.git",
- "reference": "1fe275d7eb8db716797356e76f33b09d9837c936"
+ "reference": "968b76e00011c3c0162e2df70ddc023b0daaa69b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/hechoendrupal/drupal-console-core/zipball/1fe275d7eb8db716797356e76f33b09d9837c936",
- "reference": "1fe275d7eb8db716797356e76f33b09d9837c936",
+ "url": "https://api.github.com/repos/hechoendrupal/drupal-console-core/zipball/968b76e00011c3c0162e2df70ddc023b0daaa69b",
+ "reference": "968b76e00011c3c0162e2df70ddc023b0daaa69b",
"shasum": ""
},
"require": {
"dflydev/dot-access-configuration": "^1.0",
- "drupal/console-en": "1.3.1",
+ "drupal/console-en": "1.5.0",
"php": "^5.5.9 || ^7.0",
"stecman/symfony-console-completion": "~0.7",
"symfony/config": "~2.8|~3.0",
@@ -4440,7 +4434,7 @@
"drupal",
"symfony"
],
- "time": "2017-12-05T16:51:46+00:00"
+ "time": "2018-01-11T19:30:16+00:00"
},
{
"name": "drupal/console-dotenv",
@@ -4483,16 +4477,16 @@
},
{
"name": "drupal/console-en",
- "version": "1.3.1",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/hechoendrupal/drupal-console-en.git",
- "reference": "86ce043f17368e6e1919f7de9555f72d2b39c2b5"
+ "reference": "85317ff8319b58c3a0295b4cb74221b7c3c7ddf4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/hechoendrupal/drupal-console-en/zipball/86ce043f17368e6e1919f7de9555f72d2b39c2b5",
- "reference": "86ce043f17368e6e1919f7de9555f72d2b39c2b5",
+ "url": "https://api.github.com/repos/hechoendrupal/drupal-console-en/zipball/85317ff8319b58c3a0295b4cb74221b7c3c7ddf4",
+ "reference": "85317ff8319b58c3a0295b4cb74221b7c3c7ddf4",
"shasum": ""
},
"type": "drupal-console-language",
@@ -4533,7 +4527,7 @@
"drupal",
"symfony"
],
- "time": "2017-12-05T09:39:38+00:00"
+ "time": "2018-01-11T18:09:24+00:00"
},
{
"name": "drupal/console-extend-plugin",
@@ -4636,16 +4630,16 @@
},
{
"name": "drupal/drupal-extension",
- "version": "v3.4.0",
+ "version": "v3.4.1",
"source": {
"type": "git",
"url": "https://github.com/jhedstrom/drupalextension.git",
- "reference": "5fb3c6957d477594253491d8dcfefd895e32c5b8"
+ "reference": "50ff0f413f0dc4732f49638e743f86f45e835e50"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/jhedstrom/drupalextension/zipball/5fb3c6957d477594253491d8dcfefd895e32c5b8",
- "reference": "5fb3c6957d477594253491d8dcfefd895e32c5b8",
+ "url": "https://api.github.com/repos/jhedstrom/drupalextension/zipball/50ff0f413f0dc4732f49638e743f86f45e835e50",
+ "reference": "50ff0f413f0dc4732f49638e743f86f45e835e50",
"shasum": ""
},
"require": {
@@ -4685,6 +4679,14 @@
{
"name": "Jonathan Hedstrom",
"email": "jhedstrom@gmail.com"
+ },
+ {
+ "name": "Melissa Anderson",
+ "homepage": "https://github.com/eliza411"
+ },
+ {
+ "name": "Pieter Frenssen",
+ "homepage": "https://github.com/pfrenssen"
}
],
"description": "Drupal extension for Behat",
@@ -4694,7 +4696,7 @@
"test",
"web"
],
- "time": "2017-11-17T21:06:21+00:00"
+ "time": "2017-12-06T20:35:40+00:00"
},
{
"name": "drush/drush",
@@ -5155,16 +5157,16 @@
},
{
"name": "integratedexperts/robo-git-artefact",
- "version": "0.1.4",
+ "version": "0.2.2",
"source": {
"type": "git",
"url": "https://github.com/integratedexperts/robo-git-artefact.git",
- "reference": "4c92ac0a6351108f1ada78d07fc959c042b0cfa6"
+ "reference": "e1ce035839a01967d7fe12da85263aa928810ff5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/integratedexperts/robo-git-artefact/zipball/4c92ac0a6351108f1ada78d07fc959c042b0cfa6",
- "reference": "4c92ac0a6351108f1ada78d07fc959c042b0cfa6",
+ "url": "https://api.github.com/repos/integratedexperts/robo-git-artefact/zipball/e1ce035839a01967d7fe12da85263aa928810ff5",
+ "reference": "e1ce035839a01967d7fe12da85263aa928810ff5",
"shasum": ""
},
"require": {
@@ -5194,7 +5196,7 @@
}
],
"description": "Robo task to push git artefact to remote repository",
- "time": "2017-10-28T02:22:59+00:00"
+ "time": "2017-11-10T04:35:27+00:00"
},
{
"name": "jakub-onderka/php-console-color",
@@ -5348,62 +5350,6 @@
],
"time": "2017-05-10T09:20:27+00:00"
},
- {
- "name": "mouf/nodejs-installer",
- "version": "v1.0.12",
- "source": {
- "type": "git",
- "url": "https://github.com/thecodingmachine/nodejs-installer.git",
- "reference": "8e995c32384c329593159ec924276364ae5f5071"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thecodingmachine/nodejs-installer/zipball/8e995c32384c329593159ec924276364ae5f5071",
- "reference": "8e995c32384c329593159ec924276364ae5f5071",
- "shasum": ""
- },
- "require": {
- "composer-plugin-api": "^1.0.0",
- "ext-openssl": "*",
- "php": ">=5.3.0"
- },
- "require-dev": {
- "composer/composer": "*"
- },
- "type": "composer-plugin",
- "extra": {
- "class": [
- "Mouf\\NodeJsInstaller\\NodeJsPlugin"
- ],
- "mouf": {
- "logo": "node-js.png"
- }
- },
- "autoload": {
- "psr-4": {
- "Mouf\\NodeJsInstaller\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "David NĂ©grier",
- "email": "d.negrier@thecodingmachine.com",
- "homepage": "http://mouf-php.com"
- }
- ],
- "description": "An installer package that let's you install NodeJS and NPM as a Composer dependency.",
- "homepage": "http://mouf-php.com/packages/mouf/nodejs-installer",
- "keywords": [
- "installer",
- "nodejs",
- "npm"
- ],
- "time": "2016-11-17T08:47:39+00:00"
- },
{
"name": "myclabs/deep-copy",
"version": "1.7.0",
@@ -5451,16 +5397,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v3.1.3",
+ "version": "v3.1.4",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "579f4ce846734a1cf55d6a531d00ca07a43e3cda"
+ "reference": "e57b3a09784f846411aa7ed664eedb73e3399078"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/579f4ce846734a1cf55d6a531d00ca07a43e3cda",
- "reference": "579f4ce846734a1cf55d6a531d00ca07a43e3cda",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/e57b3a09784f846411aa7ed664eedb73e3399078",
+ "reference": "e57b3a09784f846411aa7ed664eedb73e3399078",
"shasum": ""
},
"require": {
@@ -5498,20 +5444,20 @@
"parser",
"php"
],
- "time": "2017-12-26T14:43:21+00:00"
+ "time": "2018-01-25T21:31:33+00:00"
},
{
"name": "pear/console_table",
- "version": "v1.3.0",
+ "version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/pear/Console_Table.git",
- "reference": "64100b9ee81852f4fa17823e55d0b385a544f976"
+ "reference": "1930c11897ca61fd24b95f2f785e99e0f36dcdea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/pear/Console_Table/zipball/64100b9ee81852f4fa17823e55d0b385a544f976",
- "reference": "64100b9ee81852f4fa17823e55d0b385a544f976",
+ "url": "https://api.github.com/repos/pear/Console_Table/zipball/1930c11897ca61fd24b95f2f785e99e0f36dcdea",
+ "reference": "1930c11897ca61fd24b95f2f785e99e0f36dcdea",
"shasum": ""
},
"require": {
@@ -5553,7 +5499,7 @@
"keywords": [
"console"
],
- "time": "2016-01-21T16:14:31+00:00"
+ "time": "2018-01-25T20:47:17+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
@@ -5918,16 +5864,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "5.7.26",
+ "version": "5.7.27",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd"
+ "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd",
- "reference": "7fbc25c13309de0c4c9bb48b7361f1eca34c7fbd",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
+ "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
"shasum": ""
},
"require": {
@@ -5951,7 +5897,7 @@
"sebastian/global-state": "^1.1",
"sebastian/object-enumerator": "~2.0",
"sebastian/resource-operations": "~1.0",
- "sebastian/version": "~1.0.3|~2.0",
+ "sebastian/version": "^1.0.6|^2.0.1",
"symfony/yaml": "~2.1|~3.0|~4.0"
},
"conflict": {
@@ -5996,7 +5942,7 @@
"testing",
"xunit"
],
- "time": "2017-12-17T06:14:38+00:00"
+ "time": "2018-02-01T05:50:59+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -6910,16 +6856,16 @@
},
{
"name": "symfony/browser-kit",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "f761b4ecdd23a451c2cae6fba704d8b207cbb045"
+ "reference": "490f27762705c8489bd042fe3e9377a191dba9b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/f761b4ecdd23a451c2cae6fba704d8b207cbb045",
- "reference": "f761b4ecdd23a451c2cae6fba704d8b207cbb045",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/490f27762705c8489bd042fe3e9377a191dba9b4",
+ "reference": "490f27762705c8489bd042fe3e9377a191dba9b4",
"shasum": ""
},
"require": {
@@ -6963,20 +6909,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2017-12-11T22:06:16+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/cache",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
- "reference": "94ce2a457bfc720be2720767b97caf44ecac6c41"
+ "reference": "8dee9ec2c9824c3f4039960d679a6689ee1cbdc1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/cache/zipball/94ce2a457bfc720be2720767b97caf44ecac6c41",
- "reference": "94ce2a457bfc720be2720767b97caf44ecac6c41",
+ "url": "https://api.github.com/repos/symfony/cache/zipball/8dee9ec2c9824c3f4039960d679a6689ee1cbdc1",
+ "reference": "8dee9ec2c9824c3f4039960d679a6689ee1cbdc1",
"shasum": ""
},
"require": {
@@ -7033,7 +6979,7 @@
"caching",
"psr6"
],
- "time": "2017-12-08T16:11:27+00:00"
+ "time": "2018-01-18T22:16:57+00:00"
},
{
"name": "symfony/config",
@@ -7093,16 +7039,16 @@
},
{
"name": "symfony/css-selector",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "eac760b414cf1f64362c3dd047b989e4db121332"
+ "reference": "e66394bc7610e69279bfdb3ab11b4fe65403f556"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/eac760b414cf1f64362c3dd047b989e4db121332",
- "reference": "eac760b414cf1f64362c3dd047b989e4db121332",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/e66394bc7610e69279bfdb3ab11b4fe65403f556",
+ "reference": "e66394bc7610e69279bfdb3ab11b4fe65403f556",
"shasum": ""
},
"require": {
@@ -7142,20 +7088,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2017-12-14T19:40:10+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/dom-crawler",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "dc847845c66fa68ad4522ed27e62b9b9dd12ab3b"
+ "reference": "09bd97b844b3151fab82f2fdd62db9c464b3910a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/dc847845c66fa68ad4522ed27e62b9b9dd12ab3b",
- "reference": "dc847845c66fa68ad4522ed27e62b9b9dd12ab3b",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/09bd97b844b3151fab82f2fdd62db9c464b3910a",
+ "reference": "09bd97b844b3151fab82f2fdd62db9c464b3910a",
"shasum": ""
},
"require": {
@@ -7198,20 +7144,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2017-12-14T19:40:10+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/expression-language",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/expression-language.git",
- "reference": "c4b195436a74d9672d8463e4d427ca42449238e5"
+ "reference": "867e4d1f5d4e52435a8ffff6b24fd6a801582241"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/expression-language/zipball/c4b195436a74d9672d8463e4d427ca42449238e5",
- "reference": "c4b195436a74d9672d8463e4d427ca42449238e5",
+ "url": "https://api.github.com/repos/symfony/expression-language/zipball/867e4d1f5d4e52435a8ffff6b24fd6a801582241",
+ "reference": "867e4d1f5d4e52435a8ffff6b24fd6a801582241",
"shasum": ""
},
"require": {
@@ -7248,20 +7194,20 @@
],
"description": "Symfony ExpressionLanguage Component",
"homepage": "https://symfony.com",
- "time": "2017-12-08T15:24:53+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "25b135bea251829e3db6a77d773643408b575ed4"
+ "reference": "e078773ad6354af38169faf31c21df0f18ace03d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/25b135bea251829e3db6a77d773643408b575ed4",
- "reference": "25b135bea251829e3db6a77d773643408b575ed4",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/e078773ad6354af38169faf31c21df0f18ace03d",
+ "reference": "e078773ad6354af38169faf31c21df0f18ace03d",
"shasum": ""
},
"require": {
@@ -7297,20 +7243,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2017-12-14T19:40:10+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/finder",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a"
+ "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/dac8d7db537bac7ad8143eb11360a8c2231f251a",
- "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/613e26310776f49a1773b6737c6bd554b8bc8c6f",
+ "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f",
"shasum": ""
},
"require": {
@@ -7346,20 +7292,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2017-11-05T16:10:10+00:00"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/polyfill-apcu",
- "version": "v1.6.0",
+ "version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-apcu.git",
- "reference": "04f62674339602def515bff4bc6901fc1d4951e8"
+ "reference": "e8ae2136ddb53dea314df56fcd88e318ab936c00"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/04f62674339602def515bff4bc6901fc1d4951e8",
- "reference": "04f62674339602def515bff4bc6901fc1d4951e8",
+ "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/e8ae2136ddb53dea314df56fcd88e318ab936c00",
+ "reference": "e8ae2136ddb53dea314df56fcd88e318ab936c00",
"shasum": ""
},
"require": {
@@ -7368,7 +7314,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6-dev"
+ "dev-master": "1.7-dev"
}
},
"autoload": {
@@ -7402,20 +7348,20 @@
"portable",
"shim"
],
- "time": "2017-10-11T12:05:26+00:00"
+ "time": "2018-01-30T19:27:44+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v3.4.2",
+ "version": "v3.4.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "757074cf71b952ce9e75b557538948811c2bf006"
+ "reference": "472a9849930cf21f73abdb02240f17cf5b5bd1a7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/757074cf71b952ce9e75b557538948811c2bf006",
- "reference": "757074cf71b952ce9e75b557538948811c2bf006",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/472a9849930cf21f73abdb02240f17cf5b5bd1a7",
+ "reference": "472a9849930cf21f73abdb02240f17cf5b5bd1a7",
"shasum": ""
},
"require": {
@@ -7471,7 +7417,7 @@
"debug",
"dump"
],
- "time": "2017-12-11T22:06:16+00:00"
+ "time": "2018-01-29T09:03:43+00:00"
},
{
"name": "textalk/websocket",
@@ -7562,55 +7508,18 @@
],
"time": "2016-09-01T10:05:43+00:00"
},
- {
- "name": "webflo/drupal-finder",
- "version": "1.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/webflo/drupal-finder.git",
- "reference": "8a7886c575d6eaa67a425dceccc84e735c0b9637"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/webflo/drupal-finder/zipball/8a7886c575d6eaa67a425dceccc84e735c0b9637",
- "reference": "8a7886c575d6eaa67a425dceccc84e735c0b9637",
- "shasum": ""
- },
- "require-dev": {
- "mikey179/vfsstream": "^1.6",
- "phpunit/phpunit": "^4.8"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/DrupalFinder.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "GPL-2.0+"
- ],
- "authors": [
- {
- "name": "Florian Weber",
- "email": "florian@webflo.org"
- }
- ],
- "description": "Helper class to locate a Drupal installation from a given path.",
- "time": "2017-10-24T08:12:11+00:00"
- },
{
"name": "webmozart/assert",
- "version": "1.2.0",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f"
+ "reference": "0df1908962e7a3071564e857d86874dad1ef204a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f",
- "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a",
+ "reference": "0df1908962e7a3071564e857d86874dad1ef204a",
"shasum": ""
},
"require": {
@@ -7647,7 +7556,7 @@
"check",
"validate"
],
- "time": "2016-11-23T20:04:58+00:00"
+ "time": "2018-01-29T19:49:41+00:00"
},
{
"name": "webmozart/path-util",
diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml
new file mode 100644
index 000000000..5e097f469
--- /dev/null
+++ b/docker-compose.ci.yml
@@ -0,0 +1,21 @@
+version: '2'
+services:
+ cli:
+ environment:
+ LAGOON_ENVIRONMENT_TYPE: 'ci'
+ volumes:
+ - .:/app/docroot/sites/default/files
+ php:
+ environment:
+ LAGOON_ENVIRONMENT_TYPE: 'ci'
+ volumes:
+ - .:/app/docroot/sites/default/files
+ nginx:
+ environment:
+ LAGOON_ENVIRONMENT_TYPE: 'ci'
+ volumes:
+ - .:/app/docroot/sites/default/files
+ selenium:
+ image: selenium/standalone-chrome
+ depends_on:
+ - cli
diff --git a/docker-compose.local.yml b/docker-compose.local.yml
new file mode 100644
index 000000000..0ab5408c8
--- /dev/null
+++ b/docker-compose.local.yml
@@ -0,0 +1,36 @@
+version: '2'
+services:
+ cli:
+ volumes_from:
+ - container:amazeeio-ssh-agent
+ environment:
+ - SSH_AUTH_SOCK=/tmp/amazeeio_ssh-agent/socket
+ - LAGOON_ENVIRONMENT_TYPE=local
+ - XDEBUG_ENABLE=true
+ volumes:
+ - .:/app:delegated
+ nginx:
+ networks:
+ - amazeeio-network
+ environment:
+ - AMAZEEIO_URL=mysite.docker.amazee.io
+ - AMAZEEIO=AMAZEEIO
+ - AMAZEEIO_HTTP_PORT=8080
+ volumes:
+ - .:/app:delegated
+ php:
+ environment:
+ - LAGOON_ENVIRONMENT_TYPE=local
+ - XDEBUG_ENABLE=true
+ volumes:
+ - .:/app:delegated
+ mariadb:
+ ports:
+ - 13306:3306
+ selenium:
+ image: selenium/standalone-chrome
+ depends_on:
+ - cli
+networks:
+ amazeeio-network:
+ external: true
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 000000000..dc63fd149
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,47 @@
+version: '2'
+services:
+ cli:
+ build:
+ context: .
+ dockerfile: Dockerfile.builder
+ image: builder
+ labels:
+ lagoon.type: cli-persistent
+ lagoon.persistent: /app/docroot/sites/default/files/
+ lagoon.persistent.name: nginx-php
+ nginx:
+ build:
+ context: .
+ dockerfile: Dockerfile.nginx
+ networks:
+ - default
+ labels:
+ lagoon.type: nginx-php-persistent
+ lagoon.persistent: /app/docroot/sites/default/files/
+ lagoon.persistent.class: slow
+ lagoon.name: nginx-php
+ depends_on:
+ - cli
+ expose:
+ - "8080"
+ php:
+ build:
+ context: .
+ dockerfile: Dockerfile.php
+ labels:
+ lagoon.type: nginx-php-persistent
+ lagoon.persistent: /app/docroot/sites/default/files/
+ lagoon.persistent.class: slow
+ lagoon.name: nginx-php
+ depends_on:
+ - cli
+ mariadb:
+ build:
+ context: .
+ dockerfile: Dockerfile.mariadb
+ labels:
+ lagoon.type: mariadb
+ redis:
+ image: amazeeio/redis
+ labels:
+ lagoon.type: redis
diff --git a/docker/drupal.conf b/docker/drupal.conf
new file mode 100644
index 000000000..103535968
--- /dev/null
+++ b/docker/drupal.conf
@@ -0,0 +1,163 @@
+### Nginx configuration for Drupal 7 and 8.
+server {
+ include /etc/nginx/conf.d/drupal/server_prepend*.conf;
+
+ listen ${NGINX_LISTEN:-8080} default_server;
+
+ include /etc/nginx/helpers/*.conf;
+
+ root /app/${WEBROOT:-};
+ index index.php;
+
+ ## Redirects.
+ location ~* ^/victorias-governor/publications/speeches/speech {
+ return 301 /victorias-governor/speeches;
+ }
+
+ location ~* ^/__ca25786a0082ee3b.nsf/webviceregal {
+ return 301 /victorias-governor/governors-program;
+ }
+
+ location ~* ^/__4a25671b00145208.nsf/webviceregal {
+ return 301 /victorias-governor/governors-program;
+ }
+
+ location ~* ^/government-house/house-a-grounds/the-garden-a-grounds {
+ return 301 /history/government-house-garden-and-grounds;
+ }
+
+ ## rewriting /index.php to / because after https://www.drupal.org/node/2599326
+ ## autocomplete URLs are forced to go to index.php
+ rewrite ^/index.php / last;
+
+ ## The 'default' location.
+ location / {
+ include /etc/nginx/conf.d/drupal/location_prepend*.conf;
+
+ ## Replicate the Apache directive of Drupal standard
+ ## .htaccess. Disable access to any code files. Return a 404 to curtail
+ ## information disclosure. Hide also the text files.
+ location ~* ^(?:.+\.(?:htaccess|make|txt|yml|md|engine|inc|info|install|module|profile|po|pot|sh|.*sql|test|theme|tpl|xtmpl)|code-style\.pl)$ {
+ deny all;
+ access_log off;
+ log_not_found off;
+ }
+
+ ## Expiring per default for four weeks and one second, Drupal will overwrite that if necessary
+ expires 2628001s;
+
+ ## Disallow access to any dot files, but send the request to Drupal
+ location ~* /\. {
+ try_files /dev/null @drupal;
+ }
+
+ ### Directives for installing drupal.
+ location ~* ^(/install.php|/core/install.php) {
+ try_files /dev/null @php;
+ }
+
+ ## Direct Access to .php files is not alled and is sent to Drupal instead
+ location ~* ^.+\.php$ {
+ try_files /dev/null @drupal;
+ }
+
+ ## Try to find a file with given URL, if not pass to Drupal
+ try_files $uri @drupal;
+
+ include /etc/nginx/conf.d/drupal/location_append*.conf;
+ }
+
+ ## Main Drupal Location
+ location @drupal {
+ include /etc/nginx/conf.d/drupal/location_drupal_prepend*.conf;
+
+ include /etc/nginx/fastcgi.conf;
+ fastcgi_param SCRIPT_NAME /index.php;
+ fastcgi_param SCRIPT_FILENAME $realpath_root/index.php;
+ fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000;
+ fastcgi_buffers 16 16k;
+ fastcgi_buffer_size 32k;
+
+ include /etc/nginx/conf.d/drupal/location_drupal_append*.conf;
+ }
+
+ ## PHP Location.
+ ## Warning: This allows to execute any PHP files, use with care!
+ location @php {
+ include /etc/nginx/conf.d/drupal/location_php_prepend*.conf;
+
+ include /etc/nginx/fastcgi.conf;
+ fastcgi_pass ${NGINX_FASTCGI_PASS:-php}:9000;
+
+ include /etc/nginx/conf.d/drupal/location_php_append*.conf;
+ }
+
+ ## Trying to access private files directly returns a 404.
+ location /sites/default/files/private/ {
+ internal;
+ }
+
+ ## Disallow access to patches directory.
+ location ^~ /patches {
+ deny all;
+ access_log off;
+ log_not_found off;
+ }
+
+ ## Disallow access to backup directory.
+ location ^~ /backup {
+ deny all;
+ access_log off;
+ log_not_found off;
+ }
+
+ ## Disallow access to vagrant directory.
+ location ^~ /vagrant {
+ deny all;
+ access_log off;
+ log_not_found off;
+ }
+
+ ## Disallow access to /core/vendor.
+ location ^~ /core/vendor {
+ deny all;
+ access_log off;
+ log_not_found off;
+ }
+
+ ## Disallow access to /vendor.
+ location ^~ /vendor {
+ deny all;
+ access_log off;
+ log_not_found off;
+ }
+
+ ## Support for the robotstxt module
+ ## http://drupal.org/project/robotstxt.
+ location = /robots.txt {
+ access_log off;
+ try_files $uri @drupal;
+ }
+
+ ## Add support for the humanstxt module
+ ## http://drupal.org/project/humanstxt.
+ location = /humans.txt {
+ access_log off;
+ try_files $uri @drupal;
+ }
+
+ ## Support for favicon. Return an 1x1 transparent GIF if it doesn't
+ ## exist.
+ location = /favicon.ico {
+ expires 30d;
+ try_files /favicon.ico @empty;
+ }
+
+ ## Return an in memory 1x1 transparent GIF.
+ location @empty {
+ expires 30d;
+ empty_gif;
+ }
+
+ include /etc/nginx/conf.d/drupal/server_append*.conf;
+}
diff --git a/docker/server.cnf b/docker/server.cnf
new file mode 100644
index 000000000..9ec5156fc
--- /dev/null
+++ b/docker/server.cnf
@@ -0,0 +1,34 @@
+[mysqld]
+character_set_server = utf8
+collation_server = utf8_bin
+expire_logs_days = 10
+ignore_db_dirs= lost+found
+innodb_buffer_pool_size = ${MARIADB_INNODB_BUFFER_POOL_SIZE:-256M}
+innodb_file_format = Barracuda
+innodb_file_per_table = false
+innodb_large_prefix = 1
+innodb_log_buffer_size = 32M
+innodb_log_file_size = 100M
+join_buffer_size = 2M
+key_buffer_size = 16M
+max_allowed_packet = 64M
+max_binlog_size = 100M
+max_connections = 400
+max_heap_table_size = 512M
+myisam-recover-options = BACKUP
+query_cache_limit = 1M
+query_cache_size = 128M
+skip-external-locking
+skip_name_resolve = 1
+slow_query_log = 1
+slow_query_log_file = /var/log/mysql-slow.log
+table_open_cache = 200000
+thread_cache_size = 8
+thread_stack = 256K
+tmp_table_size = 512M
+tmpdir = /tmp
+transaction-isolation = READ-COMMITTED
+socket = /tmp/mysql.sock
+
+[isamchk]
+key_buffer_size = 16M
\ No newline at end of file
diff --git a/docroot/sites/default/settings.php b/docroot/sites/default/settings.php
index f3a5446ef..05f275060 100644
--- a/docroot/sites/default/settings.php
+++ b/docroot/sites/default/settings.php
@@ -88,9 +88,9 @@
}
}
-// Include generated beetbox settings file, if available.
-if (file_exists($app_root . '/' . $site_path . '/settings.beetbox.php')) {
- include $app_root . '/' . $site_path . '/settings.beetbox.php';
+// Include generated settings file, if available.
+if (file_exists($app_root . '/' . $site_path . '/settings.generated.php')) {
+ include $app_root . '/' . $site_path . '/settings.generated.php';
}
/**
diff --git a/patches/.gitkeep b/patches/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/phpcs.xml.dist b/phpcs.xml
similarity index 100%
rename from phpcs.xml.dist
rename to phpcs.xml
diff --git a/phpunit.xml.dist b/phpunit.xml
similarity index 100%
rename from phpunit.xml.dist
rename to phpunit.xml
diff --git a/scripts/composer/DrupalSettings.php b/scripts/composer/DrupalSettings.php
index 3ba10ebce..eebf559f3 100644
--- a/scripts/composer/DrupalSettings.php
+++ b/scripts/composer/DrupalSettings.php
@@ -15,13 +15,13 @@ class DrupalSettings {
*/
public static function create(Event $event) {
$defaults = [
- 'mysql_database' => 'beetbox',
- 'mysql_user' => 'beetbox',
- 'mysql_password' => 'beetbox',
+ 'mysql_database' => 'drupal',
+ 'mysql_user' => 'drupal',
+ 'mysql_password' => 'drupal',
'mysql_host' => 'localhost',
'mysql_port' => '',
'mysql_prefix' => '',
- 'settings_path' => 'docroot/sites/default/settings.beetbox.php',
+ 'settings_path' => 'docroot/sites/default/settings.generated.php',
];
$options = self::extractEnvironmentVariables(array_keys($defaults))
@@ -30,8 +30,10 @@ public static function create(Event $event) {
$fs = new Filesystem();
if (!$fs->exists($options['settings_path'])) {
- $fs->dumpFile($options['settings_path'], self::getDefaultDrupalSettingsContent($options));
- $event->getIO()->write(sprintf('Created file %s', $options['settings_path']));
+ $content = self::getDefaultDrupalSettingsContent($options);
+ $fs->dumpFile($options['settings_path'], $content);
+ $fs->chmod($options['settings_path'], 0666);
+ $event->getIO()->write(sprintf('Created file %s', $options['settings_path'] . PHP_EOL . $content));
}
else {
$event->getIO()->write('Skipping creation of Drupal settings file - file already exists');
@@ -43,7 +45,7 @@ public static function create(Event $event) {
*/
public static function delete(Event $event) {
$defaults = [
- 'settings_path' => 'docroot/sites/default/settings.beetbox.php',
+ 'settings_path' => 'docroot/sites/default/settings.generated.php',
];
$options = self::extractEnvironmentVariables(array_keys($defaults))
@@ -69,7 +71,7 @@ protected static function getDefaultDrupalSettingsContent($options) {
/**
* @file
- * Beetbox settings.
+ * Generated settings.
*
* Do not modify this file if you need to override default settings.
*/
diff --git a/scripts/xdebug-cli.sh b/scripts/xdebug-cli.sh
index 626c04a34..fbf4950ce 100644
--- a/scripts/xdebug-cli.sh
+++ b/scripts/xdebug-cli.sh
@@ -6,15 +6,15 @@
# disabling it by simply re-ssh'ing into the VM.
#
# Usage (from within the VM):
-# . scripts/xdebug-cli.sh local.mysiteurl
-# where local.mysiteurl is a server name and URL mapping in PHPStorm.
+# . scripts/xdebug-cli.sh mysite.docker.amazee.io
+# where mysite.docker.amazee.io is a server name and URL mapping in PHPStorm.
# IDE key as set in PHPStorm's server configuration.
IDEKEY=PHPSTORM
# Host OS' IP address.
REMOTE_HOST=$(netstat -rn | grep "^0.0.0.0 " | cut -d " " -f10)
# Default server name.
-SERVER_NAME="local.mysiteurl"
+SERVER_NAME="mysite.docker.amazee.io"
# Pass server name as a first parameter as set in PHPStorm's server
# configuration.