pull/289/head
Frostebite 2021-08-01 22:37:17 +01:00
parent 85af8c8e54
commit ee250a1222
5 changed files with 15 additions and 17 deletions

5
dist/index.js vendored
View File

@ -2180,7 +2180,6 @@ class RemoteBuilder {
echo ' ' echo ' '
echo 'Initializing source repository for cloning with caching of LFS files' echo 'Initializing source repository for cloning with caching of LFS files'
${initializeSourceRepoForCaching} ${initializeSourceRepoForCaching}
export LFS_ASSETS_HASH=$(cat ".lfs-assets-id-sum")
echo ' ' echo ' '
echo 'Large File before LFS caching and pull' echo 'Large File before LFS caching and pull'
ls -alh "${testLFSFile}" ls -alh "${testLFSFile}"
@ -2196,8 +2195,8 @@ class RemoteBuilder {
echo ' ' echo ' '
# #
echo 'buildVolumeReport.txt and buildVolumeReport.txt saved to repository workspace directory' echo 'buildVolumeReport.txt and buildVolumeReport.txt saved to repository workspace directory'
tree -L 3 ${this.buildPathFull} > ${this.repoPathFull}/buildVolumeReport.txt tree -L 3 ${this.buildPathFull} > ${this.repoPathFull}/preBuildVolumeReport.txt
ls -lh /${buildVolumeFolder} > ${this.repoPathFull}/buildVolumeReport.txt ls -lh /${buildVolumeFolder} > ${this.repoPathFull}/preBuildVolumeReport.txt
echo ' ' echo ' '
# #
`, `,

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -25,4 +25,6 @@ echo ' '
echo 'Contents of .lfs-assets-id-sum file:' echo 'Contents of .lfs-assets-id-sum file:'
cat .lfs-assets-id-sum cat .lfs-assets-id-sum
export LFS_ASSETS_HASH="$(cat .lfs-assets-id)"
echo ' ' echo ' '

View File

@ -1,24 +1,24 @@
#!/bin/sh #!/bin/sh
cacheFolderFull=$1 cacheFolderFull=$1
branchName=$2 cacheKey=$2
libraryFolderFull=$3 libraryFolderFull=$3
gitLFSDestinationFolder=$4 gitLFSDestinationFolder=$4
purgeRemoteBuilderCache=$5 purgeRemoteBuilderCache=$5
cacheFolderWithBranch="$cacheFolderFull/$branchName" cacheFolderWithBranch="$cacheFolderFull/$cacheKey"
lfsCacheFolder="$cacheFolderFull/$branchName/lfs" lfsCacheFolder="$cacheFolderFull/$cacheKey/lfs"
libraryCacheFolder="$cacheFolderFull/$branchName/lib" libraryCacheFolder="$cacheFolderFull/$cacheKey/lib"
echo ' ' echo ' '
echo "LFS cache for branch: $branchName" echo "LFS cache for branch: $cacheKey"
mkdir -p "$lfsCacheFolder" mkdir -p "$lfsCacheFolder"
ls -lh "$lfsCacheFolder" ls -lh "$lfsCacheFolder"
echo ' ' echo ' '
echo "Library cache for branch: $branchName" echo "Library cache for branch: $cacheKey"
mkdir -p "$libraryCacheFolder" mkdir -p "$libraryCacheFolder"
ls -lh "$libraryCacheFolder" ls -lh "$libraryCacheFolder"
@ -36,11 +36,9 @@ echo "Checking cache"
latestLibraryCacheFile=$(ls -t "$libraryCacheFolder" | grep .zip$ | head -1) latestLibraryCacheFile=$(ls -t "$libraryCacheFolder" | grep .zip$ | head -1)
if [ ! -z "$latestLibraryCacheFile" ]; then if [ ! -z "$latestLibraryCacheFile" ]; then
echo "Library cache exists from build $latestLibraryCacheFile from $branchName" echo "Library cache exists from build $latestLibraryCacheFile from $cacheKey"
echo 'Creating empty Library folder for cache'
mkdir -p "$libraryFolderFull" mkdir -p "$libraryFolderFull"
unzip -q "$libraryCacheFolder/$latestLibraryCacheFile" -d "$libraryFolderFull" unzip -q "$libraryCacheFolder/$latestLibraryCacheFile" -d "$libraryFolderFull"
echo 'Unzipped library'
fi fi
echo "Checking cache for a cache match based on the combined large files hash ($lfsCacheFolder/$LFS_ASSETS_HASH.zip)" echo "Checking cache for a cache match based on the combined large files hash ($lfsCacheFolder/$LFS_ASSETS_HASH.zip)"
@ -55,7 +53,7 @@ fi
if [ ! -f "$lfsCacheFolder/$latestLFSCacheFile" ]; then if [ ! -f "$lfsCacheFolder/$latestLFSCacheFile" ]; then
echo "LFS cache exists from build $latestLFSCacheFile from $branchName" echo "LFS cache exists from build $latestLFSCacheFile from $cacheKey"
rm -r "$gitLFSDestinationFolder" rm -r "$gitLFSDestinationFolder"
mkdir -p "$gitLFSDestinationFolder" mkdir -p "$gitLFSDestinationFolder"
unzip -q "$lfsCacheFolder/$latestLFSCacheFile" -d "$gitLFSDestinationFolder" unzip -q "$lfsCacheFolder/$latestLFSCacheFile" -d "$gitLFSDestinationFolder"

View File

@ -135,7 +135,6 @@ class RemoteBuilder {
echo ' ' echo ' '
echo 'Initializing source repository for cloning with caching of LFS files' echo 'Initializing source repository for cloning with caching of LFS files'
${initializeSourceRepoForCaching} ${initializeSourceRepoForCaching}
export LFS_ASSETS_HASH=$(cat ".lfs-assets-id-sum")
echo ' ' echo ' '
echo 'Large File before LFS caching and pull' echo 'Large File before LFS caching and pull'
ls -alh "${testLFSFile}" ls -alh "${testLFSFile}"
@ -151,8 +150,8 @@ class RemoteBuilder {
echo ' ' echo ' '
# #
echo 'buildVolumeReport.txt and buildVolumeReport.txt saved to repository workspace directory' echo 'buildVolumeReport.txt and buildVolumeReport.txt saved to repository workspace directory'
tree -L 3 ${this.buildPathFull} > ${this.repoPathFull}/buildVolumeReport.txt tree -L 3 ${this.buildPathFull} > ${this.repoPathFull}/preBuildVolumeReport.txt
ls -lh /${buildVolumeFolder} > ${this.repoPathFull}/buildVolumeReport.txt ls -lh /${buildVolumeFolder} > ${this.repoPathFull}/preBuildVolumeReport.txt
echo ' ' echo ' '
# #
`, `,