summaryrefslogtreecommitdiffhomepage
path: root/.buildkite/hooks/pre-command
blob: 1994287e8835d435a504627737928d4c8198cae4 (plain)
1
2
3
4
5
6
7
8
9
10
# Setup for parallelization with PARTITION and TOTAL_PARTITIONS.
export PARTITION=${BUILDKITE_PARALLEL_JOB:-0}
PARTITION=$((${PARTITION}+1)) # 1-indexed, but PARALLEL_JOB is 0-indexed.
export TOTAL_PARTITIONS=${BUILDKITE_PARALLEL_JOB_COUNT:-1}

# Ensure Docker has experimental enabled.
if ! grep experimental /etc/docker/daemon.json >/dev/null; then
  make sudo TARGETS=//runsc:runsc ARGS="install --experimental=true"
  sudo systemctl reload docker
fi