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

Cleanup based on output JSON file #146

Open
hamzastahi opened this issue Aug 8, 2024 · 4 comments
Open

Cleanup based on output JSON file #146

hamzastahi opened this issue Aug 8, 2024 · 4 comments

Comments

@hamzastahi
Copy link

For now, the artifactory-cleanup tool provides the possibility to save the output as a txt or json file.
By default, artifactory-cleanup runs on dry-run mode.
Is it possible to run artifactory-cleanup and save the output on a JSON file, then based on this json file do the destroy without doing all the job again of getting the artifacts to delete ?

@allburov
Copy link
Member

allburov commented Aug 9, 2024

So you want to review --dry in JSON and then put only approved items, something like this?
That would be great option to have, agree!

@allburov
Copy link
Member

allburov commented Aug 9, 2024

PRs are welcome for the feature! 🙏

@allburov
Copy link
Member

In 1.0.11 we have a way to save removed artifacts in JSON thanks to #145

Idk if we save the list there in --dry, but probably we could do that and then use this output file as "source" for all policies

@hamzastahi
Copy link
Author

hamzastahi commented Aug 22, 2024

What will be better is to save this list as source for destroy.
This will be benefical without redo the same thing when using --destroy argument.

for example :
artifactory-cleanup --output=myfile.json --output-format json --output-artifacts

Then use --destroy :
artifactory-cleanup --input=myfile.json --destroy

This is an example to just explain the feature and not the exact thing to do ;).

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

No branches or pull requests

2 participants