UI variables take precedence over build.env
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3491556. -->
Reported by: [jonathan1055](https://www.drupal.org/user/92645)
Related to !299
>>>
<blockquote></blockquote>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When running a pipeline from the UI, the CSpell job fails with a curl error, due to <code>_CURL_TEMPLATES_REPO</code> and <code>_CURL_TEMPLATES_REF</code> being empty. </p>
<p>See slack discussion <a href="https://app.slack.com/client/T06GX3JTS/CGKLP028K">https://app.slack.com/client/T06GX3JTS/CGKLP028K</a></p>
<p>This likely to be caused by the changes in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3487169" title="Status: Closed (fixed)">#3487169: Set IMAGE and CURL variables for all subsequent jobs</a></span>. The variables from the UI may take precedence over variables in <code>build.env</code>. See <a href="https://docs.gitlab.com/ee/ci/variables/index.html#cicd-variable-precedence">https://docs.gitlab.com/ee/ci/variables/index.html#cicd-variable-precedence</a>. UI would be 3 and build.env would be 7.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p><del>Consider/test if we can do<br>
</del></p>
<pre>_CURL_TEMPLATES_REPO: $_GITLAB_TEMPLATES_REPO<br>_CURL_TEMPLATES_REF: $_GITLAB_TEMPLATES_REF</pre><p>or </p>
<p><del>Move the _CURL_* variables to the hidden file so they are not available via the UI<br>
</del><br>
or </p>
<p>Delete the _CURL_* variables from the file and hence they will no show in the UI. They are only needed in .gitlab-ci.yml</p>
<p>or</p>
<p><del>otherwise we might need to call <code>calculate-gitlab-ref</code> again in all the jobs that need it.<br>
</del></p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue