Deployment appears to run on all three nodes despite attempts otherwise

circle.yml

#1

We use 3 circle nodes for our builds. I’ve added the following configuration:
deployment: prebuild_webpack_assets: branch: mybranch commands: - ./script/do_it.sh

In the script, I’ve added a guard so that I only deploy from the first (0th) container of the circle node as follows:
# portion of ./script/do_it.sh
[[ "$CIRCLE_NODE_INDEX" == "0" ]] || exit 0

Upon further investigation of why this didn’t work, ssh’ing into each node, CIRCLE_NODE_INDEX is set properly from the ssh login.

BUG STATEMENT: During deployment phase, on every single node, CIRCLE_NODE_INDEX appears to be set to 0.

Is this triggering 3 deploy actions or is it instead displaying the deploy actions from Node 0 on all the containers?


#2