devkitkat 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +16 -0
- data/Gemfile.lock +3 -3
- data/lib/devkitkat/main.rb +10 -14
- data/lib/devkitkat/service.rb +10 -0
- data/lib/devkitkat/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55796edb4547d60acd5924608760ba58eb8f32eb691e8cb7d06470992477d7b6
|
4
|
+
data.tar.gz: ed682227f7f5dcf62db337522fb7a136cf8f1eedf01fe2304c8c6289a13679cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5650c0b7181067198511ee3c705d14b79a370926f76f04d49e24f4f15c0ac68b7c3bebb7fb435649c630fba1c5ce080c229bc4dac703564712036a6711178fee
|
7
|
+
data.tar.gz: 37d21b034badaa397bb81d9163c8f5e1c3038429773204e297dd7e60013bb84cfe77b285990b3065418d85b40c73779893bef81c54b4ccf8d3fee9272db50d7e
|
data/.gitlab-ci.yml
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
+
stages:
|
2
|
+
- test
|
3
|
+
- release
|
4
|
+
|
1
5
|
rspec:
|
2
6
|
stage: test
|
3
7
|
tags:
|
4
8
|
- do-runner
|
5
9
|
before_script:
|
10
|
+
- docker rm -f $(docker ps -a -q)
|
6
11
|
- docker info
|
7
12
|
- pwd
|
8
13
|
- gem install bundler
|
@@ -10,6 +15,17 @@ rspec:
|
|
10
15
|
script:
|
11
16
|
- bundle exec rspec
|
12
17
|
|
18
|
+
release:
|
19
|
+
stage: release
|
20
|
+
tags:
|
21
|
+
- do-runner
|
22
|
+
script:
|
23
|
+
- bin/release
|
24
|
+
only:
|
25
|
+
changes:
|
26
|
+
- lib/devkitkat/version.rb
|
27
|
+
when: manual
|
28
|
+
|
13
29
|
# services:
|
14
30
|
# - docker:19.03.1-dind
|
15
31
|
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
devkitkat (0.1.
|
4
|
+
devkitkat (0.1.3)
|
5
5
|
activesupport (~> 6.0.0)
|
6
6
|
colorize (~> 0.8.1)
|
7
7
|
docker-api (~> 1.34.2)
|
8
8
|
parallel (~> 1.17.0)
|
9
|
+
pry (~> 0.12.2)
|
10
|
+
pry-nav
|
9
11
|
ruby-progressbar (~> 1.10.1)
|
10
12
|
|
11
13
|
GEM
|
@@ -64,8 +66,6 @@ PLATFORMS
|
|
64
66
|
DEPENDENCIES
|
65
67
|
bundler (~> 1.17)
|
66
68
|
devkitkat!
|
67
|
-
pry (~> 0.12.2)
|
68
|
-
pry-nav
|
69
69
|
rake (~> 10.0)
|
70
70
|
rspec (~> 3.0)
|
71
71
|
rspec-temp_dir (~> 1.1.0)
|
data/lib/devkitkat/main.rb
CHANGED
@@ -12,34 +12,30 @@ module Devkitkat
|
|
12
12
|
raise ArgumentError, 'TTY mode accepts only one service'
|
13
13
|
end
|
14
14
|
|
15
|
+
results = []
|
16
|
+
|
15
17
|
if target_services.count == 1
|
16
18
|
# If the target is only one, it could be console access (TTY)
|
17
19
|
# so we can't run in parallel.
|
18
|
-
|
19
|
-
execute_for(service)
|
20
|
+
results << target_services.first.execute
|
20
21
|
else
|
21
22
|
print_log_paths
|
22
23
|
|
23
|
-
Parallel.map(target_services, progress: 'Executing', in_processes: 8) do |service|
|
24
|
-
|
24
|
+
results = Parallel.map(target_services, progress: 'Executing', in_processes: 8) do |service|
|
25
|
+
service.execute.tap do |success|
|
26
|
+
raise Parallel::Kill unless success
|
27
|
+
end
|
25
28
|
end
|
26
29
|
end
|
30
|
+
|
31
|
+
exit(1) unless results&.all? { |result| result == true }
|
27
32
|
end
|
28
33
|
|
29
34
|
private
|
30
35
|
|
31
|
-
def execute_for(service)
|
32
|
-
begin
|
33
|
-
service.execute!
|
34
|
-
rescue Devkitkat::Service::ScriptError => e
|
35
|
-
puts "Failure: #{e}".colorize(:red)
|
36
|
-
raise Parallel::Kill
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
36
|
def target_services
|
41
37
|
@target_services ||= config.resolve!(command.target, exclude: command.options[:exclude])
|
42
|
-
|
38
|
+
.map { |name| Service.new(name, config, command) }
|
43
39
|
end
|
44
40
|
|
45
41
|
def print_log_paths
|
data/lib/devkitkat/service.rb
CHANGED
data/lib/devkitkat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devkitkat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinya Maeda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|