Problem/Motivation

Reported by davituri in the security advisory coverage application (#3608067, comment 7). The comment above the phpcs variables in .gitlab-ci.yml says "Fail the pipeline on coding standards violations", but the only variable set is _PHPCS_EXTRA, which just appends options to the phpcs command. The drupal.org GitLab templates still run the phpcs job with allow_failure enabled by default, so a coding standards violation only produces a warning and the pipeline stays green.

Steps to reproduce

Introduce a coding standards violation and push: the phpcs job reports it but the pipeline succeeds.

Proposed resolution

Set _PHPCS_ALLOW_FAILURE: 0 next to _PHPCS_EXTRA so the phpcs job fails the pipeline, matching the intent of the comment.

Comments

trebormc created an issue. See original summary.

  • trebormc committed a2eba95f on 2.0.x
    Issue #3623350 by trebormc, davituri: GitLab CI does not fail the...
trebormc’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

avpaderno’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.