-
Notifications
You must be signed in to change notification settings - Fork 480
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
fail() does not fail GitLab job #964
Comments
So I have an idea on how to fix this. Currently raise "Errors #{errors}" unless errors.empty? |
This might be on purpose, if danger can successfully set a error status on the PR it won't fail the build I think |
The MR status is determined from the pipeline status, so if the pipeline succeeds. Then the MR is considered green. The API docs does not mention of a way of failing a MR. |
Makes sense, I feel like the |
D'oh I missed that flag. |
|
@here |
Doesn't look like it, you're welcome to take a look |
I'm guessing this can be closed, I'm using v6.3.1 and it works with our self hosted gitlab. |
I will update to version 6.3.1 and post back my results. It may take a few days. |
I just tested v6.3.2 and no it still does not work on gitlab |
If it helps debug I'm using |
@MiralDesai I'm running Gitlab 12.9.2-ee with danger 6.3.2. Perhaps you could share bits of your config and how you are invoking danger from ci? In my bundle exec danger --fail-on-errors=true And here's my kotlin_detekt.gradle_task = "detekt"
kotlin_detekt.report_file = "./build/reports/detekt.xml"
kotlin_detekt.severity = "warning"
kotlin_detekt.detekt
android_lint.gradle_task = "lintDebug"
android_lint.report_file = "./app/build/reports/lint-results-debug.xml"
android_lint.lint Danger runs successfully, posts the results of the build in a comment to the MR, but does not fail the pipeline. |
Sure thing. My
and my
And here are the last few lines when I run my pipeline:
I experienced the same thing you did before I added |
I think what might be happening is that the kotlin-detekt and android lint plugins don't call |
Report
What did you do?
fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://..../blob/master/CHANGELOG.md).", sticky: false)
in my DangerfileWhat did you expect to happen?
The output as above but with
Job failed
as the final message.What happened instead?
Job succeeded
Your Environment
GitLab CI
Danger 5.5.10
What is your Dangerfile?
The text was updated successfully, but these errors were encountered: