From 42a02a9217d204fac5d490e808b39ae9878c8cbc Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Sun, 31 Mar 2024 23:52:37 +0000 Subject: [PATCH] PMM-12899 use a dedicated folder for yarn cache --- build/local/build.sh | 1 + build/scripts/build-server-rpm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/build/local/build.sh b/build/local/build.sh index 03da4e51eb..cba72f27df 100755 --- a/build/local/build.sh +++ b/build/local/build.sh @@ -41,6 +41,7 @@ echo $fb_commit_sha > fbCommitSha # Create cache directories. test -d "${root_dir}/go-path" || mkdir -p "go-path" test -d "${root_dir}/go-build" || mkdir -p "go-build" +test -d "${root_dir}/yarn-cache" || mkdir -p "yarn-cache" PATH_TO_SCRIPTS="sources/pmm/src/github.com/percona/pmm/build/scripts" export RPMBUILD_DOCKER_IMAGE=perconalab/rpmbuild:3 diff --git a/build/scripts/build-server-rpm b/build/scripts/build-server-rpm index 6aa60e4388..06ae02326e 100755 --- a/build/scripts/build-server-rpm +++ b/build/scripts/build-server-rpm @@ -112,6 +112,9 @@ build() { if [ -d "${root_dir}/go-build" ]; then volume_mounts+=" -v ${root_dir}/go-build:/home/builder/.cache/go-build" fi + if [ -d "${root_dir}/yarn-cache" ]; then + volume_mounts+=" -v ${root_dir}/yarn-cache:/home/builder/.yarn" + fi if [ -d "${root_dir}/go-path" ]; then volume_mounts+=" -v ${root_dir}/go-path:/home/builder/go/pkg/mod" fi