File tree Expand file tree Collapse file tree 4 files changed +53
-0
lines changed Expand file tree Collapse file tree 4 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ AGENT_WORKSPACE=" $( cd .. && pwd) /agent-workspace"
6+ mkdir -p " $AGENT_WORKSPACE "
7+
8+ cp -R .buildkite/scripts/run-agents/hooks " $AGENT_WORKSPACE /"
9+
10+ cd " $AGENT_WORKSPACE "
11+
12+ cp " $BUILDKITE_CONFIG_PATH " .
13+ CONFIG_FILE=" $( basename " $BUILDKITE_CONFIG_PATH " ) "
14+
15+ cat << EOF >> "$CONFIG_FILE "
16+ build-path=$AGENT_WORKSPACE /builds
17+ disconnect-after-idle-timeout=600
18+ hooks-path=$AGENT_WORKSPACE /hooks
19+ disconnect-after-job=false
20+ cancel-grace-period=300
21+ EOF
22+
23+ buildkite-agent start --queue elasticsearch-quick-agent --spawn-per-cpu 1
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [[ " ${1:- } " == " submodule" ]]; then exit 0; fi
4+
5+ " $ES_ORIGINAL_GIT_BINARY " " ${@ } "
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ git sparse-checkout init --cone
4+ git sparse-checkout set .buildkite
5+
6+ if [[ -n " ${ES_PARTIAL_CHECKOUT_PATHS:- } " ]]; then
7+ git sparse-checkout add " $ES_PARTIAL_CHECKOUT_PATHS "
8+ fi
9+
10+ git checkout HEAD
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
4+
5+ ES_ORIGINAL_GIT_BINARY=$( which git)
6+ export ES_ORIGINAL_GIT_BINARY
7+
8+ mkdir -p " $HOME /git-wrapper"
9+ cp " $DIR /../git" " $HOME /git-wrapper/"
10+ chmod +x " $HOME /git-wrapper/git"
11+
12+ export PATH=" $HOME /git-wrapper:$PATH "
13+
14+ export BUILDKITE_GIT_CLONE_FLAGS=" -v --filter=blob:none --no-checkout --depth=1 --sparse"
15+ export BUILDKITE_GIT_FETCH_FLAGS=" -v --update-shallow"
You can’t perform that action at this time.
0 commit comments