predrags_dummy_pipelines 0.7.3 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 218b9323c4bb63d1684400344204d48c80f9a413
4
- data.tar.gz: 075a679fae9c2ebe4b203f8f252f9245c1b9b194
3
+ metadata.gz: 54a9f3e889cedec60ab980d4ef4c58eeb9b000d1
4
+ data.tar.gz: 74fc648565cc40f42dcdcfb58e5f58d246eaf0b1
5
5
  SHA512:
6
- metadata.gz: 715130571e506eed674494cfef0f5a1967f80048143b436cf7c8683cb732974dd17c868a28305968b96cd37fad2644a98995c3719697a1a07e43a1af907bd19e
7
- data.tar.gz: ae7a1158412ecae76677fcd5b1791d0b4d254863b0af48d1e1471426661e1776ffc9d2e3c6be2af2080421140f0241d3990aebfb1793a2487533e865df10f346
6
+ metadata.gz: 68d73c5804ae59a7408aa132da7f4d77bfc9ecb1ab1a3e5a47fd760f651e63b0e384697ac612d6da184377c8869a0cd03995c4b9ed19ed9c07ec3cf9a6b9dec6
7
+ data.tar.gz: 8fc31fd452eb8f634784ba137ec7711f8810099343faa47d1094080869e88704dc1dad59c1e011d9932f9401cbb0c4b5e642ac6c79541c9ffe2e6334b2309e87
@@ -15,10 +15,29 @@ module PredragsDummyPipelines
15
15
 
16
16
  def run
17
17
  run_cmd(@cmd, @cmd_results, true)
18
- return if @cmd_results.last[:estatus] != 0
18
+ return if not success_impl(@cmd_results)
19
19
  run_cmd(@test, @test_results, false)
20
20
  end
21
21
 
22
+ def show
23
+ [{exec_name: @name}, @cmd_results, @test_results]
24
+ end
25
+
26
+ def results
27
+ {:cmd => @cmd_results, :test => @test_results, name: @name}
28
+ end
29
+
30
+ def success?
31
+ success_impl(@cmd_results) and success_impl(@test_results)
32
+ end
33
+
34
+ def success_impl(results)
35
+ return false if (results == [])
36
+ results.map {|cmd| cmd[:estatus]}.all? {|status| status == 0}
37
+ end
38
+
39
+ private
40
+
22
41
  def run_cmd(commands, results, should_break)
23
42
  commands.each {|c|
24
43
  begin
@@ -31,13 +50,6 @@ module PredragsDummyPipelines
31
50
  }
32
51
  @results
33
52
  end
34
-
35
- def show
36
- [{exec_name: @name}, @cmd_results, @test_results]
37
- end
38
-
39
- def results
40
- {:cmd => @cmd_results, :test => @test_results, name: @name}
41
- end
42
53
  end
54
+
43
55
  end
@@ -24,6 +24,10 @@ module PredragsDummyPipelines
24
24
  def deploy_results
25
25
  @deploys.map {|deploy| deploy.results}
26
26
  end
27
+
28
+ def success?
29
+ @build.success?
30
+ end
27
31
  end
28
32
 
29
33
  end
@@ -1,3 +1,3 @@
1
1
  module PredragsDummyPipelines
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.5"
3
3
  end
data/project/simple.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  build:
2
2
  cmd:
3
- - ls lib
3
+ - ls -l lib
4
4
  - df -h
5
5
  test:
6
6
  - free -m
@@ -22,7 +22,7 @@ production:
22
22
 
23
23
  production2:
24
24
  cmd:
25
- - find . -name "lib"
25
+ - find . -name "/tmp"
26
26
  test:
27
27
  - asdf
28
28
  - po12
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: predrags_dummy_pipelines
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Predrag Rakic