circleci-parallel 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +8 -8
- data/lib/circleci/parallel/task/base.rb +1 -1
- data/lib/circleci/parallel/version.rb +1 -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: 4613a77e68888f34117d79b0dd40bc63006d7c33
|
4
|
+
data.tar.gz: 69f3b6d6ef9c1335e4fb2d50de2ddede656cca51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d98de038acc878c686307b7690dcd663df779d53613030ace6a30f1d0e9d62ca64275cdd64ef938156a5a322e2cbe387797d246c190575779f7ab56ff729fee0
|
7
|
+
data.tar.gz: 94d320c7b6e14125c9f639486f228819e27358309c29ed0e4ec186de83fb6c01b77434a859bd81cf3c1d0a88700470baa8f34654740ef6b995f7e1ba65f10243
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -6,8 +6,8 @@
|
|
6
6
|
|
7
7
|
# CircleCI::Parallel
|
8
8
|
|
9
|
-
**CircleCI::Parallel** provides simple APIs for
|
10
|
-
and
|
9
|
+
**CircleCI::Parallel** provides simple APIs for syncing [CircleCI parallel nodes](https://circleci.com/docs/parallelism/)
|
10
|
+
and transferring files between the nodes.
|
11
11
|
|
12
12
|
## Installation
|
13
13
|
|
@@ -32,7 +32,7 @@ Before using CircleCI::Parallel:
|
|
32
32
|
* [Set up parallelism](https://circleci.com/docs/setting-up-parallelism/)
|
33
33
|
for your project from the CircleCI web console.
|
34
34
|
|
35
|
-
CircleCI::Parallel uses SSH for
|
35
|
+
CircleCI::Parallel uses SSH for syncing nodes and transferring data between nodes.
|
36
36
|
|
37
37
|
```yaml
|
38
38
|
# circle.yml
|
@@ -46,8 +46,6 @@ test:
|
|
46
46
|
# test.rb
|
47
47
|
require 'circleci/parallel'
|
48
48
|
|
49
|
-
merged_data = {}
|
50
|
-
|
51
49
|
CircleCI::Parallel.configure do |config|
|
52
50
|
# This hook will be invoked on all the nodes.
|
53
51
|
# The current working directory in this hook is set to the local data directory
|
@@ -71,20 +69,22 @@ CircleCI::Parallel.configure do |config|
|
|
71
69
|
# └── node2
|
72
70
|
# └── node_specific_data_you_saved_on_node2.txt
|
73
71
|
config.after_download do
|
72
|
+
merged_data = {}
|
73
|
+
|
74
74
|
Dir.glob('*/data.json') do |path|
|
75
75
|
json = File.read(path)
|
76
76
|
data = JSON.parse(json)
|
77
77
|
node_name = File.dirname(path)
|
78
78
|
merged_data[node_name] = data
|
79
79
|
end
|
80
|
+
|
81
|
+
p merged_data
|
80
82
|
end
|
81
83
|
end
|
82
84
|
|
83
|
-
#
|
85
|
+
# Sync all nodes in the same build and gather all node data into the master node.
|
84
86
|
# Invoking this method blocks until the join and data downloads are complete.
|
85
87
|
CircleCI::Parallel.join
|
86
|
-
|
87
|
-
p merged_data
|
88
88
|
```
|
89
89
|
|
90
90
|
See [API docs](http://www.rubydoc.info/gems/circleci-parallel) for more details.
|