Problem/Motivation

The pipeline on 1.0.x is red. The install job 🧩 Drupal CMS - Horizon Aid fails before any Drupal command runs:

$ composer create-project drupal/cms "$SITE_DIR" --no-interaction --no-install --no-scripts
Creating a "drupal/cms" project at "./cmssite"

In CreateProjectCommand.php line 394:
  Project directory "/builds/project/horizonaid/cmssite" is not empty.

Cause: #3622094 moved the build cache from testsite/ to cmssite/, so .build_cache now restores the whole built site into $SITE_DIR, and composer create-project refuses a non-empty target.

The removed varbase_project job carried the guard for exactly this, rm -rf "$SITE_DIR", with the comment "The build cache may restore a stale testsite/; composer create-project refuses a non-empty target, so start from a clean dir on every run". That guard was lost when the job was deleted. The Drupal CMS job never needed it before, because its old .cms_cache held only .cache/composer.

  • The FIRST pipeline on a fresh branch passes (no cache yet) and every subsequent one fails: pipeline 955281 on the #3622094 fork reached drush site:install, then pipeline 955433 on 1.0.x died at create-project.
  • This also means the login fix from #3622112 has never actually executed in CI, so whether the functional suite goes green is still unknown.

Environment: git.drupalcode.org GitLab CI, mcr.microsoft.com/playwright:v1.56.0-noble image, Drupal core 11.4.6, plain drupal/cms, no patches.

Steps to reproduce

  1. Run the pipeline on a branch once (populates .build_cache with cmssite/).
  2. Run it again on the same ref.

The second run fails at composer create-project with "Project directory ... is not empty."

Proposed resolution

Restore the guard in the install job, immediately before composer create-project:

# The build cache restores cmssite/, and composer create-project refuses a
# non-empty target, so start from a clean directory on every run.
- rm -rf "$SITE_DIR"

One line plus its comment. The rewritten pipeline is accepted by the GitLab CI lint API (valid: true).

AI-Generated: Yes. Assisted by Claude Code / Claude Opus 5, verified against the failing CI job log and the GitLab CI lint API.

Remaining tasks

  • βœ… File an issue
  • ❌ Addition/Change/Update/Fix
  • ❌ Testing to ensure no regression
  • βž– Automated unit testing coverage
  • ❌ Automated functional testing coverage
  • βž– UX/UI designer responsibilities
  • βž– Readability
  • βž– Accessibility
  • βž– Performance
  • βž– Security
  • βž– Developer Documentation
  • βž– User Guide Documentation
  • ❌ Reviewed by human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • βž– Review with the product owner
  • βž– Release notes snippet
  • ❌ Release

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A. CI only, nothing user-facing.

Issue fork horizonaid-3622114

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajab natshah created an issue.

  • rajab natshah committed 8c818b22 on 1.0.x
    fix: #3622114 Clear the restored cmssite directory before composer...