Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: change sonarqube configuration to cause job to fail when quality gate fails #1565

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sdobbert
Copy link
Contributor

@sdobbert sdobbert commented May 8, 2024

This sets the sonar.qualitygate.wait=true parameter which forces the sonarqube step to poll the SonarQube instance until the quality gate status is available.
It causes the sonarqube analysis step to fail any time the quality gate fails. The order in on-push-main workflow is changed to ensure sonarqube scan is carried out before each build. This means, build is not run if quality gate fails.

Also increases the pipeline duration!

Copy link

github-actions bot commented May 8, 2024

Title Lines Statements Branches Functions
All Coverage: 21%
21.83% (748/3426) 9.4% (167/1775) 24.96% (165/661)
only changed Coverage: NaN%
Unknown% (0/0) Unknown% (0/0) Unknown% (0/0)

Copy link
Member

@dnlkoch dnlkoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure if I understand it correctly, but this might have unexpected results:

  • During the pull request pipeline no sonarqube check is performed.
  • After being merged, the check is being performed on the main branch.
  • If the check would fail, no build of the main would happen.
  • In this case no image would be created and the gh-pages wouldn't be updated.

This seems quite confusing to me since I would expect a succeeding main branch pipeline after merging a succeeding pull request pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants