Simplify scripts
parent
b31916dcd5
commit
142ad6671a
|
|
@ -2157,6 +2157,8 @@ class RemoteBuilder {
|
|||
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 purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
||||
const cachePullGitLargeFilesAndLibraryFolder = `${builderPathFull}/dist/remote-builder/cachePullLFSAndLibrary.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
|
||||
const cloneRemoteBuilderSourceCommand = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
|
||||
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
|
||||
` apk update
|
||||
apk add unzip
|
||||
|
|
@ -2171,24 +2173,16 @@ class RemoteBuilder {
|
|||
mkdir ${repoPathFull}
|
||||
mkdir ${steamPathFull}
|
||||
#
|
||||
echo "root folders setup for remote build"
|
||||
tree ${buildPathFull}
|
||||
echo "Clone github.com/gameci/unity-builder utility repositories required for building"
|
||||
git clone -q --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
|
||||
git clone -q ${repo2} ${steamPathFull}
|
||||
#
|
||||
echo "Cloning utility repositories required for building"
|
||||
git clone --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
|
||||
git clone ${repo2} ${steamPathFull}
|
||||
#
|
||||
${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA
|
||||
${builderPathFull}/dist/remote-builder/setupCache.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull}
|
||||
${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}
|
||||
#
|
||||
echo ' '
|
||||
${cloneRemoteBuilderSourceCommand}
|
||||
${cachePullGitLargeFilesAndLibraryFolder}
|
||||
#
|
||||
echo 'Tree for the folder of this specific build:'
|
||||
tree -L 3 ${buildPathFull}
|
||||
#
|
||||
echo ' '
|
||||
#
|
||||
echo 'Root build volume folder:'
|
||||
tree -L 1 /${buildVolumeFolder}
|
||||
#
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,26 @@ branchName=$2
|
|||
libDir=$3
|
||||
purgeRemoteBuilderCache=$4
|
||||
|
||||
# handle library cache
|
||||
if [ ! -d $cacheFolderFull ]; then
|
||||
mkdir $cacheFolderFull
|
||||
echo "creating new cache folder"
|
||||
fi
|
||||
if [ ! -d $cacheFolderFull/$branchName ]; then
|
||||
mkdir $cacheFolderFull/$branchName
|
||||
echo "creating new cache branch folder for: ${branchName}"
|
||||
fi
|
||||
|
||||
echo "Library cache for branch: $branchName"
|
||||
ls $cacheFolderFull/$branchName
|
||||
echo ''
|
||||
|
||||
if [ -d $libraryFolderFull ]; then
|
||||
rm -r $libraryFolderFull
|
||||
echo "Git must ignore the Library folder"
|
||||
fi
|
||||
|
||||
|
||||
echo "Checking cache"
|
||||
|
||||
# Restore library cache
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
cacheFolderFull=$1
|
||||
branchName=$2
|
||||
libraryFolderFull=$3
|
||||
|
||||
# handle library cache
|
||||
if [ ! -d $cacheFolderFull ]; then
|
||||
mkdir $cacheFolderFull
|
||||
echo "creating new cache folder"
|
||||
fi
|
||||
if [ ! -d $cacheFolderFull/$branchName ]; then
|
||||
mkdir $cacheFolderFull/$branchName
|
||||
echo "creating new cache branch folder for: ${branchName}"
|
||||
fi
|
||||
|
||||
echo "Library cache for branch: $branchName"
|
||||
ls $cacheFolderFull/$branchName
|
||||
echo ''
|
||||
|
||||
if [ -d $libraryFolderFull ]; then
|
||||
rm -r $libraryFolderFull
|
||||
echo "Git must ignore the Library folder"
|
||||
fi
|
||||
|
|
@ -100,6 +100,8 @@ class RemoteBuilder {
|
|||
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
||||
|
||||
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
||||
const cachePullGitLargeFilesAndLibraryFolder = `${builderPathFull}/dist/remote-builder/cachePullLFSAndLibrary.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
|
||||
const cloneRemoteBuilderSourceCommand = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
|
||||
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
||||
buildUid,
|
||||
'alpine/git',
|
||||
|
|
@ -117,24 +119,16 @@ class RemoteBuilder {
|
|||
mkdir ${repoPathFull}
|
||||
mkdir ${steamPathFull}
|
||||
#
|
||||
echo "root folders setup for remote build"
|
||||
tree ${buildPathFull}
|
||||
echo "Clone github.com/gameci/unity-builder utility repositories required for building"
|
||||
git clone -q --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
|
||||
git clone -q ${repo2} ${steamPathFull}
|
||||
#
|
||||
echo "Cloning utility repositories required for building"
|
||||
git clone --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
|
||||
git clone ${repo2} ${steamPathFull}
|
||||
#
|
||||
${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA
|
||||
${builderPathFull}/dist/remote-builder/setupCache.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull}
|
||||
${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}
|
||||
#
|
||||
echo ' '
|
||||
${cloneRemoteBuilderSourceCommand}
|
||||
${cachePullGitLargeFilesAndLibraryFolder}
|
||||
#
|
||||
echo 'Tree for the folder of this specific build:'
|
||||
tree -L 3 ${buildPathFull}
|
||||
#
|
||||
echo ' '
|
||||
#
|
||||
echo 'Root build volume folder:'
|
||||
tree -L 1 /${buildVolumeFolder}
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in New Issue