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

Lavatory doesn't read in policies with . in name #51

Open
APemberton1 opened this issue Mar 15, 2023 · 1 comment
Open

Lavatory doesn't read in policies with . in name #51

APemberton1 opened this issue Mar 15, 2023 · 1 comment

Comments

@APemberton1
Copy link

Lavatory cannot read in the policy of a Artifactory repo name with format my-artifactory.repo, e.g. a created policymy_artifactory.repo.py doesn't get read in.
looks like we need an update to:
https://github.com/gogoair/lavatory/blob/master/src/lavatory/utils/setup_pluginbase.py#L51
to replace the . in the policy name

@luca-drf
Copy link

As a workaround you can overwrite Artifactory instance's repo_name attribute value before performing any query in your purgelist() definition.

For example if your Artifactory repo's name is my-artifactory.repo, you could create a policy module named my_artifactory_repo.py and define purgelist() as:

def purgelist(artifactory):
    artifactory.repo_name = "my-artifactory.repo"
    ...

You'll have to use the policy module name as --repo argument when invoking lavatory purge on the command line though.

Example:

lavatory purge --repo my_artifactory_repo ...

Not ideal, but better than nothing.

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

No branches or pull requests

2 participants