Skip to content

Commit

Permalink
Merge #47799
Browse files Browse the repository at this point in the history
47799: build: map in the full teamcity alternates directory r=petermattis a=petermattis

Release note: None

Co-authored-by: Peter Mattis <[email protected]>
  • Loading branch information
craig[bot] and petermattis committed Apr 22, 2020
2 parents 998abbe + 2b57007 commit cacc329
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,15 @@ vols="${vols} --volume=${HOME}/.yarn-cache:${container_home}/.yarn-cache${cached

# If we're running in an environment that's using git alternates, like TeamCity,
# we must mount the path to the real git objects for git to work in the container.
alternates_file=${cockroach_toplevel}/.git/objects/info/alternates
if test -e "${alternates_file}"; then
alternates_path=$(cat "${alternates_file}")
vols="${vols} --volume=${alternates_path}:${alternates_path}${cached_volume_mode}"
# alternates_file=${cockroach_toplevel}/.git/objects/info/alternates
# if test -e "${alternates_file}"; then
# alternates_path=$(cat "${alternates_file}")
# vols="${vols} --volume=${alternates_path}:${alternates_path}${cached_volume_mode}"
# fi

teamcity_alternates="/home/agent/system/git/"
if test -d "${teamcity_alternates}"; then
vols="${vols} --volume=${teamcity_alternates}:${teamcity_alternates}${cached_volume_mode}"
fi

if [ "${BUILDER_HIDE_GOPATH_SRC:-}" != "1" ]; then
Expand Down

0 comments on commit cacc329

Please sign in to comment.