Add recipes path handling

Issue information

From user: jcandan

Related to !421 (merged) !408 (merged)

Contribution record

Fork management

Problem/Motivation

When this template is applied to a Recipe project, the symlink is placed in web/modules/custom/. If using the GenericTest.php, the project path cannot find the other recipes.

Proposed resolution

  • Introduce a new project type of "recipe"
  • As recipes do not have a .info.yml to read the type, detect if a recipe.yml file exists
  • The environment variable $PROJECT_TYPE can still be used to preset or override the type
  • Introduce a new variale $DRUPAL_RECIPES_PATH which is the path from the build root to the recipes folder. The default is 'recipes'
  • If the project is a recipe then no value is set for $DRUPAL_PROJECTS_PATH
  • The exitsing variable $DRUPAL_PROJECT_FOLDER remains as the full absolute path to the deeper-level project folder being tested.
  • For modules, themes and profiles, the value is $CI_PROJECT_DIR/$DRUPAL_PROJECTS_PATH/$PROJECT_NAME, for example /builds/project/my_theme/web/themes/custom/my_theme
  • For recipes the value is $CI_PROJECT_DIR/$DRUPAL_RECIPES_PATH/$PROJECT_NAME, for example /builds/project/my_recipe/recipes/my_recipe
  • As recipe test files need to be real, not symlinks, at the start of the recipe phpunit job the project's /test/ folder symlinks are replaced by copying the real files
Edited by drupalbot
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information