correcting cache script parameter names
parent
20b845b591
commit
e12185be81
|
|
@ -2157,8 +2157,8 @@ class RemoteBuilder {
|
||||||
const repo2 = `https://${buildParameters.githubToken}@github.com/game-ci/steam-deploy.git`;
|
const repo2 = `https://${buildParameters.githubToken}@github.com/game-ci/steam-deploy.git`;
|
||||||
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
||||||
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
||||||
const cloneRemoteBuilderSourceCommand = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
|
const initializeSourceRepoForCaching = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
|
||||||
const cachePullGitLargeFilesAndLibraryFolder = `${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
|
const handleCaching = `${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
|
||||||
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
|
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
|
||||||
` apk update
|
` apk update
|
||||||
apk add unzip
|
apk add unzip
|
||||||
|
|
@ -2180,10 +2180,10 @@ class RemoteBuilder {
|
||||||
#
|
#
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Cloning main repo'
|
echo 'Cloning main repo'
|
||||||
${cloneRemoteBuilderSourceCommand}
|
${initializeSourceRepoForCaching}
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'cache pull'
|
echo 'cache pull'
|
||||||
${cachePullGitLargeFilesAndLibraryFolder}
|
${handleCaching}
|
||||||
#
|
#
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Tree for the folder of this specific build:'
|
echo 'Tree for the folder of this specific build:'
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,25 +1,25 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cacheDir=$1
|
cacheFolderFull=$1
|
||||||
branchName=$2
|
branchName=$2
|
||||||
libDir=$3
|
libraryFolderFull=$3
|
||||||
purgeRemoteBuilderCache=$4
|
purgeRemoteBuilderCache=$4
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Caching starting, parameters:"
|
echo "Caching starting, parameters:"
|
||||||
echo "$cacheDir"
|
echo "$cacheFolderFull"
|
||||||
echo "$branchName"
|
echo "$branchName"
|
||||||
echo "$libDir"
|
echo "$libraryFolderFull"
|
||||||
echo "$purgeRemoteBuilderCache"
|
echo "$purgeRemoteBuilderCache"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
# handle library cache
|
# handle library cache
|
||||||
if [ ! -d "$cacheFolderFull" ]; then
|
if [ ! -d "$cacheFolderFull" ]; then
|
||||||
mkdir "$cacheFolderFull"
|
|
||||||
echo "creating new cache folder $cacheFolderFull"
|
echo "creating new cache folder $cacheFolderFull"
|
||||||
|
mkdir "$cacheFolderFull"
|
||||||
if [ ! -d "$cacheFolderFull/$branchName" ]; then
|
if [ ! -d "$cacheFolderFull/$branchName" ]; then
|
||||||
mkdir "$cacheFolderFull/$branchName"
|
|
||||||
echo "creating new cache branch folder for: $cacheFolderFull/$branchName"
|
echo "creating new cache branch folder for: $cacheFolderFull/$branchName"
|
||||||
|
mkdir "$cacheFolderFull/$branchName"
|
||||||
else
|
else
|
||||||
echo "cache branch folder already exists for: $cacheFolderFull/$branchName"
|
echo "cache branch folder already exists for: $cacheFolderFull/$branchName"
|
||||||
fi
|
fi
|
||||||
|
|
@ -28,11 +28,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Library cache for branch: $branchName"
|
echo "Library cache for branch: $branchName"
|
||||||
ls $cacheFolderFull/$branchName
|
ls "$cacheFolderFull/$branchName"
|
||||||
echo ''
|
echo ''
|
||||||
|
|
||||||
if [ -d "$libraryFolderFull" ]; then
|
if [ -d "$libraryFolderFull" ]; then
|
||||||
rm -r $libraryFolderFull
|
rm -r "$libraryFolderFull"
|
||||||
echo "Git must ignore the Library folder"
|
echo "Git must ignore the Library folder"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -44,8 +44,8 @@ latest=$(ls -t $cacheDir | head -1)
|
||||||
if [ ! -z "$latest" ]; then
|
if [ ! -z "$latest" ]; then
|
||||||
echo "Library cache exists from build $latest from $branchName"
|
echo "Library cache exists from build $latest from $branchName"
|
||||||
echo 'Creating empty Library folder for cache'
|
echo 'Creating empty Library folder for cache'
|
||||||
mkdir $libDir
|
mkdir "$libraryFolderFull"
|
||||||
unzip -q $latest -d $libDir
|
unzip -q "$latest" -d "$libraryFolderFull"
|
||||||
else
|
else
|
||||||
echo 'Cache does not exist'
|
echo 'Cache does not exist'
|
||||||
fi
|
fi
|
||||||
|
|
@ -54,6 +54,6 @@ fi
|
||||||
|
|
||||||
# purge cache
|
# purge cache
|
||||||
if [ "$purgeRemoteBuilderCache" == "true" ]; then
|
if [ "$purgeRemoteBuilderCache" == "true" ]; then
|
||||||
rm -r $libDir
|
rm -r "$libraryFolderFull"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,8 +100,8 @@ class RemoteBuilder {
|
||||||
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
||||||
|
|
||||||
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
||||||
const cloneRemoteBuilderSourceCommand = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
|
const initializeSourceRepoForCaching = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
|
||||||
const cachePullGitLargeFilesAndLibraryFolder = `${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
|
const handleCaching = `${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
|
||||||
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
||||||
buildUid,
|
buildUid,
|
||||||
'alpine/git',
|
'alpine/git',
|
||||||
|
|
@ -126,10 +126,10 @@ class RemoteBuilder {
|
||||||
#
|
#
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Cloning main repo'
|
echo 'Cloning main repo'
|
||||||
${cloneRemoteBuilderSourceCommand}
|
${initializeSourceRepoForCaching}
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'cache pull'
|
echo 'cache pull'
|
||||||
${cachePullGitLargeFilesAndLibraryFolder}
|
${handleCaching}
|
||||||
#
|
#
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Tree for the folder of this specific build:'
|
echo 'Tree for the folder of this specific build:'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue