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

feat(output): save list of deleted artifacts as json #145

Merged
merged 5 commits into from
Aug 20, 2024

Conversation

zkygr
Copy link
Contributor

@zkygr zkygr commented Jul 10, 2024

Hello,

I am also interested in the feature from Pull Request #136
I have rebased the feature branch on master, squashed the commits, and made some modifications.

@roytev introduced a new option, --output-artifacts, which only worked with the specific combination of --output ... --output-format json --output-artifacts
As an alternative, I added a new --output-format named json-with-artifact-list, which I find to be more understandable.

README.md Outdated Show resolved Hide resolved
@allburov allburov added the stale label Aug 15, 2024
Copy link
Member

@allburov allburov left a comment

Choose a reason for hiding this comment

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

artifactory-cleanup --output=myfile.txt --output-format=json --output-artifacts

https://github.com/devopshq/artifactory-cleanup/pull/145/files#r1674212222

@zkygr zkygr force-pushed the feat/save_deleted_artifacts_as_json branch from 4fedd22 to 02b6f49 Compare August 16, 2024 21:15
@zkygr
Copy link
Contributor Author

zkygr commented Aug 17, 2024

The fixup commit contains your required changes.

@zkygr zkygr force-pushed the feat/save_deleted_artifacts_as_json branch from a0b8487 to ad796af Compare August 17, 2024 10:19
artifactory_cleanup/artifactorycleanup.py Outdated Show resolved Hide resolved
Comment on lines 29 to 30
output_format: str,
output_artifacts: bool,
Copy link
Member

Choose a reason for hiding this comment

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

Cleanup doesn't have to know about output, it works and returns in memory objects

Suggested change
output_format: str,
output_artifacts: bool,

artifactory_cleanup/artifactorycleanup.py Outdated Show resolved Hide resolved
artifactory_cleanup/artifactorycleanup.py Outdated Show resolved Hide resolved
@allburov
Copy link
Member

I hope it's latest pass and we can merge it 🤞

@zkygr zkygr force-pushed the feat/save_deleted_artifacts_as_json branch from ee30a2b to ddcdada Compare August 19, 2024 08:59
@zkygr
Copy link
Contributor Author

zkygr commented Aug 19, 2024

The latest fixup contains:

  • clean up of artifactorycleanup.py
  • updated description of --output-artifacts
  • write to file with utf-8 encoding
  • indent json output
  • rename removed_artifacts_list to removed_artifacts because we are already in the context

@zkygr zkygr force-pushed the feat/save_deleted_artifacts_as_json branch from ddcdada to 8d4e2aa Compare August 19, 2024 09:18
@allburov allburov added enhancement New feature or request and removed stale labels Aug 20, 2024
@allburov allburov merged commit d6ed5f0 into devopshq:master Aug 20, 2024
2 checks passed
@allburov
Copy link
Member

TY! 🚀

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

Successfully merging this pull request may close these issues.

3 participants