Include upgrade status job for all contrib
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3444789. -->
Reported by: [fjgarlin](https://www.drupal.org/user/2495842)
Related to !199
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Upgrade status has now support for GitLab CI reporting (<span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/upgrade_status/issues/3227079" title="Status: Closed (fixed)">#3227079: Support generating Code Quality JSON reports (for GitLab CI integration)</a></span>). It is self-contained and it's just a snippet that can be copy/pasted into any GitLab CI integration.</p>
<p>The initial thoughts were to have the UpdateBot place that snippet in all the MRs, but maybe, since this is a task done in all contrib modules, we can integrate it from GitLab CI.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>We could have the new job and add a new <code>RUN_UPGRADE_STATUS</code> variable (turned off by default). This way, the UpdateBot would just need to set that variable to 1 and also any maintainer that wants to do this check can just enable it.</p>
<p>The reusable snippet is:</p>
<pre>upgrade-status-analysis:<br> extends: .testing-job-base<br> needs:<br> - composer<br> script:<br> - !reference [ .show-environment-variables ]<br> - !reference [ .setup-webserver ]<br> - !reference [ .simpletest-db ]<br> - !reference [ .show-context ] <br> - composer require drush/drush drupal/upgrade_status<br> - php $_WEB_ROOT/core/scripts/drupal install standard<br> - vendor/bin/drush --root=$_WEB_ROOT st<br> - vendor/bin/drush --root=$_WEB_ROOT -y en upgrade_status<br> # Output results via terminal and then generate the report.<br> - vendor/bin/drush --root=$_WEB_ROOT upgrade_status:analyze $MODULE_NAME || EXIT_CODE=$?<br> - vendor/bin/drush --root=$_WEB_ROOT upgrade_status:analyze $MODULE_NAME --format=codeclimate > upgrade-status-analysis.json || true<br> # Ensure paths in artifacts are git-relative.<br> - sed -i "s#modules\\\/custom\\\/$CI_PROJECT_NAME\\\/##" upgrade-status-analysis.json || true<br> - exit $EXIT_CODE<br> artifacts:<br> when: always<br> expose_as: "upgrade-status-analysis"<br> reports:<br> codequality: upgrade-status-analysis.json<br> paths:<br> - upgrade-status-analysis.json</pre>
> Related issue: [Issue #3447071](https://www.drupal.org/node/3447071)
issue