Skip to content

Commit 5342c7b

Browse files
author
Tasha Harrison
committed
Case 27689; updated aite:ci and site:qa chains, readme and site:update
1 parent 66d849e commit 5342c7b

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ e.g. https://github.com/raw/dennisinteractive/drupal_console_commands
2323
- drupal **site:compose** *site-name*
2424
Runs *composer*
2525

26-
- drupal **site:npm** **site:new**
27-
Runs NPM
26+
- drupal **site:npm**
27+
Runs NPM
2828

29-
- drupal **site:grunt** **site:new**
30-
Runs Grunt
29+
- drupal **site:grunt**
30+
Runs Grunt
3131

3232
- drupal **site:settings:db** *site-name*
3333
Creates *settings.db.php* in the *web/sites/default* folder. This file contains DB credentials and should not be committed.
@@ -52,6 +52,21 @@ e.g. https://github.com/raw/dennisinteractive/drupal_console_commands
5252
The command will copy the dump from the original place to */tmp*. If you run the command again, it will only copy the file once the original has changed. This is very useful when working remotely on slow networks.
5353
If no db-dump information is available or there is no dump at the location, it will run a site install.
5454
Supported extensions: **.sql**, **.sql.gz**.
55+
56+
- drupal **site:update** *site-name*
57+
Used to run updates and import configuration
58+
- drush site-set @site (Set default drush alias)
59+
- drush sset system.maintenance_mode 1 (Enable maintenance mode)
60+
- drush cr (Clear caches)
61+
- drush updb -y (Runs updates)
62+
- drush cim -y; drush cim -y (Import configuration - twice to fix a problem with config import when new modules are added to core.extensions.yml)
63+
- drush sset system.maintenance_mode 0 (Disable maintenance mode)
64+
- drush cr (Clear caches)
65+
66+
- drupal **site:test** *site-name*
67+
Runs test suites
68+
- ./behat %s' (Runs behat tests)
69+
- ./vendor/bin/phpunit (Runs phpunit tests)
5570

5671
## Chains
5772
Chains that can be reused on various environments
@@ -62,23 +77,10 @@ Chains that can be reused on various environments
6277
- site:settings:memcache
6378
- site:drush:alias
6479

65-
- drupal **site:update** Used to run updates and import configuration
66-
- drush site-set @site (Set default drush alias)
67-
- drush sset system.maintenance_mode 1 (Enable maintenance mode)
68-
- drush cr (Clear caches)
69-
- drush updb -y (Runs updates)
70-
- drush sset system.maintenance_mode 0 (Disable maintenance mode)
71-
- drush cr (Clear caches)
72-
7380
- drupal **site:test:setup** Sets the test suites
7481
- site:phpunit:setup
7582
- site:behat:setup
7683

77-
- drupal **site:test** Runs test suites
78-
- site:test:setup
79-
- ./behat %s' (Runs behat tests)
80-
- ./vendor/bin/phpunit (Runs phpunit tests)
81-
8284
## Environment specific chains
8385
Each environment will have its own chain that executes the relevant commands and chains
8486

@@ -94,7 +96,7 @@ Each environment will have its own chain that executes the relevant commands and
9496
- site:configure (chain)
9597
- site:test:setup (chain)
9698
- site:db:import
97-
- site:update (chain)
99+
- site:update
98100

99101
### Artifact
100102
- drupal **site:build** Builds a site for artifacts
@@ -109,23 +111,23 @@ Each environment will have its own chain that executes the relevant commands and
109111
### CI
110112
- drupal **site:build:ci** Builds a site for CI
111113
- site:db:import
112-
- site:update (chain)
113-
- site:test (chain)
114+
- site:update
115+
- site:test
114116

115117
### QA
116118
- drupal **site:build:qa** Builds a site for QA
117119
- site:db:import
118-
- site:update (chain)
119-
- site:test (chain)
120+
- site:update
121+
- site:test
120122

121123
### Staging
122124
- drupal **site:build:staging** Builds a site for Staging
123125
- site:db:import
124-
- site:update (chain)
126+
- site:update
125127

126128
### Production
127129
- drupal **site:build:prod** Runs updates on production
128-
- site:update (chain)
130+
- site:update
129131

130132
## Useful arguments and options
131133
- **-h** Show all the available arguments and options

chain/chain-site-build-ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ commands:
1313
name: '%{{name}}'
1414
# Run tests.
1515
- command: site:test
16-
options:
17-
placeholder:
18-
- 'name:%{{name}}'
19-
- 'tags:%{{tags|-n}}'
16+
arguments:
17+
name: '%{{name}}'
18+
tags: '%{{tags|-n}}'

chain/chain-site-build-qa.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ commands:
1010
# Run updates.
1111
- command: site:update
1212
arguments:
13-
name: '%{{name}}'
13+
name: '%{{name}}'
1414
# Run tests.
1515
- command: site:test
16-
options:
17-
placeholder:
18-
- 'name:%{{name}}'
19-
- 'tags:%{{tags|-n}}'
16+
arguments:
17+
name: '%{{name}}'
18+
tags: '%{{tags|-n}}'

src/Command/SiteUpdateCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ protected function execute(InputInterface $input, OutputInterface $output) {
5050

5151
$command = sprintf(
5252
'cd %sweb; drush site-set @site; drush sset system.maintenance_mode 1;
53-
drush cr; drush updb -y; drush sset system.maintenance_mode 0;
54-
drush cr;',
53+
drush cr; drush updb -y; drush cim -y; drush cim -y;
54+
drush sset system.maintenance_mode 0; drush cr;',
5555
$this->shellPath($this->destination)
5656
);
5757

0 commit comments

Comments
 (0)