简体   繁体   English

Artinfactory and gradle,詹金斯建造太空问题

[英]Artifactory and gradle, jenkins build space issue

I work on our project build and deployment process using gradle, Jenkins and artifactory server.I am currently facing a space issue on our server. 我正在使用gradle,Jenkins和工件服务器进行项目构建和部署过程,目前我的服务器面临空间问题。 I looked through the artifactory folder on my server, the artifactory/data/filestore size is @59GB.Though I don't think our projects need jars of so much size. 我浏览了服务器上的artifactory文件夹,artifactory / data / filestore大小为@ 59GB。尽管我认为我们的项目不需要那么大的jar。 Can anybody help how to reduce the filestore size and any impact of it on project build? 有人可以帮助减少文件存储大小以及对项目构建的影响吗?

There are various reasons which can cause Artifactory storage space to grow: 有多种原因可以导致Artifactory存储空间增长:

  1. Not cleaning up unused snapshot versions 不清除未使用的快照版本
  2. Garbage collection not running frequent enough or not running at all 垃圾收集运行不频繁或根本没有运行
  3. Unused 3rd part dependencies piling up 未使用的第三部分依赖项堆积

You should start by going over Managing Disk Space Usage in the Artifactory manual. 您应该首先查看Artifactory手册中的管理磁盘空间使用情况 It covers topics such as garbage collection, deleting unused artifacts, manual cleanup and others. 它涵盖了诸如垃圾收集,删除未使用的工件,手动清理等主题。

Update 更新资料

In case most of the artifacts that are consuming the storage are release artifacts, you need to decide whether you need to store all off them or can move them to another place. 如果消耗存储的大部分工件是发布工件,则需要确定是否需要全部存储还是可以将它们移动到另一个地方。
By release artifacts I means artifacts that have passed your CI pipeline and are ready for production, those can be: 通过发布工件,我指的是已经通过您的CI管道并准备投入生产的工件,它们可以是:

  • Artifacts deployed in production (private/public cloud) 生产中部署的工件(私有/公共云)
  • Release version of libraries/modules being used by other projects 其他项目正在使用的库/模块的发行版本
  • Products/Libraries distributed to customers 分发给客户的产品/库

As long as such artifacts are required, for example because other teams depends on them for development, you should keep them where they are. 只要需要这些工件(例如,因为其他团队依赖它们进行开发),就应将它们保留在原处。 If they are not being used any more but you need to keep a copy of them you may want to move them to another Artifactory server which will serve as an archive. 如果不再使用它们,但是您需要保留它们的副本,则可能需要将它们移动到另一个Artifactory服务器,该服务器将用作存档。

Update 2 更新2

For deleting artifacts you can use one of the following methods: 要删除工件,可以使用以下方法之一:

  1. Use the delete item REST API for deleting artifacts/folders 使用删除项 REST API删除工件/文件夹
  2. Use the delete builds REST API for deleting complete builds. 使用delete builds REST API删除完整的版本。 This is useful if you are using the Artifactory build integration 如果您正在使用Artifactory 构建集成,这将非常有用
  3. Create a custom cleanup user plugin . 创建一个自定义清理用户插件 You can see some examples in Github . 您可以在Github中看到一些示例。 This requires Artifactory Pro. 这需要Artifactory Pro。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM