File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,23 @@ deterministic_shuffle()
20
20
shuf --random-source=<( get_seeded_random " 0" )
21
21
}
22
22
23
- if [ -z " $CIRCLECI " ]
23
+ if [ " $CIRCLECI " = true ] ;
24
24
then
25
- echo " Work split accross $CIRCLE_NODE_TOTAL nodes"
26
- echo " Currently $CIRCLE_NODE_INDEX "
25
+ echo " Work split across $CIRCLE_NODE_TOTAL nodes"
26
+ echo " Node index $CIRCLE_NODE_INDEX "
27
27
sleep 1
28
28
else
29
29
echo " Running locally"
30
+ CIRCLE_NODE_TOTAL=1
31
+ CIRCLE_NODE_INDEX=0
30
32
fi
31
33
34
+ ls $MOCKS /* .json | deterministic_shuffle > /tmp/all
35
+ split -d -a1 -n l/$CIRCLE_NODE_TOTAL /tmp/all /tmp/queue
36
+
37
+ echo " "
32
38
echo " Generating test images"
33
- ls $MOCKS / * .json | awk ' !/mapbox/' | \
39
+ cat /tmp/queue $CIRCLE_NODE_INDEX | awk ' !/mapbox/' | \
34
40
# Shuffle to distribute randomly slow and fast mocks
35
41
deterministic_shuffle | \
36
42
# head -n 10 | \
You can’t perform that action at this time.
0 commit comments