-
Notifications
You must be signed in to change notification settings - Fork 394
ACSF support for deploy step #18
Changes from 3 commits
74b3686
ce42c17
0008284
ef14a17
14d9ab8
d3747c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,13 @@ | |
|
||
<target name="deploy:artifact:build" description="Generates a deploy-ready build in deploy.dir." | ||
depends="deploy:artifact:clean, deploy:artifact:copy, deploy:artifact:composer:install, deploy:artifact:profile:make, frontend:build, deploy:artifact:sanitize"> | ||
<!-- If we are using ACSF, run the ACSF Deploy command. --> | ||
<if> | ||
<equals arg1="${hosting}" arg2="acsf"/> | ||
<then> | ||
<phingcall target="deploy:acsf:init"/> | ||
</then> | ||
</if> | ||
</target> | ||
|
||
<target name="deploy:artifact:clean" description="Deletes the contents of the deploy dir."> | ||
|
@@ -99,11 +106,13 @@ | |
|
||
<!-- Copy required files from docroot. --> | ||
<copy todir="${deploy.dir}/docroot" overwrite="true"> | ||
<fileset dir="${docroot}"> | ||
<fileset dir="${docroot}" defaultexcludes="false"> | ||
<!-- This should be similar to .gitigore. --> | ||
<include name="**"></include> | ||
<!-- We remove default excludes because they include .gitignore files we need, like the ACSF one. --> | ||
<include name="**" /> | ||
<exclude name="**/local.*" /> | ||
<exclude name=".gitkeep" /> | ||
<exclude name=".DS_STORE" /> | ||
<exclude name="core/**" /> | ||
<exclude name="drush/contrib/**" /> | ||
<exclude name="example.gitignore" /> | ||
|
@@ -113,8 +122,8 @@ | |
<exclude name="themes/contrib/**" /> | ||
<exclude name="profiles/contrib/**" /> | ||
<exclude name="modules/contrib/**" /> | ||
<exclude name="**/node_modules/**"></exclude> | ||
<exclude name="**/bower_components/**"></exclude> | ||
<exclude name="**/node_modules/**" /> | ||
<exclude name="**/bower_components/**" /> | ||
</fileset> | ||
</copy> | ||
|
||
|
@@ -170,4 +179,9 @@ | |
</fileset> | ||
</delete> | ||
</target> | ||
|
||
<target name="deploy:acsf:init" description="Re-initialize ACSF with the settings.php changes required for artifact."> | ||
<chmod file="${deploy.dir}/docroot/sites/default/settings.php" mode="0755" /> | ||
<exec dir="${deploy.dir}/docroot" command="${drush.bin} --include=${deploy.dir}/docroot/modules/contrib/acsf/acsf_init acsf-init -y" logoutput="true" checkreturn="true"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will it cause any problems to run this against both the canonical repo and the deployment artifact? Why is it necessary to do in both places? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a paradigm shift from how we originally supported ACSF. Instead of Bolt supporting ACSF and ACE simultaneously out of this box, this adds a flag that you set to add ACSF compatibility "on-the-fly" to a build artifact. If we're taking this approach, we also need to update the ACSF readme, rip out the ACSF-specific logic in the existing settings.php, and remove the ACSF patch from composer.json... I'll try to see what else would need to change... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Composer is updated with this PR. I'll look into the readme and settings.php. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the readme and the default settings.php. Thanks for mentioning those. |
||
</target> | ||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
], | ||
"require": { | ||
"composer/installers": "^1.0.20", | ||
"drush/drush": "dev-master", | ||
"drupal/acquia_connector": "8.1.*", | ||
"drupal/acsf": "~8.1", | ||
"drupal/core": "~8", | ||
|
@@ -28,6 +27,7 @@ | |
"behat/mink-goutte-driver": "*", | ||
"behat/mink-selenium2-driver": "*", | ||
"behat/mink-browserkit-driver": "*", | ||
"drush/drush": "dev-master", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think Moshe has said repeatedly that applications should provide their own version of Drush (instead of using Cloud Drush)... it seems like we're going back on that here. If so, we should discuss whether that's still best practice. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I hadn't considered that. Will running There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think until ACE is fixed with 1.91 release, we should leave this here so peoples installs for D8 do not break like they did for us. Once its released, we can move it back. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"drupal/drupal-extension": "~3.0", | ||
"drupal/coder": "~8.2", | ||
"phpunit/phpunit": "4.6.*", | ||
|
@@ -54,9 +54,6 @@ | |
"patches": { | ||
"drupal/core": { | ||
"Ignore front end vendor folders to improve directory search performance": "https://www.drupal.org/files/issues/ignore_front_end_vendor-2329453-116.patch" | ||
}, | ||
"drupal/acsf": { | ||
"Allow custom settings.php": "https://www.drupal.org/files/issues/acsf-2706365-2.patch" | ||
} | ||
} | ||
}, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which necessary files does setting
defaultexcludes="false"
cause to be included?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACSF .gitignore, see https://www.phing.info/docs/guide/trunk/FileSet.html
Included files are
The cleanup task already removes .git directories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than disabling all of these default excludes, I think we should simply include .gitignore files. E.g.,
<include name="**/.gitignore"/>
. This seems like a more precise way to accomplish the end goal.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that and it didn't work for me. The other option is to check for ACSF and explicitly include it's .gitignore.
I tried a general rule and I even tried another copy command just for that folder and included the file name directly with no luck.
I didn't see any reason we should be ignoring all those files and most do not apply.