Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions chain/chain-grunt.yml

This file was deleted.

8 changes: 0 additions & 8 deletions chain/chain-npm.yml

This file was deleted.

5 changes: 3 additions & 2 deletions chain/chain-site-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Usage: drupal site:build --placeholder="name:subscriptions"
# Usage: drupal site:build --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
command:
name: site:build
description: 'Performs multiple commands to build a site'
description: 'Builds a new site.'
commands:
# Checkout site
- command: site:checkout
Expand All @@ -14,3 +14,4 @@ commands:
options:
placeholder:
- 'name:%{{name}}'
- 'root:%{{root|\/vagrant\/repos}}'
17 changes: 17 additions & 0 deletions chain/chain-site-compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Usage: drupal site:compile --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
command:
name: site:compile
description: 'Compiles the source, downloading and extracting the packages.'
commands:
# Run composer
- command: site:compose
arguments:
name: '%{{name}}'
# Run npm
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; find . -type d \( -name node_modules -o -name contrib -o -path ./core \) -prune -o -name package.json -execdir sh -c "npm install" \;'
# Run grunt
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; find . -type d \( -name node_modules -o -name contrib -o -path ./core \) -prune -o -name Gruntfile.js -execdir sh -c "grunt" \;'
17 changes: 17 additions & 0 deletions chain/chain-site-configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Usage: drupal site:configure --placeholder="name:subscriptions"
command:
name: site:configure
description: 'Generates the necessary configuration files.'
commands:
# Create settings.db.php
- command: site:settings:db
arguments:
name: '%{{name}}'
# Create settings.local.php
- command: site:settings:local
arguments:
name: '%{{name}}'
# Create settings.memcache.php
- command: site:settings:memcache
arguments:
name: '%{{name}}'
25 changes: 25 additions & 0 deletions chain/chain-site-construct.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Usage: drupal site:construct --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
command:
name: site:construct
description: 'Sets the site up based on current configuration and database.'
commands:
# Clear cache
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cr;'
# Set default drush alias
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush site-set @vm;'
# Run db updates
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush updb -y;'
# Import configuration twice to fix a problem with config import when new modules are added to core.extensions.yml
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cim -y; drush cim -y'
# Clear cache
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cr;'
17 changes: 17 additions & 0 deletions chain/chain-site-rebuild-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Usage: drupal site:rebuild:prod --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
command:
name: site:rebuild:prod
description: 'Peforms necessary steps to build the site from a given source.'
commands:
# Compile the packages.
- command: site:compile
options:
placeholder:
- 'name:%{{name}}'
- 'root:%{{root|\/vagrant\/repos}}'
# Build the site based on existing setup.
- command: site:construct
options:
placeholder:
- 'name:%{{name}}'
- 'root:%{{root|\/vagrant\/repos}}'
63 changes: 13 additions & 50 deletions chain/chain-site-rebuild.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,26 @@
# Usage: drupal site:rebuild --placeholder="name:subscriptions"
# Usage: drupal site:rebuild --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
command:
name: site:rebuild
description: 'Performs multiple commands to build a site (without git checkout)'
description: 'Peforms necessary steps to build the site from a given source.'
commands:
# Run composer
- command: site:compose
arguments:
name: '%{{name}}'
# Run npm
- command: site:npm
# Compile the packages.
- command: site:compile
options:
placeholder:
- 'name:%{{name}}'
# Run grunt
- command: site:grunt
- 'root:%{{root|\/vagrant\/repos}}'
# Generate the settings.
- command: site:configure
options:
placeholder:
- 'name:%{{name}}'
# Create settings.db.php
- command: site:settings:db
arguments:
name: '%{{name}}'
# Create settings.local.php
- command: site:settings:local
arguments:
name: '%{{name}}'
# Create phpunit.xml
- command: site:phpunit:setup
arguments:
name: '%{{name}}'
# Create behat.yml
- command: site:behat:setup
arguments:
name: '%{{name}}'
# Create settings.memcache.php
- command: site:settings:memcache
arguments:
name: '%{{name}}'
# Imports db or installs a site
- command: site:db:import
arguments:
name: '%{{name}}'
# Clear cache
- command: exec
arguments:
bin: 'cd /vagrant/repos/%{{name}}/web; drush cr;'
# Set default drush alias
- command: exec
arguments:
bin: 'cd /vagrant/repos/%{{name}}/web; drush site-set @vm;'
# Run db updates
- command: exec
arguments:
bin: 'cd /vagrant/repos/%{{name}}/web; drush updb -y;'
# Import configuration twice to fix a problem with config import when new modules are added to core.extensions.yml
- command: exec
arguments:
bin: 'cd /vagrant/repos/%{{name}}/web; drush cim -y;drush cim -y'
# Clear cache
- command: exec
arguments:
bin: 'cd /vagrant/repos/%{{name}}/web; drush cr;'
# Build the site based on existing setup.
- command: site:construct
options:
placeholder:
- 'name:%{{name}}'
- 'root:%{{root|\/vagrant\/repos}}'
21 changes: 21 additions & 0 deletions chain/chain-site-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Usage: drupal site:test --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
command:
name: site:test
description: 'Sets the test suites up and then runs them.'
commands:
# Create phpunit.xml
- command: site:phpunit:setup
arguments:
name: '%{{name}}'
# Create behat.yml
- command: site:behat:setup
arguments:
name: '%{{name}}'
# Run Behat
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/tests; ./behat;'
# Run phpunit
- command: exec
arguments:
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}; phpunit;'