kazerm
kazerm

Reputation: 529

delete builds from only one repository

I have 4 repositories in artifactory.

All builds are being uploaded to one repository and users who work on a specific build will move it to a different repository, so there is a possibility that one build is at several repos / or moved to a different repo

Using Artifactory, I'm trying to delete builds, but i want to delete them only if they are at certain repository, by searching for builds using the api api/build/test_j?buildNumbers=5&artifacts=1

But this will delete build 5 from all repos and not just development.

I've tried build info, but it doesn't hold the information regarding the repo adding this at the end ?targetRepo=Development didn't work as well

any ideas?

Upvotes: 0

Views: 170

Answers (1)

JBaruch
JBaruch

Reputation: 22893

Builds aren't directly tied to repositories, but to artifacts. Since Artifactory uses smart checksum-based storage, the location of artifacts in one repository or another is just an abstraction on top of a physical location.

That means that when you promote (move or copy) artifact from one repository to another, the link to build remains the same (linked by checksum to whatever abstract location).

So, the short answer is - no, you can't scope build to repository. Long answer - builds should be operated based on their status, not based on the location of artifacts. E.g. you can delete all the builds with status "rolled-back", wherever the artifacts are.

Upvotes: 1

Related Questions