Skip to content

Add support for deleting all build numbers of a given build name#215

Merged
anancarv merged 1 commit into
anancarv:masterfrom
eaaltonen:deleteAll-buildnumbers
Jul 25, 2025
Merged

Add support for deleting all build numbers of a given build name#215
anancarv merged 1 commit into
anancarv:masterfrom
eaaltonen:deleteAll-buildnumbers

Conversation

@eaaltonen
Copy link
Copy Markdown

@eaaltonen eaaltonen commented May 31, 2025

Description

Adds option to delete all build numbers of a given build name.

Using Bitbucket Branch Source Plugin in Jenkins will with it's default behaviour create a larger number of named builds with slightly different build names. This option makes it easier to cleanup a large number of non relevant build info from Artifactory.

After #214 DONE

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has it been tested ?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Deleted build info and artifacts with BuildDeleteRequest(buildName="THE_BUILD", deleteArtifacts=True, buildNumbers=["1", "2"])
  • Deleted build info and artifacts with BuildDeleteRequest(buildName="THE_BUILD", deleteArtifacts=True, deleteAll=True)

Checklist:

  • My PR is ready for prime time! Otherwise use the "Draft PR" feature
  • All commits have a correct title
  • Readme has been updated
  • Quality tests are green (see Codacy)
  • Automated tests are green (see pipeline)

@eaaltonen eaaltonen force-pushed the deleteAll-buildnumbers branch from 6a6f2ac to f5ce32a Compare July 17, 2025 12:27
@eaaltonen eaaltonen marked this pull request as ready for review July 17, 2025 12:30
@eaaltonen
Copy link
Copy Markdown
Author

@anancarv: I updated the following

  • I rebased the PR on top of current master.
  • added myself to the authors list
  • Added a version bump commit (since a pip package with this feature would be helpful to me)

Please let me know if you a disagree or want any of these modified.

Copy link
Copy Markdown
Owner

@anancarv anancarv left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! The PR looks good, just some small changes required before approving it

Comment thread pyartifactory/models/build.py
Comment thread pyproject.toml Outdated
deleteAll parameter, added in Artifactory 2.3.0, allows to delete all
build numbers of a specified build name.
@eaaltonen eaaltonen force-pushed the deleteAll-buildnumbers branch from f5ce32a to cf2e6f9 Compare July 24, 2025 15:35
@anancarv anancarv merged commit c0f49d8 into anancarv:master Jul 25, 2025
2 of 7 checks passed
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