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

Handle NOT_BUILT results more clearly #63

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

Conversation

mattiasbpersson
Copy link

Jenkins job that have Result NOT_BUILT are reported as errors which confuses developers.

Added new commit state UNKNOWN and handle NOT_BUILT Result with description "This commit was not built".

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@@ -106,6 +106,9 @@ private static void sendNotifications(Run<?, ?> build, TaskListener listener)
} else if (Result.FAILURE.equals(result)) {
status.setDescription("There was a failure building this commit");
status.setState(GiteaCommitState.FAILURE);
} else if (Result.NOT_BUILT.equals(result)) {
status.setDescription("This commit was not built");
status.setState(GiteaCommitState.UNKOWN);
Copy link
Member

Choose a reason for hiding this comment

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

There is a typo in the unknown.

How will Gitea handle this status? From the docs it says It can be "pending", "success", "error", "failure", and "warning".

Copy link
Author

Choose a reason for hiding this comment

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

Ok, missed that it was a requirement from gitea. Updated the commit and the state to warning. It is not as clear but hopefully less confusing.

Copy link
Member

Choose a reason for hiding this comment

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

Warning is better than the current "fatal error". 👍

I think such unknown state would be a good addition on Gitea side. But that requires a change in Gitea repository.

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