Create new variable DRUPAL_PROJECTS_PATH and use it to remove hardcoded "/custom" paths
Problem/Motivation
After #3505585: Create environment variable for the project's own folder, we could see how "/custom" still appears in some places in the code. It'd be great if we can convert those instances to calculated paths from DRUPAL_PROJECT_FOLDER.
Proposed resolution
Calculate some of the values needed as parameters from the DRUPAL_PROJECT_FOLDER variable.
Some suggestions can be found here.
We could make the destination sub-path a variable, so for D10+ would be modules/custom and for D7 sites/all/modules/custom. This way we'd have all the elements of the DRUPAL_PROJECT_FOLDER variable broken down into reusable variables:
variables:
DRUPAL_PROJECTS_PATH: "modules/custom"
export DRUPAL_PROJECT_FOLDER=$CI_PROJECT_DIR/$_WEB_ROOT/$DRUPAL_PROJECTS_PATH/$CI_PROJECT_NAME
D10 changes check-list
- new variable written to build.env (default and modified)
- environment vars (default and modified)
- composer symlink parameter (default and modified)
- eslint links to config files (default and modified)
- phpunit with
_PHPUNIT_CONCURRENT:1and_PHPUNIT_TESTGROUPS: --all(default, modified, module-nnnnn) - upgrade status sed (default and modified)
D7 changes check-list
- new variable written to build.env (default and modified)
- environment vars (default and modified)
- composer symlink parameter (default and modified)
- ls directories at end of composer job (default and modified)
- phpunit adding /$CI_PROJECT_NAME (default, modified, module-nnnnn)
Related issue: Issue #3460115
Related issue: Issue #3505585