Skip to content

Commit

Permalink
Mount KOKORO_ARTIFACTS_DIR as a volume
Browse files Browse the repository at this point in the history
… instead of mounting the git/src subdirectory, because
CIPD creates hard links from that directory to files under its parent.

Fixed: 382250271
Issue: 365150653
Reviewed-on: #4665
  • Loading branch information
dahlstrom-g committed Jan 9, 2025
1 parent 67032e0 commit 15f8186
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions cobalt/devinfra/kokoro/bin/dind_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ fi

pipeline () {
local out_dir="${WORKSPACE_COBALT}/out/${TARGET_PLATFORM}_${CONFIG}"
local gclient_root="${KOKORO_ARTIFACTS_DIR}/chromium"
mkdir "${gclient_root}"
cp -a "${WORKSPACE_COBALT}" "${gclient_root}/src" # work around b/382250271
local gclient_root="${KOKORO_ARTIFACTS_DIR}/git"

# Set up gclient and run sync.
##############################################################################
Expand All @@ -64,10 +62,6 @@ pipeline () {
cd "${gclient_root}/src"
cobalt/build/gn.py -p "${TARGET_PLATFORM}" -C "${CONFIG}"
ninja -C "out/${TARGET_PLATFORM}_${CONFIG}" ${TARGET} # TARGET may expand to multiple args
cp -a out "${WORKSPACE_COBALT}" # preserve build outputs

cd "${WORKSPACE_COBALT}"
rm -rf "${gclient_root}" # remove extraneous artifacts

# Build bootloader config if set.
if [ -n "${BOOTLOADER:-}" ]; then
Expand Down
2 changes: 1 addition & 1 deletion cobalt/devinfra/kokoro/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
# This is the path that Kokoro is configured to clone the repo to.
# This becomes the new mount point within the container as well, so that
# the invocation of the inner-most Cobalt Build script is straight forward
- ${KOKORO_ARTIFACTS_DIR}/git/src:${KOKORO_ARTIFACTS_DIR}/git/src
- ${KOKORO_ARTIFACTS_DIR}:${KOKORO_ARTIFACTS_DIR}
- ${COBALT_SRC:-.}:/code/
# TODO(b/350543978): This block for environment variables is manually
# maintained. It would be easier to maintain if it were programmatically
Expand Down

0 comments on commit 15f8186

Please sign in to comment.