gitlab-janitor 1.0.2.92954 → 1.0.4.94868

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d30c776be84dee7e7b8c4a73d673d2451616be840520d1d95e1ca188938fda5
4
- data.tar.gz: 319fd27d649da536d50dfdd6e843e679feba214dbe6bdac2d2374bd62f578345
3
+ metadata.gz: 68707afb3c4d00de5e3bbe016591d74a61198786ad3ea5a298a74f3814b061c4
4
+ data.tar.gz: 07a89ef4b09f63955b0060492f8efa06787abcdc2f8cdecb9ebef1a3d31d564d
5
5
  SHA512:
6
- metadata.gz: 219f50ebb36a73e11df5afb3d690c4f10e77737a4f2121b3bf8dae531ef89b276b7d818caec2e1dac3503f3ee7e21668fd57d5168229e1d773257acd257350a2
7
- data.tar.gz: e76b506effee2b589b01f65561126c0c5a9c964dd1af05abd4299a55c21209e394b666b377839a10ef81219a992321a69c46692251d60a67eed2097b292540af
6
+ metadata.gz: f6451ed22578acc8bdc37e9675beccb76c2cb3a0d74df54ceb9f60602cb17379c8caa315033b8acea5dc5df66a8e42807e8f1c092a0a6806243cc1f457a6300d
7
+ data.tar.gz: 0ce45e45e276e3a32528cf0dc73283b579b26e8d9777913b85ef61fdc07c1e055432c23a7ab660fd8de6ab45d1e51acd2730f0a2e4c960eda5f6d87be1e31595
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-janitor (1.0.2.92954)
4
+ gitlab-janitor (1.0.4.94868)
5
5
  activesupport (~> 6.0)
6
6
  docker-api
7
7
  fugit
@@ -34,12 +34,12 @@ GEM
34
34
  raabro (~> 1.4)
35
35
  i18n (1.12.0)
36
36
  concurrent-ruby (~> 1.0)
37
- minitest (5.16.2)
37
+ minitest (5.16.3)
38
38
  multi_json (1.15.0)
39
39
  optparse (0.2.0)
40
40
  raabro (1.4.0)
41
41
  rake (13.0.6)
42
- redis (4.7.1)
42
+ redis (4.8.0)
43
43
  rspec (3.11.0)
44
44
  rspec-core (~> 3.11.0)
45
45
  rspec-expectations (~> 3.11.0)
@@ -69,12 +69,13 @@ GEM
69
69
  unicode-display_width (>= 1.1.1, < 3)
70
70
  tzinfo (2.0.5)
71
71
  concurrent-ruby (~> 1.0)
72
- tzinfo-data (1.2022.1)
72
+ tzinfo-data (1.2022.3)
73
73
  tzinfo (>= 1.0.0)
74
74
  unicode-display_width (2.2.0)
75
75
  zeitwerk (2.6.0)
76
76
 
77
77
  PLATFORMS
78
+ ruby
78
79
  x86_64-linux
79
80
 
80
81
  DEPENDENCIES
@@ -88,4 +89,4 @@ DEPENDENCIES
88
89
  simplecov-console
89
90
 
90
91
  BUNDLED WITH
91
- 2.3.11
92
+ 2.3.20
data/README.md CHANGED
@@ -5,7 +5,11 @@
5
5
  [![Gem Version](https://badge.fury.io/rb/gitlab-janitor.svg)](https://rubygems.org/gems/gitlab-janitor)
6
6
  [![Gem](https://img.shields.io/gem/dt/gitlab-janitor.svg)](https://rubygems.org/gems/gitlab-janitor/versions)
7
7
  [![YARD](https://badgen.net/badge/YARD/doc/blue)](http://www.rubydoc.info/gems/gitlab-janitor)
8
- [![outdated](https://lysander.rnds.pro/api/v1/badges/gitlab-janitor_outdated.svg)](https://lysander.rnds.pro/api/v1/badges/gitlab-janitor_outdated.html)
8
+
9
+
10
+ [![quality](https://lysander.rnds.pro/api/v1/badges/janitor_quality.svg)](https://lysander.rnds.pro/api/v1/badges/janitor_quality.html)
11
+ [![outdated](https://lysander.rnds.pro/api/v1/badges/janitor_outdated.svg)](https://lysander.rnds.pro/api/v1/badges/janitor_outdated.html)
12
+ [![vulnerable](https://lysander.rnds.pro/api/v1/badges/janitor_vulnerable.svg)](https://lysander.rnds.pro/api/v1/badges/janitor_vulnerable.html)
9
13
 
10
14
 
11
15
 
@@ -10,14 +10,28 @@ module GitlabJanitor
10
10
  def do_clean(keep_size: '10G', remove: false)
11
11
  logger.info 'Removing cache...'
12
12
  if remove
13
- out, _status = Open3.capture2e("docker builder prune --keep-storage #{keep_size} -f")
14
- logger.info(out)
13
+ prune_builder(keep_size)
14
+ prune_buildx(keep_size)
15
15
  else
16
16
  logger.info 'Skip removal due to dry run'
17
17
  end
18
18
  out, _status = Open3.capture2e('docker system df')
19
19
  logger.info(out)
20
20
  end
21
+
22
+ def prune_builder(keep_size)
23
+ out, _status = Open3.capture2e("docker builder prune --keep-storage #{keep_size} -f")
24
+ logger.info(out)
25
+ rescue StandardError =>e
26
+ logger.warn("Unable to clean BUILDER: #{e.inspect}")
27
+ end
28
+
29
+ def prune_buildx(keep_size)
30
+ out, _status = Open3.capture2e("docker buildx prune --keep-storage #{keep_size} -f")
31
+ logger.info(out)
32
+ rescue StandardError =>e
33
+ logger.warn("Unable to clean BUILDX: #{e.inspect}")
34
+ end
21
35
 
22
36
  end
23
37
  end
@@ -1,6 +1,6 @@
1
1
  module GitlabJanitor
2
2
 
3
- VERSION = '1.0.2'.freeze
3
+ VERSION = '1.0.4'.freeze
4
4
 
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-janitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2.92954
4
+ version: 1.0.4.94868
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samoilenko Yuri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-11 00:00:00.000000000 Z
11
+ date: 2022-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print