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

Request for new features: 'Keep Forever Condition' and 'Action of Unkeep Forever, Then Delete After N Days' #90

Open
nurgul212 opened this issue Sep 7, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@nurgul212
Copy link
Contributor

nurgul212 commented Sep 7, 2023

What feature do you want to see added?

Feature Request

We propose adding the Keep Forever Condition and Action of Unkeep Forever (or Ignore Keep Forever) options to the plugin's functionality.

Functionality

This new feature would allow users to:

  1. Apply a Keep Forever condition to certain builds
  2. Implement an action of Unkeep Forever or Ignore Keep Forever after a specified number of days, then delete builds after a set period (N days)

Question to the Maintainer:

  • Would you be open to accepting and supporting this proposed feature if we were to develop and submit a pull request with the implementation?

Thank you!!!

Upstream changes

n/a

@nurgul212 nurgul212 added the enhancement New feature or request label Sep 7, 2023
@damianszczepanik
Copy link
Member

Keep Forever is rather action, not condition. Or maybe Keep build forever so this is clear if the action refers to the build, artifact or log. Prepare PR for this, should be quite easy. Then check if https://github.com/jenkinsci/build-history-manager-plugin/blob/master/src/main/java/pl/damianszczepanik/jenkins/buildhistorymanager/model/actions/DeleteBuildAction.java#L24 works as expected

@damianszczepanik
Copy link
Member

Second looks like the opposite for the first one

@nurgul212
Copy link
Contributor Author

It seems that there was a bit confusion in my previous comment. Let me clarify that we try to find a way to deal with runs that marked as Keep Forever. So we intend to propose an action like Ignore Keep forever after a specified number of days, then delete builds after a set period (N days).

@damianszczepanik
Copy link
Member

Builds marked as Keep forever cannot be deleted. You need to first uncheck this flag and then delete

@nurgul212
Copy link
Contributor Author

Right. We want to add a new feature called Ignore or Uncheck Keep Forever as an action. This feature would automatically remove the Keep Forever tag from the builds that have it, and then delete those builds after a specific number of days .

@damianszczepanik
Copy link
Member

Then I would probably add new flag like 'forceDelete' to https://github.com/jenkinsci/build-history-manager-plugin/blob/master/src/main/java/pl/damianszczepanik/jenkins/buildhistorymanager/model/actions/DeleteBuildAction.java instead of creating separate action. When the flag is selected then build toogle keep flag before deletion is invoked

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

No branches or pull requests

2 participants