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 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 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', [
|
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
|
||||||
` apk update
|
` apk update
|
||||||
apk add unzip
|
apk add unzip
|
||||||
|
|
@ -2171,24 +2173,16 @@ class RemoteBuilder {
|
||||||
mkdir ${repoPathFull}
|
mkdir ${repoPathFull}
|
||||||
mkdir ${steamPathFull}
|
mkdir ${steamPathFull}
|
||||||
#
|
#
|
||||||
echo "root folders setup for remote build"
|
echo "Clone github.com/gameci/unity-builder utility repositories required for building"
|
||||||
tree ${buildPathFull}
|
git clone -q --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
|
||||||
|
git clone -q ${repo2} ${steamPathFull}
|
||||||
#
|
#
|
||||||
echo "Cloning utility repositories required for building"
|
${cloneRemoteBuilderSourceCommand}
|
||||||
git clone --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
|
${cachePullGitLargeFilesAndLibraryFolder}
|
||||||
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 ' '
|
|
||||||
#
|
#
|
||||||
echo 'Tree for the folder of this specific build:'
|
echo 'Tree for the folder of this specific build:'
|
||||||
tree -L 3 ${buildPathFull}
|
tree -L 3 ${buildPathFull}
|
||||||
#
|
|
||||||
echo ' '
|
echo ' '
|
||||||
#
|
|
||||||
echo 'Root build volume folder:'
|
echo 'Root build volume folder:'
|
||||||
tree -L 1 /${buildVolumeFolder}
|
tree -L 1 /${buildVolumeFolder}
|
||||||
#
|
#
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5,6 +5,26 @@ branchName=$2
|
||||||
libDir=$3
|
libDir=$3
|
||||||
purgeRemoteBuilderCache=$4
|
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"
|
echo "Checking cache"
|
||||||
|
|
||||||
# Restore library 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 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 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(
|
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
||||||
buildUid,
|
buildUid,
|
||||||
'alpine/git',
|
'alpine/git',
|
||||||
|
|
@ -117,24 +119,16 @@ class RemoteBuilder {
|
||||||
mkdir ${repoPathFull}
|
mkdir ${repoPathFull}
|
||||||
mkdir ${steamPathFull}
|
mkdir ${steamPathFull}
|
||||||
#
|
#
|
||||||
echo "root folders setup for remote build"
|
echo "Clone github.com/gameci/unity-builder utility repositories required for building"
|
||||||
tree ${buildPathFull}
|
git clone -q --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
|
||||||
|
git clone -q ${repo2} ${steamPathFull}
|
||||||
#
|
#
|
||||||
echo "Cloning utility repositories required for building"
|
${cloneRemoteBuilderSourceCommand}
|
||||||
git clone --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
|
${cachePullGitLargeFilesAndLibraryFolder}
|
||||||
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 ' '
|
|
||||||
#
|
#
|
||||||
echo 'Tree for the folder of this specific build:'
|
echo 'Tree for the folder of this specific build:'
|
||||||
tree -L 3 ${buildPathFull}
|
tree -L 3 ${buildPathFull}
|
||||||
#
|
|
||||||
echo ' '
|
echo ' '
|
||||||
#
|
|
||||||
echo 'Root build volume folder:'
|
echo 'Root build volume folder:'
|
||||||
tree -L 1 /${buildVolumeFolder}
|
tree -L 1 /${buildVolumeFolder}
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue