Create new variable DRUPAL_PROJECTS_PATH and use it to remove hardcoded "/custom" paths
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3506040. -->
Reported by: [fjgarlin](https://www.drupal.org/user/2495842)
Related to !334
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>After <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3505585" title="Status: Closed (fixed)">#3505585: Create environment variable for the project's own folder</a></span>, 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.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Calculate some of the values needed as parameters from the DRUPAL_PROJECT_FOLDER variable.<br>
Some suggestions can be found <a href="https://www.drupal.org/project/gitlab_templates/issues/3505585#comment-15984061">here</a>.</p>
<p>We could make the destination sub-path a variable, so for D10+ would be <code>modules/custom</code> and for D7 <code>sites/all/modules/custom</code>. This way we'd have all the elements of the DRUPAL_PROJECT_FOLDER variable broken down into reusable variables:</p>
<pre>variables:<br> DRUPAL_PROJECTS_PATH: "modules/custom"</pre><p><code>export DRUPAL_PROJECT_FOLDER=$CI_PROJECT_DIR/$_WEB_ROOT/$DRUPAL_PROJECTS_PATH/$CI_PROJECT_NAME</code></p>
<h3>D10 changes check-list</h3>
<ul>
<li>new variable written to build.env (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518966/artifacts/file/build.env">default</a> and <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518768/artifacts/file/build.env">modified</a>)</li>
<li>environment vars (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518966#L203">default</a> and <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518768#L203">modified</a>)</li>
<li>composer symlink parameter (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518966#L958">default</a> and <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518768#L958">modified</a>)</li>
<li>eslint links to config files (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518976#L25">default</a> and <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518778#L25">modified</a>)</li>
<li>phpunit with <code>_PHPUNIT_CONCURRENT:1</code> and <code>_PHPUNIT_TESTGROUPS: --all</code> (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4519423#L366">default</a>, <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4519440#L369">modified</a>, <a href="https://git.drupalcode.org/issue/scheduler-3445052/-/jobs/4569562#L386">module-nnnnn</a>)</li>
<li>upgrade status sed (<a href="https://git.drupalcode.org/issue/gitlab_templates_downstream-3510486/-/jobs/4568933">default</a> and <a href="https://git.drupalcode.org/issue/gitlab_templates_downstream-3510486/-/jobs/4569278">modified</a>)</li>
</ul>
<h3>D7 changes check-list</h3>
<ul>
<li>new variable written to build.env (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518756/artifacts/file/build.env">default</a> and <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4519406/artifacts/file/build.env">modified</a>)</li>
<li>environment vars (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518756#L202">default</a> and <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4519406#L202">modified</a>)</li>
<li>composer symlink parameter (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518756#L574">default</a> and <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4569336#L595">modified</a>)</li>
<li>ls directories at end of composer job (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518756#L585">default</a> and <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4569336#L608">modified</a>)</li>
<li>phpunit adding /$CI_PROJECT_NAME (<a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4518759#L412">default</a>, <a href="https://git.drupalcode.org/project/gitlab_templates_downstream/-/jobs/4569339#L414">modified</a>, <a href="https://git.drupalcode.org/issue/scheduler-3480501/-/jobs/4569648#L406">module-nnnnn</a>)</li>
</ul>
> Related issue: [Issue #3460115](https://www.drupal.org/node/3460115)
> Related issue: [Issue #3505585](https://www.drupal.org/node/3505585)
issue