Giter VIP home page Giter VIP logo

artifactory-cleanup's Introduction

Hi there ๐Ÿ‘‹

๐Ÿ‘ท Check out what I'm currently working on

๐Ÿ‘จโ€๐Ÿ’ป Repositories I created recently

๐Ÿš€ Latest releases I've contributed to

โค๏ธ Latest sponsors

Thanks again for your support, it is much appreciated! ๐Ÿ™

artifactory-cleanup's People

Contributors

crazy-max avatar dependabot[bot] avatar github-actions[bot] avatar klaudioz avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

artifactory-cleanup's Issues

Runtime error: invalid memory address

Behaviour

Running on version 1.7.0 on Windows 10
Command ".\artifactory-cleanup.exe --dry-run" produces

Steps to reproduce this issue

  1. Version 1.7.0 artifactory-cleanup.exe on Windows 10 using Windows Powershell
  2. Command ".\artifactory-cleanup.exe --dry-run"
  3. Using example artifactory-cleanup.yml from download.
  4. Get error panic: runtime error: invalid memory address or nil pointer dereference
    [signal 0xc0000005 code=0x0 addr=0x0 pc=0xd6bed5]

Expected behaviour

Should return results from Dryrun

Actual behaviour

Get no results and an error (attached)

Configuration

  • Artifactory Cleanup version (1.7.0):

  • Platform (windows 10):

  • System info (type uname -a): Device name USBLPF36S803
    Full device name USBLPF36S803.bct.gambro.net
    Processor 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz 2.80 GHz
    Installed RAM 32.0 GB (31.7 GB usable)
    Device ID 8AF03655-E747-40E2-8FDF-F82ED5B92155
    Product ID 00330-80000-00000-AA324
    System type 64-bit operating system, x64-based processor
    Pen and touch No pen or touch input is available for this display

  • JFrog Artifactory version: Jfrog Cloud (v2023.2.414)

Logs

Artifactory Cleanup logs (set --log-level flag to debug) No logs as it never gets that far.


error

Using a subfolder over cleanup_repository

Is possible to use a subfolder?. I'm using artifactory-cleanup without any issue to clean a repository called x which is Package Type: | RPM

If I try to use cleanup_repository= x/y or y I'm getting: ERR Cannot retrieve repo configuration for sgd error="400 Bad Request" policy=cleanup-policy

I duplicated the project which is working well and for the new one I only changed the parameters cleanup_repository as I described before, plus I set cleanup_include_names=* and cleanup_dryrun=true for my testing.

Run tool on demand, not scheduled

Hi Max,

Loving the tool! Is there a plan for the tool to not require a CRON expression to run?
I'm using it in my CI setup, so I just put * * * * * there and it complains every minute, but it runs.
However, after it's done, the CI pipeline keeps running as the next run is automatically scheduled in another minute.

Would be great to have a option to simply run it immediately.
If it's already available, I must've missed it in the docs, so please point me to a correct section.

Thank you!

Docker last_downloaded is always 1970-01-01T01:00:00+01:00

Behaviour

The setting lastDownloaded: true is not taken into account because the last_downloaded for docker images is always 1970-01-01T01:00:00+01:00.

Configuration

  • Artifactory Cleanup version (0.1.0): 1.5.0
  • Platform (windows/linux/freebsd/macos): Tested on MacOS and Linux
  • JFrog Artifactory version: 7.35.2

Logs

Wed, 27 Apr 2022 11:30:20 CEST TRC Artifactory docker tag last modified response last_modified={"lastModified":"2022-04-23T00:22:07.230+0000","uri":"https://example/artifactory/api/storage/local-docker/foo/bar/manifest.json"}
Wed, 27 Apr 2022 11:30:20 CEST TRC Artifactory artifact file stats response file_stats={"downloadCount":0,"lastDownloaded":0,"remoteDownloadCount":0,"remoteLastDownloaded":0,"uri":"https://example/artifactory/local-docker/foo/bar"}
Wed, 27 Apr 2022 11:30:20 CEST INF Image will be removed docker_repo=foo/bar dry_run=true last_downloaded=1970-01-01T01:00:00+01:00 last_modified=2022-04-23T00:22:07Z policy=policy_docker registry=local-docker size=892MB tag=bar

Solution

My suggested solution is to add /manifest.json also to the last downloaded call in

return c.LastDownloaded(registry, path.Join(repo, tag))
like:

 return c.LastDownloaded(registry, path.Join(repo, tag, "manifest.json")) 

Or is there any reason you added not the manifest.json? I can reproduce it via the Artifactory API. When calling the file stats call to the docker folder it's returning "lastDownloaded: 0", when querying the manifest.json it has a proper value set.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.