This repository was archived by the owner on Nov 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.test.xml
More file actions
202 lines (184 loc) · 8.02 KB
/
Copy pathbuild.test.xml
File metadata and controls
202 lines (184 loc) · 8.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<?xml version="1.0" encoding="UTF-8" ?>
<project name="My Subsite" default="help">
<!-- Install the subsite. -->
<target name="install" description="Install the subsite.">
<!--
Ensure the settings folder is writable so the installer can create
the settings.php file.
-->
<chmod mode="0755" failonerror="false" verbose="false" quiet="true">
<fileset dir="${platform.build.settings.dir}" />
</chmod>
<drush
command="site-install"
assume="yes"
root="${platform.build.dir}"
bin="${drush.bin}"
verbose="${drush.verbose}">
<option name="db-url" value="${drupal.db.url}" />
<option name="site-name" value="'${subsite.name}'" />
<option name="account-name" value="${drupal.admin.username}" />
<option name="account-pass" value="${drupal.admin.password}" />
<option name="account-mail" value="${drupal.admin.email}" />
<param>${platform.profile.name}</param>
<!-- Prevent e-mails from being sent during the installation. -->
<param>install_configure_form.update_status_module='array(FALSE,FALSE)'</param>
</drush>
<phingcall target="enable-install-modules" />
<!-- Allow subsites to run their own steps -->
<phingcall target="install-custom" />
<!-- Rebuild node access after Subsites modules activation -->
<phingcall target="rebuild-node-access" />
</target>
<!-- Enable required modules after installation of the profile. -->
<target name="enable-install-modules">
<phingcall target="enable-modules">
<property name="drupal.modules" value="${subsite.install.modules}" />
</phingcall>
</target>
<!-- Enable development modules. -->
<target name="enable-development-modules">
<phingcall target="enable-modules">
<property name="drupal.modules" value="${development.modules.enable}" />
</phingcall>
</target>
<!-- Enable modules. -->
<target name="enable-modules">
<drush
command="pm-enable"
assume="yes"
root="${platform.build.dir}"
bin="${drush.bin}"
verbose="${drush.verbose}">
<param>${drupal.modules}</param>
</drush>
</target>
<!-- Set up PHP CodeSniffer. -->
<target name="setup-php-codesniffer" description="Generate the configuration file for PHP CodeSniffer.">
<if>
<available file="${phpcs.config}" type="file" property="phpcs.config.available" />
<then>
<echo message="Deleting existing PHP Codesniffer default configuration file." />
<delete file="${phpcs.config}" failonerror="false" />
</then>
</if>
<if>
<available file="${phpcs.global.config}" type="file" property="phpcs.global.config.available" />
<then>
<echo message="Deleting existing PHP Codesniffer global configuration file." />
<delete file="${phpcs.global.config}" failonerror="false" />
</then>
</if>
<phpcodesnifferconfiguration
configFile="${phpcs.config}"
extensions="${phpcs.extensions}"
files="${phpcs.files}"
globalConfig="${phpcs.global.config}"
ignorePatterns="${phpcs.ignore}"
report="${phpcs.report}"
showProgress="${phpcs.progress}"
showSniffCodes="${phpcs.sniffcodes}"
standard="${phpcs.standard}"
/>
<!-- Set up the git pre-push hook. -->
<phingcall target="disable-pre-push"/>
<if>
<equals arg1="${phpcs.prepush.enable}" arg2="1" />
<then>
<symlink link="${phpcs.prepush.destination}" target="${phpcs.prepush.source}" overwrite="true" />
</then>
</if>
</target>
<!-- Disable the PHP CodeSniffer pre-push hook. -->
<target name="disable-pre-push" description="Disable the coding standards check when pushing to a git repository.">
<delete file="${phpcs.prepush.destination}" failonerror="false" />
</target>
<!-- Set up Behat. -->
<target name="setup-behat">
<copy todir="${behat.dir}" overwrite="true">
<fileset dir="${behat.dir}" casesensitive="yes">
<include name="*.yml.dist"/>
</fileset>
<filterchain>
<replacetokens begintoken="${" endtoken="}">
<token key="behat.base_url" value="${behat.base_url}" />
<token key="behat.browser" value="${behat.browser}" />
<token key="behat.test_tags" value="${behat.test_tags}" />
<token key="platform.build.dir" value="${platform.build.dir}" />
<token key="behat.subcontexts.path" value="${behat.subcontexts.path}" />
<token key="flickr.key" value="${flickr.key}" />
<token key="flickr.secret" value="${flickr.secret}" />
<token key="drush.bin" value="${drush.bin}" />
<token key="behat.formatter.name" value="${behat.formatter.name}" />
<token key="integration.server.port" value="${integration.server.port}" />
<token key="varnish.server.port" value="${varnish.server.port}" />
<token key="behat.seleniumuri" value="${behat.seleniumuri}" />
</replacetokens>
</filterchain>
<mapper type="glob" from="*.yml.dist" to="*.yml" />
</copy>
</target>
<!-- Run Behat tests. -->
<target name="behat" description="Run Behat tests.">
<behat
executable="${behat.bin}"
config="${behat.yml.path}"
strict="${behat.options.strict}"
verbose="${behat.options.verbosity}"
/>
</target>
<!-- Check that the subsite starterkit is up-to-date. -->
<target name="check-starterkit">
<echo msg="Checking if the subsite starterkit is up-to-date." />
<checkstarterkit
starterkitRepository="${starterkit.repository}"
starterkitBranch="${starterkit.branch}"
starterkitRemote="${starterkit.remote}"
subsiteRepository="${project.basedir}"
/>
</target>
<!-- Do quality assurance checks. -->
<target name="quality-assurance">
<if>
<available file="${dist.build.dir}" type="dir" />
<then>
<qualityassurance
skipSelect="${qa.skip.select}"
skipPhpcs="${qa.skip.phpcs}"
makeFile="${subsite.make}"
projectBaseDir="${project.basedir}"
resourcesDir="${subsite.resources.dir}"
distBuildDir="${dist.build.dir}"
libDir="${subsite.resources.lib.dir}"
profileName="${platform.profile.name}"
/>
</then>
<else>
<fail message="Please run build-dist before running quality-assurance" />
</else>
</if>
</target>
<!-- Run a full static analysis. -->
<target
name="mjolnir"
description="The Hammer Of Thor will execute a full static analysis on the deployment package. Run this before sending a delivery to QA."
depends="build-dist, setup-php-codesniffer, quality-assurance"
/>
<!-- Install a development version of the subsite. -->
<target
name="install-dev"
description="Install a local development version of the subsite."
depends="add-dt-dev, install, enable-development-modules"
/>
<!-- Rebuild node access. -->
<target name="rebuild-node-access">
<drush
command="php-eval"
assume="yes"
root="${platform.build.dir}"
bin="${drush.bin}"
verbose="${drush.verbose}">
<param>"node_access_rebuild()"</param>
</drush>
</target>
</project>