Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Commit

Permalink
Fix cloud pipelines builds (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
balsama committed Nov 10, 2017
1 parent fe3c883 commit c2371f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions build.xml
Expand Up @@ -10,6 +10,7 @@
<property name="bzip2" value="/usr/bin/bzip2" />
<property name="bunzip2" value="/usr/bin/bunzip2" />
<property name="yaml-cli" value="${project.basedir}/bin/yaml-cli" />
<property name="drupal" value="${project.basedir}/bin/drupal" />

<!-- Database credentials. -->
<property name="db.type" value="mysql" />
Expand Down Expand Up @@ -44,7 +45,6 @@
<exec command="which rsync" outputProperty="rsync" />
<exec command="which bzip2" outputProperty="bzip2" />
<exec command="which bunzip2" outputProperty="bunzip2" />
<exec command="which drupal" outputProperty="drupal" />

<echo message="Found Drush: ${drush}" />
<echo message="Found Composer: ${composer}" />
Expand Down Expand Up @@ -97,7 +97,7 @@
<!-- Installs Headless Lightning and sets it up for development. -->
<target name="install" depends="env">
<!-- Use passthru() when executing drush site-install so that we'll know if errors occur. -->
<exec command="${drupal} site:install ${profile.machine} --db-type=${db.type} --db-host=${db.host} --db-name=${db.database} --db-user=${db.user} --db-pass=${db.password} --no-interaction --force" passthru="true" />
<exec command="${drush} site-install headless_lightning --yes --account-pass=admin --db-url=${db.url}" passthru="true" />
<chmod file="${site}" mode="0755" />

<!-- Install API Test. -->
Expand All @@ -119,16 +119,9 @@
</if>

<!-- Generate Behat configuration. -->
<exec command="${project.basedir}/bin/drupal behat:init ${url} --merge=${project.basedir}/docroot/profiles/contrib/lightning/tests/behat.yml" dir="${docroot}" />
<exec command="${project.basedir}/bin/drupal behat:include ${project.basedir}/docroot/profiles/contrib/lightning/tests/features --with-subcontexts=${project.basedir}/docroot/profiles/contrib/lightning/tests/features/bootstrap --with-subcontexts=${project.basedir}/docroot/profiles/contrib/lightning/src/LightningExtension/Context" dir="${docroot}" />
<exec command="${project.basedir}/bin/drupal behat:include ../tests/behat/features" dir="${docroot}/../" passthru="true" />

<if>
<isset property="www.group" />
<then>
<chown file="${site}/files" user="${env.USER}" group="${www.group}" />
</then>
</if>
<exec command="${drupal} behat:init ${url} --merge=${project.basedir}/docroot/profiles/contrib/lightning/tests/behat.yml" dir="${docroot}" />
<exec command="${drupal} behat:include ${project.basedir}/docroot/profiles/contrib/lightning/tests/features --with-subcontexts=${project.basedir}/docroot/profiles/contrib/lightning/tests/features/bootstrap --with-subcontexts=${project.basedir}/docroot/profiles/contrib/lightning/src/LightningExtension/Context" dir="${docroot}" />
<exec command="${drupal} behat:include ../tests/behat/features" dir="${docroot}/../" passthru="true" />
</target>

<!-- Destroys the Drupal installation, but leaves the code base intact. -->
Expand Down Expand Up @@ -198,9 +191,15 @@

<!-- Replaces the existing settings file if it exists with the default and adds minimum necessary settings for cloud. -->
<target name="cloud-settings">
<chmod file="${docroot}/sites/default/settings.php" mode="0664" />
<chmod file="${docroot}/sites/default/settings.php" mode="0644" />
<chmod file="${docroot}/sites/default/" mode="0755" />

<delete file="${docroot}/sites/default/settings.php" />
<copy file="${docroot}/sites/default/default.settings.php" tofile="${docroot}/sites/default/settings.php" />

<append destFile="${docroot}/sites/default/settings.php" text="${line.separator}if (file_exists('/var/www/site-php')) {${line.separator} require '/var/www/site-php/${cloud.subscription}/${cloud.subscription}-settings.inc';${line.separator}}${line.separator}" />
<append destFile="${docroot}/sites/default/settings.php" text="$settings['install_profile'] = '${profile.machine}';${line.separator}" />
<append destFile="${docroot}/sites/default/settings.php" text="$settings['install_profile'] = 'headless_lightning';${line.separator}" />

<mkdir dir="config/default" />
<touch file="config/default/.gitkeep" />
</target>
Expand Down
Empty file added config/default/.gitkeep
Empty file.

0 comments on commit c2371f7

Please sign in to comment.