小编Sam*_*kar的帖子

gitlab-runner 的 Docker 卷清理

我是 docker 和 jenkins 的新手。但是最终我在 jenkins 中创建了一个作业,以便我可以删除存储在我们的 linux 机器(CentOS7)中的 gitlab-runner 的卷缓存

为了实现这一点,我每 6 小时在 jenkins 中使用以下命令创建一个定期作业:

docker volume prune -f 
Run Code Online (Sandbox Code Playgroud)

但是它根本不清理空间。这是詹金斯工作的输出:

Started by timer
Running as SYSTEM
Building remotely on buildbng17 (gitlab) in workspace /mnt/data0/jenkins/workspace/gitlab-cleanup
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
[gitlab-cleanup] $ /bin/sh -xe /tmp/jenkins3799570002967825583.sh
+ find /mnt/data0/gitlab/data/backups/ -name '*.tgz' -mtime +30
/mnt/data0/gitlab/data/backups/etc-gitlab-1611415968.tgz
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of …
Run Code Online (Sandbox Code Playgroud)

jenkins gitlab docker gitlab-ci gitlab-ci-runner

0
推荐指数
1
解决办法
1031
查看次数

标签 统计

docker ×1

gitlab ×1

gitlab-ci ×1

gitlab-ci-runner ×1

jenkins ×1