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>&nbsp; extends: .testing-job-base<br>&nbsp; needs:<br>&nbsp;&nbsp;&nbsp; - composer<br>&nbsp; script:<br>&nbsp;&nbsp;&nbsp; - !reference [ .show-environment-variables ]<br>&nbsp;&nbsp;&nbsp; - !reference [ .setup-webserver ]<br>&nbsp;&nbsp;&nbsp; - !reference [ .simpletest-db ]<br>&nbsp;&nbsp;&nbsp; - !reference [ .show-context ]&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; - composer require drush/drush drupal/upgrade_status<br>&nbsp;&nbsp;&nbsp; - php $_WEB_ROOT/core/scripts/drupal install standard<br>&nbsp;&nbsp;&nbsp; - vendor/bin/drush --root=$_WEB_ROOT st<br>&nbsp;&nbsp;&nbsp; - vendor/bin/drush --root=$_WEB_ROOT -y en upgrade_status<br>&nbsp;&nbsp;&nbsp; # Output results via terminal and then generate the report.<br>&nbsp;&nbsp;&nbsp; - vendor/bin/drush --root=$_WEB_ROOT upgrade_status:analyze $MODULE_NAME || EXIT_CODE=$?<br>&nbsp;&nbsp;&nbsp; - vendor/bin/drush --root=$_WEB_ROOT upgrade_status:analyze $MODULE_NAME --format=codeclimate &gt; upgrade-status-analysis.json || true<br>&nbsp;&nbsp;&nbsp; # Ensure paths in artifacts are git-relative.<br>&nbsp;&nbsp;&nbsp; - sed -i "s#modules\\\/custom\\\/$CI_PROJECT_NAME\\\/##" upgrade-status-analysis.json || true<br>&nbsp;&nbsp;&nbsp; - exit $EXIT_CODE<br>&nbsp; artifacts:<br>&nbsp;&nbsp;&nbsp; when: always<br>&nbsp;&nbsp;&nbsp; expose_as: "upgrade-status-analysis"<br>&nbsp;&nbsp;&nbsp; reports:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; codequality: upgrade-status-analysis.json<br>&nbsp;&nbsp;&nbsp; paths:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - upgrade-status-analysis.json</pre> > Related issue: [Issue #3447071](https://www.drupal.org/node/3447071)
issue