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

Jenkins: Present most recent interesting build info #8444

Merged
1 commit merged into from Sep 30, 2020

Conversation

gerhardol
Copy link
Member

Proposed changes

Jenkins can start many builds for a commit, for instance for the branch and the pull request.
In some occasions the subsequent build(s) are aborted immediately, getting status NOT_BUILT
It is of course possible to abort builds too

The Jenkins build adapter presents the status for the latest build started for a commit regardless if it is complete or not.
This tries to present the most interesting status instead.

  • Cleanup from Re#, some manual adjustments
  • The intervall for retrieving running builds was changed to two minutes in 3fcb478, but the full day obervable was kept at one minute

Test methodology

Manual


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol Sep 9, 2020
@codecov
Copy link

codecov bot commented Sep 9, 2020

Codecov Report

Merging #8444 into master will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #8444      +/-   ##
==========================================
- Coverage   54.75%   54.74%   -0.02%     
==========================================
  Files         898      898              
  Lines       64251    64251              
  Branches    11440    11440              
==========================================
- Hits        35179    35171       -8     
- Misses      26390    26394       +4     
- Partials     2682     2686       +4     
Flag Coverage Δ
#production 41.57% <0.00%> (-0.02%) ⬇️
#tests 94.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

{
public string Url { get; set; }
public long Timestamp { get; set; }
public IEnumerable<JToken> JobDescription { get; set; }
}

public class JenkinsCacheInfo
private class JenkinsCacheInfo
Copy link
Member

Choose a reason for hiding this comment

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

Do we need the class at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it stores the latest known build time for a project url. The adapter first asks for last build time, then requests the full data with all builds if there is anything new (that is more to save the server than the processing in the plugin).

Copy link
Member Author

Choose a reason for hiding this comment

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

But you maybe meant why use a class, why not long directly?
I will change to that
Making a few other touchups, want to test this on Monday/Tuesday before pshing and initiates a merge

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

LGTM

@RussKie
Copy link
Member

RussKie commented Sep 11, 2020

JenkinsAdapter.cs(510,13): error SA1508: A closing brace should not be preceded by a blank line 

@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Sep 11, 2020
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Sep 11, 2020
@gerhardol
Copy link
Member Author

It takes time to test when the dev machine is accessible at night and test by day.
That also caused some more tweaks...
Squashed the first commits, the new changes separately, plan to squash that too in a couple of days (not too hard to review).

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

👍

@gerhardol
Copy link
Member Author

@msftbot merge in 24 hours

@ghost ghost added the status: auto merge label Sep 29, 2020
@ghost
Copy link

ghost commented Sep 29, 2020

Hello @gerhardol!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Wed, 30 Sep 2020 22:00:13 GMT, which is in 1 day

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

Jenkins refactoring and Re# suggestions
@ghost ghost merged commit 1236dd0 into gitextensions:master Sep 30, 2020
@ghost ghost added this to the 4.0 milestone Sep 30, 2020
@gerhardol gerhardol deleted the feature/jenkins-multi-status branch October 1, 2020 04:46
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants