Keyword order in job templates
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3518793. --> Reported by: [jonathan1055](https://www.drupal.org/user/92645) Related to !347 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Following from an initial conversation on <a href="https://drupal.slack.com/archives/C08CJ9K74MB/p1744373590660529">Slack</a> here is a suggestion for code improvement within the two template files, to re-order the keys/elements within each job to an agreed order. This will allow more easy comparison between jobs and/or to see which ones do not have a certain keyword.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Many of the jobs already follow a similar sequence of keywords, and from observation a common order is:</p> <pre>stage<br>image<br>extends<br>services<br>rules<br>needs<br>allow_failure ?<br>interruptible ?<br>variables<br>artifacts ?<br>before_script<br>script<br>after_script</pre><p> This is only a first suggestion, we can adjust this if required.</p> <p>There are lots of jobs that already follow this sequence:</p> <ul> <li> composer-base and all composer variants</li> <li> composer-lint</li> <li> all phpstan variants</li> <li> nightwatch, nightwatch max php &amp; previous minor</li> <li> phpunit, phpunit max, &amp; previous minor</li> <li> test-only changes</li> <li> environment check</li> <li> deprecation-warning-base</li> </ul> <p>The other jobs should only need one or two keys moved to match this order.</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