last_green_go_pipeline 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/go_cd/last_green_build_fetcher.rb +10 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd3f7b43c7b795acf5922324c6b9b139af7a12c2
|
4
|
+
data.tar.gz: e2f1d16930184951412d960fc06da12f9b9293d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e6906c2e5cb4489dabeab24e9bdae409094667032f4ed6b89013274b9037460b43e6c52fd60f89d107e1c95645abb5f0926e55622f933a50b7f032acd9665b0
|
7
|
+
data.tar.gz: 6e2cce650a97f8ec6f8bee7a83f0328bbf5ab025bb60affdcd412bd990e4a05712a7c5756a0fa3bf883a3066199c968e827c9336093462eef0ac4bca164123dd
|
@@ -48,12 +48,21 @@ module GoCD
|
|
48
48
|
stage = pipeline.stages.find { |stage| stage.name == @stage }
|
49
49
|
if stage && stage.result == 'Passed'
|
50
50
|
stage.pipeline = pipeline
|
51
|
-
return stage
|
51
|
+
return stage if matches_filter(stage, filter)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
return nil
|
55
55
|
end
|
56
56
|
|
57
|
+
def matches_filter(stage, filters)
|
58
|
+
return true unless filters && filters[:dependencies]
|
59
|
+
filters[:dependencies].all? do |upstream_name, upstream_instance|
|
60
|
+
stage.pipeline.dependencies.any? do |dependency|
|
61
|
+
dependency.pipeline_name == upstream_name && dependency.identifier == upstream_instance
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
57
66
|
def remember(key, value)
|
58
67
|
@cache.transaction do
|
59
68
|
if @cache[@pipeline]
|