From dbcd2bf0adff58f9a023a7420d8826468fd94450 Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 21 Nov 2018 16:49:07 -0600 Subject: [PATCH 1/3] Rearrange templates/default files into directories that describe how they are used; shorten property file naming. --- README.md | 2 +- defaults.properties.yml => defaults.yml | 22 ++++----- .../artifact.README.md => artifact/README.md} | 0 .../artifact.gitignore => artifact/gitignore} | 0 .../drupal-skeleton/build.test.properties.yml | 19 -------- .../.the-build/build.circleci.yml | 14 ++++++ defaults/drupal-skeleton/.the-build/build.yml | 32 +++++++++++++ .../.circleci/config.yml | 0 .../{templates => install}/.platform.app.yaml | 0 .../.platform/routes.yaml | 0 .../.platform/services.yaml | 0 defaults/{templates => install}/behat.yml | 0 .../the-build => install}/build.xml | 0 .../drupal/services.build.yml} | 0 .../drupal/settings.build-acquia.php} | 0 .../drupal/settings.build-pantheon.php} | 0 .../drupal/settings.build-platformsh.php} | 0 .../drupal/settings.build.php} | 0 .../{templates => install/drush}/drushrc.php | 0 .../drush}/projectname.aliases.drushrc.php | 0 .../project.gitignore => install/gitignore} | 0 defaults/{templates => install}/pantheon.yml | 0 .../the-build/build.acquia.yml} | 2 +- .../the-build/build.circleci.yml} | 0 .../the-build/build.pantheon.yml} | 2 +- .../the-build/build.platformsh.yml} | 2 +- .../the-build/build.yml} | 10 ++-- .../drupal}/settings.acquia.php | 0 .../drupal/settings.php} | 2 +- .../config_split.config_split.development.yml | 0 .../config_split.config_split.production.yml | 0 .../config_split.config_split.staging.yml | 0 .../the_build_utility.info.yml | 0 .../the_build_utility.install | 0 defaults/{config => standard}/phplint.txt | 0 defaults/{config => standard}/phpmd.xml | 0 docs/artifacts.md | 4 +- docs/configuration.md | 14 +++--- docs/drupal_multisite.md | 6 +-- tasks/acquia.xml | 2 +- tasks/artifact.xml | 4 +- tasks/drupal.xml | 10 ++-- tasks/install.xml | 46 +++++++++---------- tasks/the-build.xml | 8 ++-- 44 files changed, 113 insertions(+), 88 deletions(-) rename defaults.properties.yml => defaults.yml (93%) rename defaults/{templates/artifact.README.md => artifact/README.md} (100%) rename defaults/{templates/artifact.gitignore => artifact/gitignore} (100%) delete mode 100644 defaults/config/drupal-skeleton/build.test.properties.yml create mode 100644 defaults/drupal-skeleton/.the-build/build.circleci.yml create mode 100644 defaults/drupal-skeleton/.the-build/build.yml rename defaults/{templates => install}/.circleci/config.yml (100%) rename defaults/{templates => install}/.platform.app.yaml (100%) rename defaults/{templates => install}/.platform/routes.yaml (100%) rename defaults/{templates => install}/.platform/services.yaml (100%) rename defaults/{templates => install}/behat.yml (100%) rename defaults/{templates/the-build => install}/build.xml (100%) rename defaults/{templates/drupal.services.build.yml => install/drupal/services.build.yml} (100%) rename defaults/{templates/drupal.settings.build-acquia.php => install/drupal/settings.build-acquia.php} (100%) rename defaults/{templates/drupal.settings.build-pantheon.php => install/drupal/settings.build-pantheon.php} (100%) rename defaults/{templates/drupal.settings.build-platformsh.php => install/drupal/settings.build-platformsh.php} (100%) rename defaults/{templates/drupal.settings.build.php => install/drupal/settings.build.php} (100%) rename defaults/{templates => install/drush}/drushrc.php (100%) rename defaults/{templates => install/drush}/projectname.aliases.drushrc.php (100%) rename defaults/{templates/project.gitignore => install/gitignore} (100%) rename defaults/{templates => install}/pantheon.yml (100%) rename defaults/{templates/the-build/build.acquia.properties.yml => install/the-build/build.acquia.yml} (74%) rename defaults/{templates/the-build/build.circleci.properties.yml => install/the-build/build.circleci.yml} (100%) rename defaults/{templates/the-build/build.pantheon.properties.yml => install/the-build/build.pantheon.yml} (74%) rename defaults/{templates/the-build/build.platformsh.properties.yml => install/the-build/build.platformsh.yml} (75%) rename defaults/{templates/the-build/build.default.properties.yml => install/the-build/build.yml} (90%) rename defaults/{config => install_site/drupal}/settings.acquia.php (100%) rename defaults/{templates/drupal.settings.php => install_site/drupal/settings.php} (96%) rename defaults/{config => standard}/modules/the_build_utility/config/install/config_split.config_split.development.yml (100%) rename defaults/{config => standard}/modules/the_build_utility/config/install/config_split.config_split.production.yml (100%) rename defaults/{config => standard}/modules/the_build_utility/config/install/config_split.config_split.staging.yml (100%) rename defaults/{config => standard}/modules/the_build_utility/the_build_utility.info.yml (100%) rename defaults/{config => standard}/modules/the_build_utility/the_build_utility.install (100%) rename defaults/{config => standard}/phplint.txt (100%) rename defaults/{config => standard}/phpmd.xml (100%) diff --git a/README.md b/README.md index 6cfaf4de..9cbce29b 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ $> vendor/bin/phing test ## Configuration -Configure your build by editing `.the-build/build.default.properties.yml`. You can find more properties in [defaults.properties.yml](defaults.properties.yml), and override the defaults by copying them into your project's properties files. +Configure your build by editing `.the-build/build.yml`. You can find more properties in [defaults.yml](defaults.yml), and override the defaults by copying them into your project's properties files. ## Additional documentation diff --git a/defaults.properties.yml b/defaults.yml similarity index 93% rename from defaults.properties.yml rename to defaults.yml index 11ef2c84..0017b2b0 100644 --- a/defaults.properties.yml +++ b/defaults.yml @@ -3,9 +3,9 @@ # # Properties may be overridden for individual projects by copying them to the project's # own property files: -# - .the-build/build.default.properties.yml -# - .the-build/build.circleci.properties.yml -# - .the-build/build.acquia.properties.yml +# - .the-build/build.yml +# - .the-build/build.circleci.yml +# - .the-build/build.acquia.yml # - etc. # # @copyright 2018 Palantir.net, Inc. @@ -43,7 +43,7 @@ drupal: # loading any missing values from drupal.sites._defaults. # # To add a Drupal multisite installation, copy these default values into - # your project's .the-build/build.default.properties.yml file and change + # your project's .the-build/build.yml file and change # the 'default' key to the name of your new multisite. The key must not # contain '.' characters, but the 'dir' property may. default: @@ -112,11 +112,11 @@ drupal: build: # Source template for Drupal's `settings.php` file. This may vary per build # environment. - settings_template: .the-build/drupal.settings.build.php + settings_template: .the-build/drupal/settings.build.php # Source template for Drupal's `services.yml` file. This may vary per build # environment. - services_template: .the-build/drupal.services.build.yml + services_template: .the-build/drupal/services.build.yml # Configuration for the database loading utility. load_db: @@ -147,10 +147,10 @@ artifact: prefix: artifact- # Path to a template .gitignore file to use in the artifact. - gitignore_template: "${build.thebuild.dir}/defaults/templates/artifact.gitignore" + gitignore_template: "${build.thebuild.dir}/defaults/artifact/gitignore" # Path to a template README file to use in the artifact. - readme_template: "${build.thebuild.dir}/defaults/templates/artifact.README.md" + readme_template: "${build.thebuild.dir}/defaults/artifact/README.md" git: # Git repository for the artifact. This is typically an Acquia or Pantheon git URL. @@ -209,7 +209,7 @@ acquia: # template. phplint: # Path to a file where each line is a pattern matching files to lint. - includesfile: "${build.thebuild.dir}/defaults/config/phplint.txt" + includesfile: "${build.thebuild.dir}/defaults/standard/phplint.txt" # Configuration for using PHP_CodeSniffer to review code according to the Drupal coding @@ -246,7 +246,7 @@ phpmd: # Output format for phpmd. format: text # Comma-separated list of ruleset paths or names. - rulesets: "${build.thebuild.dir}/defaults/config/phpmd.xml" + rulesets: "${build.thebuild.dir}/defaults/standard/phpmd.xml" # File extensions to review. suffixes: php,inc,module,theme,profile,install,test @@ -255,7 +255,7 @@ phpmd: # # Putting these flags in configuration allows you to vary the behat configuration per # environment. Sometimes, there are tests that are appropriate to skip on CI. Compare -# these values to the defaults in build.circleci.properties.yml. +# these values to the defaults in build.circleci.yml. # # Also consider: # * Tagging tests based on where they should run (e.g. '@skipci') diff --git a/defaults/templates/artifact.README.md b/defaults/artifact/README.md similarity index 100% rename from defaults/templates/artifact.README.md rename to defaults/artifact/README.md diff --git a/defaults/templates/artifact.gitignore b/defaults/artifact/gitignore similarity index 100% rename from defaults/templates/artifact.gitignore rename to defaults/artifact/gitignore diff --git a/defaults/config/drupal-skeleton/build.test.properties.yml b/defaults/config/drupal-skeleton/build.test.properties.yml deleted file mode 100644 index 5ae19578..00000000 --- a/defaults/config/drupal-skeleton/build.test.properties.yml +++ /dev/null @@ -1,19 +0,0 @@ -# These properties are for running the Drupal Skeleton on circle. -drupal: - root: web - sites: - default: - dir: default - uri: http://drupal-skeleton.local - hash_salt: temporary - profile: standard - database: - database: circle_test - username: ubuntu - password: - host: 127.0.0.1 - settings: - file_public_path: sites/default/files - file_private_path: - twig: - debug: false diff --git a/defaults/drupal-skeleton/.the-build/build.circleci.yml b/defaults/drupal-skeleton/.the-build/build.circleci.yml new file mode 100644 index 00000000..f43332af --- /dev/null +++ b/defaults/drupal-skeleton/.the-build/build.circleci.yml @@ -0,0 +1,14 @@ +# These properties are for running the Drupal Skeleton on circle. +drupal: + twig: + debug: false + sites: + default: + database: + database: circle_test + username: root + password: "root" + host: 127.0.0.1 + +behat: + args: "--profile=circleci --suite=default --strict --format=junit --out=/tmp/artifacts --tags=~@skipci" diff --git a/defaults/drupal-skeleton/.the-build/build.yml b/defaults/drupal-skeleton/.the-build/build.yml new file mode 100644 index 00000000..653f4798 --- /dev/null +++ b/defaults/drupal-skeleton/.the-build/build.yml @@ -0,0 +1,32 @@ +# @file +# Build configuration for the palantirnet/drupal-skeleton project. + +build: + host: other + +drupal: + root: "web" + + twig: + debug: true + + sites: + default: + dir: default + uri: "drupal-skeleton.local" + hash_salt: "temporary" + profile: standard + database: + database: "drupal" + + # Multisites created by `phing drupal-add-multisite` will be automatically added here. + # @multisite_placeholder@ + + _defaults: + database: + username: "root" + password: "root" + host: "127.0.0.1" + +behat: + args: "--suite=default --strict" diff --git a/defaults/templates/.circleci/config.yml b/defaults/install/.circleci/config.yml similarity index 100% rename from defaults/templates/.circleci/config.yml rename to defaults/install/.circleci/config.yml diff --git a/defaults/templates/.platform.app.yaml b/defaults/install/.platform.app.yaml similarity index 100% rename from defaults/templates/.platform.app.yaml rename to defaults/install/.platform.app.yaml diff --git a/defaults/templates/.platform/routes.yaml b/defaults/install/.platform/routes.yaml similarity index 100% rename from defaults/templates/.platform/routes.yaml rename to defaults/install/.platform/routes.yaml diff --git a/defaults/templates/.platform/services.yaml b/defaults/install/.platform/services.yaml similarity index 100% rename from defaults/templates/.platform/services.yaml rename to defaults/install/.platform/services.yaml diff --git a/defaults/templates/behat.yml b/defaults/install/behat.yml similarity index 100% rename from defaults/templates/behat.yml rename to defaults/install/behat.yml diff --git a/defaults/templates/the-build/build.xml b/defaults/install/build.xml similarity index 100% rename from defaults/templates/the-build/build.xml rename to defaults/install/build.xml diff --git a/defaults/templates/drupal.services.build.yml b/defaults/install/drupal/services.build.yml similarity index 100% rename from defaults/templates/drupal.services.build.yml rename to defaults/install/drupal/services.build.yml diff --git a/defaults/templates/drupal.settings.build-acquia.php b/defaults/install/drupal/settings.build-acquia.php similarity index 100% rename from defaults/templates/drupal.settings.build-acquia.php rename to defaults/install/drupal/settings.build-acquia.php diff --git a/defaults/templates/drupal.settings.build-pantheon.php b/defaults/install/drupal/settings.build-pantheon.php similarity index 100% rename from defaults/templates/drupal.settings.build-pantheon.php rename to defaults/install/drupal/settings.build-pantheon.php diff --git a/defaults/templates/drupal.settings.build-platformsh.php b/defaults/install/drupal/settings.build-platformsh.php similarity index 100% rename from defaults/templates/drupal.settings.build-platformsh.php rename to defaults/install/drupal/settings.build-platformsh.php diff --git a/defaults/templates/drupal.settings.build.php b/defaults/install/drupal/settings.build.php similarity index 100% rename from defaults/templates/drupal.settings.build.php rename to defaults/install/drupal/settings.build.php diff --git a/defaults/templates/drushrc.php b/defaults/install/drush/drushrc.php similarity index 100% rename from defaults/templates/drushrc.php rename to defaults/install/drush/drushrc.php diff --git a/defaults/templates/projectname.aliases.drushrc.php b/defaults/install/drush/projectname.aliases.drushrc.php similarity index 100% rename from defaults/templates/projectname.aliases.drushrc.php rename to defaults/install/drush/projectname.aliases.drushrc.php diff --git a/defaults/templates/project.gitignore b/defaults/install/gitignore similarity index 100% rename from defaults/templates/project.gitignore rename to defaults/install/gitignore diff --git a/defaults/templates/pantheon.yml b/defaults/install/pantheon.yml similarity index 100% rename from defaults/templates/pantheon.yml rename to defaults/install/pantheon.yml diff --git a/defaults/templates/the-build/build.acquia.properties.yml b/defaults/install/the-build/build.acquia.yml similarity index 74% rename from defaults/templates/the-build/build.acquia.properties.yml rename to defaults/install/the-build/build.acquia.yml index 4ba48264..4fcfa84d 100644 --- a/defaults/templates/the-build/build.acquia.properties.yml +++ b/defaults/install/the-build/build.acquia.yml @@ -6,5 +6,5 @@ drupal: sites: default: build: - settings_template: .the-build/drupal.settings.build-acquia.php + settings_template: .the-build/drupal/settings.build-acquia.php services_dest: artifacts/dev/null diff --git a/defaults/templates/the-build/build.circleci.properties.yml b/defaults/install/the-build/build.circleci.yml similarity index 100% rename from defaults/templates/the-build/build.circleci.properties.yml rename to defaults/install/the-build/build.circleci.yml diff --git a/defaults/templates/the-build/build.pantheon.properties.yml b/defaults/install/the-build/build.pantheon.yml similarity index 74% rename from defaults/templates/the-build/build.pantheon.properties.yml rename to defaults/install/the-build/build.pantheon.yml index 6adcd1c8..1729d3f6 100644 --- a/defaults/templates/the-build/build.pantheon.properties.yml +++ b/defaults/install/the-build/build.pantheon.yml @@ -6,5 +6,5 @@ drupal: sites: default: build: - settings_template: .the-build/drupal.settings.build-pantheon.php + settings_template: .the-build/drupal/settings.build-pantheon.php services_dest: artifacts/dev/null diff --git a/defaults/templates/the-build/build.platformsh.properties.yml b/defaults/install/the-build/build.platformsh.yml similarity index 75% rename from defaults/templates/the-build/build.platformsh.properties.yml rename to defaults/install/the-build/build.platformsh.yml index a60e685b..b7f10aef 100644 --- a/defaults/templates/the-build/build.platformsh.properties.yml +++ b/defaults/install/the-build/build.platformsh.yml @@ -6,5 +6,5 @@ drupal: sites: default: build: - settings_template: .the-build/drupal.settings.build-platformsh.php + settings_template: .the-build/drupal/settings.build-platformsh.php services_dest: artifacts/dev/null diff --git a/defaults/templates/the-build/build.default.properties.yml b/defaults/install/the-build/build.yml similarity index 90% rename from defaults/templates/the-build/build.default.properties.yml rename to defaults/install/the-build/build.yml index cde0d5cd..b536351b 100644 --- a/defaults/templates/the-build/build.default.properties.yml +++ b/defaults/install/the-build/build.yml @@ -3,12 +3,12 @@ # # This file may be customized for your project. The full set of default values can be # found in the-build's repository. -# @see https://github.com/palantirnet/the-build/blob/release-2.0/defaults.properties.yml +# @see https://github.com/palantirnet/the-build/blob/release-2.0/defaults.yml # These properties are used when building the settings.php and settings.yml for your # Drupal site, and by some of the targets in the default build.xml file. -# @see .the-build/drupal.services.yml -# @see .the-build/drupal.settings.php +# @see .the-build/drupal/services.build.yml +# @see .the-build/drupal/settings.build.php build: host: ${build.host} @@ -47,12 +47,12 @@ drupal: # Putting these flags in configuration allows you to vary the behat configuration per # environment. Sometimes, there are tests that are appropriate to skip on CI. Compare -# these values to the defaults in build.circleci.properties.yml. +# these values to the defaults in build.circleci.yml. behat: args: "--suite=default --strict" # To build an artifact from your code, add the URL to your artifact git repository. -# @see https://github.com/palantirnet/the-build/blob/release-2.0/defaults.properties.yml +# @see https://github.com/palantirnet/the-build/blob/release-2.0/defaults.yml # # artifact: # git: diff --git a/defaults/config/settings.acquia.php b/defaults/install_site/drupal/settings.acquia.php similarity index 100% rename from defaults/config/settings.acquia.php rename to defaults/install_site/drupal/settings.acquia.php diff --git a/defaults/templates/drupal.settings.php b/defaults/install_site/drupal/settings.php similarity index 96% rename from defaults/templates/drupal.settings.php rename to defaults/install_site/drupal/settings.php index 2447a36c..0234bdcf 100644 --- a/defaults/templates/drupal.settings.php +++ b/defaults/install_site/drupal/settings.php @@ -6,7 +6,7 @@ * * To customize the configuration: * - Create a settings.local.php - * - Edit the templates at .the-build/drupal.settings.*.php + * - Edit the templates at .the-build/drupal/settings.*.php * - Avoid editing this file * * @see https://api.drupal.org/api/drupal/sites%21default%21default.settings.php/8.6.x diff --git a/defaults/config/modules/the_build_utility/config/install/config_split.config_split.development.yml b/defaults/standard/modules/the_build_utility/config/install/config_split.config_split.development.yml similarity index 100% rename from defaults/config/modules/the_build_utility/config/install/config_split.config_split.development.yml rename to defaults/standard/modules/the_build_utility/config/install/config_split.config_split.development.yml diff --git a/defaults/config/modules/the_build_utility/config/install/config_split.config_split.production.yml b/defaults/standard/modules/the_build_utility/config/install/config_split.config_split.production.yml similarity index 100% rename from defaults/config/modules/the_build_utility/config/install/config_split.config_split.production.yml rename to defaults/standard/modules/the_build_utility/config/install/config_split.config_split.production.yml diff --git a/defaults/config/modules/the_build_utility/config/install/config_split.config_split.staging.yml b/defaults/standard/modules/the_build_utility/config/install/config_split.config_split.staging.yml similarity index 100% rename from defaults/config/modules/the_build_utility/config/install/config_split.config_split.staging.yml rename to defaults/standard/modules/the_build_utility/config/install/config_split.config_split.staging.yml diff --git a/defaults/config/modules/the_build_utility/the_build_utility.info.yml b/defaults/standard/modules/the_build_utility/the_build_utility.info.yml similarity index 100% rename from defaults/config/modules/the_build_utility/the_build_utility.info.yml rename to defaults/standard/modules/the_build_utility/the_build_utility.info.yml diff --git a/defaults/config/modules/the_build_utility/the_build_utility.install b/defaults/standard/modules/the_build_utility/the_build_utility.install similarity index 100% rename from defaults/config/modules/the_build_utility/the_build_utility.install rename to defaults/standard/modules/the_build_utility/the_build_utility.install diff --git a/defaults/config/phplint.txt b/defaults/standard/phplint.txt similarity index 100% rename from defaults/config/phplint.txt rename to defaults/standard/phplint.txt diff --git a/defaults/config/phpmd.xml b/defaults/standard/phpmd.xml similarity index 100% rename from defaults/config/phpmd.xml rename to defaults/standard/phpmd.xml diff --git a/docs/artifacts.md b/docs/artifacts.md index 1ad3edc8..77186623 100644 --- a/docs/artifacts.md +++ b/docs/artifacts.md @@ -1,6 +1,6 @@ # Building an Artifact -You can find the full set of configuration options for artifacts under the 'artifact' property in the [defaults.properties.yml](../defaults.properties.yml) file. +You can find the full set of configuration options for artifacts under the 'artifact' property in the [defaults.yml](../defaults.yml) file. ## Basic configuration @@ -12,7 +12,7 @@ artifact: remote: example@svn-9999.devcloud.hosting.acquia.com:example.git ``` -All artifact configuration should be in your project's base properties file, `.the-build/build.default.properties.yml`. +All artifact configuration should be in your project's base properties file, `.the-build/build.yml`. ## Runtime flags diff --git a/docs/configuration.md b/docs/configuration.md index 84404b20..1f797f9e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -2,11 +2,11 @@ ## Where to set configuration -In general, you should configure the-build for your project in the `.the-build/build.default.properties.yml` file within your project root. +In general, you should configure the-build for your project in the `.the-build/build.yml` file within your project root. -You can customize your test and prod build behaviors by adding environment-specific configuration to the `.the-build/build.ENVIRONMENT.properties.yml` files. +You can customize your test and prod build behaviors by adding environment-specific configuration to the `.the-build/build.ENVIRONMENT.yml` files. -You can find documentation for the full set of properties used by the-build in the [`defaults.properties.yml`](../defaults.properties.yml) file. Properties and default values can be copied from there into your project's `.the-build/build.default.properties.yml` file. +You can find documentation for the full set of properties used by the-build in the [`defaults.yml`](../defaults.yml) file. Properties and default values can be copied from there into your project's `.the-build/build.yml` file. ## Property loading @@ -37,9 +37,9 @@ Cool! This phing-ism is what allows us to do environment-specific property layer phing build -Dbuild.env=circleci ``` 1. Set the `build.dir`, `projectname`, `build.thebuild.dir`, and `build.env` core properties in `tasks/the-build.xml` -1. Load properties from the project's `.the-build/build.[environment].properties.yml` -1. Load properties from the project's `.the-build/build.default.properties.yml` -1. Load default property values from the-build's own `defaults.properties.yml` file +1. Load properties from the project's `.the-build/build.[environment].yml` +1. Load properties from the project's `.the-build/build.yml` +1. Load default property values from the-build's own `defaults.yml` file In order to support Drupal multisites, site-specific configuration should be set in the `drupal.sites.SITENAME.*` properties, but should be referenced using the `drupal.site.*` properties. See [drupal_multisite.md](drupal_multisite.md) for details on how these properties are provided. @@ -71,7 +71,7 @@ These properties are provided by the init process in `the-build.xml`, and do not ## Available properties -All available properties are documented in the-build's [defaults.properties.yml](../defaults.properties.yml) file. This file is also the source of default values for the-build; anything that is not set in your project's `.the-build/build.*.properties.yml` files will be set based on these defaults. +All available properties are documented in the-build's [defaults.yml](../defaults.yml) file. This file is also the source of default values for the-build; anything that is not set in your project's `.the-build/build.*.yml` files will be set based on these defaults. ---- Copyright 2016, 2017, 2018 Palantir.net, Inc. diff --git a/docs/drupal_multisite.md b/docs/drupal_multisite.md index c3a3a534..526bfb73 100644 --- a/docs/drupal_multisite.md +++ b/docs/drupal_multisite.md @@ -1,6 +1,6 @@ # Using Drupal Multisites -Multisite builds are supported under `the-build`. When you have multiple sites configured in your `.the-build/build.default.properties.yml` file, and you run targets like `build` and `install` that act on a specific site, you will be prompted to select a site. +Multisite builds are supported under `the-build`. When you have multiple sites configured in your `.the-build/build.yml` file, and you run targets like `build` and `install` that act on a specific site, you will be prompted to select a site. These site-specific targets declare a dependency on the `set-site` target in [tasks/the-build.xml](../tasks/the-build.xml), which sets up the site properties in `drupal.site.*`. This allows targets to reference the same properties (e.g. `${drupal.site.uri}`) for each site, rather than needing to reference a site-specific property (e.g. `${drupal.sites.default.uri}`, `${drupal.sites.intranet.uri}`). @@ -16,7 +16,7 @@ A target is provided for setting up new multisites: $> phing drupal-add-multisite ``` -This command will prompt you for the Drupal sites subdirectory and the site URL, and then will generate the required `settings.php` files and add the site to `sites.php`. It will output configuration values for you to paste into your `.the-build/build.default.properties.yml`. +This command will prompt you for the Drupal sites subdirectory and the site URL, and then will generate the required `settings.php` files and add the site to `sites.php`. It will output configuration values for you to paste into your `.the-build/build.yml`. You will still need to manually update your Vagrant, Behat, and CircleCI configuration. @@ -68,5 +68,3 @@ With this configuration: * For `default` and `intranet`, user 1 is named `obscure_admin_name` (inherited from `drupal.sites._defaults`) * For `conference2019_mysite_com` the admin is named `sarah` (overridden) * These three sites are found in the directories `web/sites/default`, `web/sites/intranet`, and `web/sites/conference2019.mysite.com` respectively - - diff --git a/tasks/acquia.xml b/tasks/acquia.xml index 7c87e2ce..d5b17887 100644 --- a/tasks/acquia.xml +++ b/tasks/acquia.xml @@ -7,7 +7,7 @@ Include this file in your build.xml with: - @see defaults.properties.yml + @see defaults.yml Copyright 2016, 2018 Palantir.net, Inc. --> diff --git a/tasks/artifact.xml b/tasks/artifact.xml index b9b9b3b9..c713e91f 100644 --- a/tasks/artifact.xml +++ b/tasks/artifact.xml @@ -5,7 +5,7 @@ Targets for managing Drupal code artifacts. @see docs/artifacts.md - @see defaults.properties.yml + @see defaults.yml Copyright 2018 Palantir.net, Inc. --> @@ -22,7 +22,7 @@ - + diff --git a/tasks/drupal.xml b/tasks/drupal.xml index 5b062b5c..f1c90d3b 100644 --- a/tasks/drupal.xml +++ b/tasks/drupal.xml @@ -7,7 +7,7 @@ Include this file in your build.xml with: - @see defaults.properties.yml + @see defaults.yml Copyright 2016, 2018 Palantir.net, Inc. --> @@ -357,7 +357,7 @@ $sites['${_multisite.sites_php_domain}'] = '${_multisite.dir}'; @@ -379,7 +379,7 @@ $sites['${_multisite.sites_php_domain}'] = '${_multisite.dir}'; uri: ${_multisite.uri} hash_salt: ${_multisite.hash_salt} - + @@ -389,14 +389,14 @@ $sites['${_multisite.sites_php_domain}'] = '${_multisite.dir}'; - + -To build and install this site, you need to add the following configuration to your .the-build/build.default.properties.yml file: +To build and install this site, you need to add the following configuration to your .the-build/build.yml file: drupal: sites: diff --git a/tasks/install.xml b/tasks/install.xml index 0607882f..c64f70ed 100644 --- a/tasks/install.xml +++ b/tasks/install.xml @@ -26,7 +26,7 @@ --> - + @@ -50,7 +50,7 @@ - + @@ -64,7 +64,7 @@ We can't do general property substitution here because this is a phing project file that uses phing variables. --> - + @@ -74,7 +74,7 @@ - + @@ -117,7 +117,7 @@ These copy commands use for property substitution. --> - + @@ -125,57 +125,57 @@ - + - + - - + + - - - + + + - - - + + + - + - - + + - + - + - + @@ -237,7 +237,7 @@ - + @@ -255,7 +255,7 @@ - + diff --git a/tasks/the-build.xml b/tasks/the-build.xml index 38dbb629..6917de87 100644 --- a/tasks/the-build.xml +++ b/tasks/the-build.xml @@ -69,18 +69,18 @@ - + - + - + - + From d66a01d3ad67a25baf908c79ef528cd120f8c91f Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 8 Jan 2019 19:31:02 -0600 Subject: [PATCH 2/3] Add a README to the defaults/ directory. --- defaults/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 defaults/README.md diff --git a/defaults/README.md b/defaults/README.md new file mode 100644 index 00000000..cf95a728 --- /dev/null +++ b/defaults/README.md @@ -0,0 +1,9 @@ +# Contents of the `defaults` directory + +| Directory | Contents | +|---|---| +| `artifact/` | Default files used in build artifacts. Override these by editing the `artifact.gitignore_template` and `artifact.readme_template` in your project's properties. | +| `drupal-skeleton/` | Files used for automated testing of the [palantirnet/drupal-skeleton](https://github.com/palantirnet/drupal-skeleton) project. | +| `install/` | Templates used when installing the-build into a project. | +| `install_site/` | Templates used when adding a multisite to a project with the `phing drupal-add-multisite` command. | +| `standard/` | Configuration files and a module that are referenced directly by the-build. | From bc7aa9e2757133822b5e89ff7766e11c8d56b612 Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 8 Jan 2019 19:45:08 -0600 Subject: [PATCH 3/3] Update path to the_build_utility --- tasks/drupal.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/drupal.xml b/tasks/drupal.xml index f1c90d3b..86f6b97f 100644 --- a/tasks/drupal.xml +++ b/tasks/drupal.xml @@ -255,7 +255,7 @@ Or, you can specify the export file directly: - +