Skip to content

Commit

Permalink
Share stream checkout between all agents (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-johnson authored Feb 3, 2020
1 parent 275e79f commit d480d73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hooks/pre-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ if [[ "${BUILDKITE_PLUGIN_PERFORCE_SHARE_WORKSPACE}" == true ]] ; then
# Sanitize //depot/stream-name to __depot_stream-name
SANITIZED_STREAM=$(echo $STREAM | python -c "import sys; print(sys.stdin.read().replace('/', '_'));")

PERFORCE_CHECKOUT_PATH="${BUILDKITE_BUILD_CHECKOUT_PATH}/../${SANITIZED_STREAM}"
# Instead of builds/<agent_number>/<pipeline>, checkout to builds/<stream_name>
PERFORCE_CHECKOUT_PATH="${BUILDKITE_BUILD_CHECKOUT_PATH}/../../${SANITIZED_STREAM}"
export BUILDKITE_BUILD_CHECKOUT_PATH="${PERFORCE_CHECKOUT_PATH}"
echo "Changed BUILDKITE_BUILD_CHECKOUT_PATH to ${PERFORCE_CHECKOUT_PATH}"
fi

0 comments on commit d480d73

Please sign in to comment.