Comments (6)
I get this too; RepoList is broken. If I remove the exception catching to get a full traceback it looks like:
Checking 'pypi-master' repository exists.
Traceback (most recent call last):
File "/usr/local/bin/artifactory-cleanup", line 8, in <module>
sys.exit(ArtifactoryCleanupCLI())
File "/usr/local/lib/python3.8/site-packages/plumbum/cli/application.py", line 177, in __new__
return cls.run()
File "/usr/local/lib/python3.8/site-packages/plumbum/cli/application.py", line 634, in run
retcode = inst.main(*tailargs)
File "/usr/local/lib/python3.8/site-packages/artifactory_cleanup/cli.py", line 121, in main
for summary in cleanup.cleanup(
File "/usr/local/lib/python3.8/site-packages/artifactory_cleanup/artifactorycleanup.py", line 41, in cleanup
policy.check()
File "/usr/local/lib/python3.8/site-packages/artifactory_cleanup/rules/base.py", line 192, in check
rule.check(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/artifactory_cleanup/rules/repo.py", line 52, in check
repo.check(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/artifactory_cleanup/rules/repo.py", line 28, in check
r = self.session.get(url)
AttributeError: 'NoneType' object has no attribute 'get'
Perhaps the BaseUrlSession object hasn't been initialised?
Everything works great for this repo on its own using just Repo
.
from artifactory-cleanup.
@allburov there's a tiny fix here: #89
Please take a look.
from artifactory-cleanup.
That's great! Thank you for your hard work.
from artifactory-cleanup.
Could you get a full yaml configuration and the full traceback? You can remove your private data there
from artifactory-cleanup.
Sure, here's also the code running as intended on the normal repo & name config.
artifactory-cleanup:
server: $ARTIFACTORY_SERVER
user: $ARTIFACTORY_USERNAME
password: $ARTIFACTORY_PASSWORD
policies:
- name: Remove all empty folders from repo1
rules:
- rule: Repo
name: "repo1"
- rule: DeleteEmptyFolders
Which works as intended as seen here:
+----------------------------------------------------+-------------+------+
| Cleanup Policy | Files count | Size |
+----------------------------------------------------+-------------+------+
| Remove all empty folders from ba-core-docker-local | 16474 | 299G |
| | | |
| Total size: 299G | | |
+----------------------------------------------------+-------------+------+
But when i utilize Repolist:
artifactory-cleanup:
server: $ARTIFACTORY_SERVER
user: $ARTIFACTORY_USERNAME
password: $ARTIFACTORY_PASSWORD
policies:
- name: Delete empty folders from [repo1, repo2, repo3]
rules:
- rule: RepoList
repos:
- repo1
- repo2
- repo3
- rule: DeleteEmptyFolders
I get the aforementioned unceremonious error no traceback:
$ artifactory-cleanup
********************************************************************************
Verbose MODE
Checking 'repo1' repository exists.
Check failed for rule 'RepoList' in policy 'Delete empty folders from [repo1, repo2, repo3]':
'NoneType' object has no attribute 'get'
Which leads me to believe i have a formatting error, but this is what i gathered from the instructions.
I've tried different configurations but since i can't find a proper example on repoList i thought i'd open this issue with this question.
Just for clarification i replaced the repos with just placeholder names here but when i run the normal configuration above it has no problems finding the repos, i also tried the repos with or without quotes to the same result, not sure if that matters tho.
My artifactory-cleanup i believe is up to date:
$ artifactory-cleanup --version
artifactory-cleanup 1.0.3
from artifactory-cleanup.
Hello! Any news on this issue?
from artifactory-cleanup.
Related Issues (20)
- Repo name doesn't allow for "/" paths HOT 1
- fail to delete maven-metadata.xml with 404 after pom was deleted HOT 2
- Provide JSON Schema for config file HOT 1
- Support for jfrog cloud HOT 3
- _collect_docker_size queries for all items in the registry HOT 4
- Add option KeepLatestNImages HOT 2
- Problems with trashcan and conan HOT 3
- Possibility to use Regex HOT 5
- Exclude repo while deleting artifacts older than n days HOT 2
- how to delete empty folder with specific name HOT 2
- on prime - auth issue " 401 Client Error " HOT 3
- ExcludeDockerImages masks end up in missing layers HOT 2
- KeepLatestVersionNFilesInFolder is not working as expected HOT 8
- formatting question - KeepLatestVersionNFilesInFolder HOT 14
- "or" for rules HOT 1
- Formatting Question - KeepLatestNVersionImagesByProperty HOT 3
- Cleanup plugin issue HOT 1
- How to set retention policy in jfrog Artifactory HOT 1
- Output format to Json HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from artifactory-cleanup.