Fix
parent
f95077e853
commit
d1ecc89a3e
|
|
@ -52,6 +52,7 @@ jobs:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
AWS_DEFAULT_REGION: eu-west-2
|
AWS_DEFAULT_REGION: eu-west-2
|
||||||
|
remoteBuilderBranch: remote-builder/unified-providers
|
||||||
DEBUG: true
|
DEBUG: true
|
||||||
with:
|
with:
|
||||||
remoteBuildCluster: aws
|
remoteBuildCluster: aws
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ jobs:
|
||||||
id: k8s-unity-build
|
id: k8s-unity-build
|
||||||
env:
|
env:
|
||||||
DEBUG: true
|
DEBUG: true
|
||||||
|
remoteBuilderBranch: remote-builder/unified-providers
|
||||||
with:
|
with:
|
||||||
remoteBuildCluster: k8s
|
remoteBuildCluster: k8s
|
||||||
targetPlatform: ${{ matrix.targetPlatform }}
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
|
|
|
||||||
|
|
@ -2283,52 +2283,40 @@ class RemoteBuilder {
|
||||||
const lfsDirectory = `${this.repoPathFull}/.git/lfs`;
|
const lfsDirectory = `${this.repoPathFull}/.git/lfs`;
|
||||||
const testLFSFile = `${this.projectPathFull}/Assets/LFS_Test_File.jpg`;
|
const testLFSFile = `${this.projectPathFull}/Assets/LFS_Test_File.jpg`;
|
||||||
const unityBuilderRepoUrl = `https://${this.buildParams.githubToken}@github.com/game-ci/unity-builder.git`;
|
const unityBuilderRepoUrl = `https://${this.buildParams.githubToken}@github.com/game-ci/unity-builder.git`;
|
||||||
const steamDeployRepoUrl = `https://${this.buildParams.githubToken}@github.com/game-ci/steam-deploy.git`;
|
|
||||||
const targetBuildRepoUrl = `https://${this.buildParams.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
const targetBuildRepoUrl = `https://${this.buildParams.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 initializeSourceRepoForCaching = `${this.builderPathFull}/dist/remote-builder/cloneNoLFS.sh "${this.repoPathFull}" "${targetBuildRepoUrl}" "${testLFSFile}"`;
|
const initializeSourceRepoForCaching = `${this.builderPathFull}/dist/remote-builder/cloneNoLFS.sh "${this.repoPathFull}" "${targetBuildRepoUrl}" "${testLFSFile}"`;
|
||||||
const handleCaching = `${this.builderPathFull}/dist/remote-builder/handleCaching.sh "${this.cacheFolderFull}" "${this.libraryFolderFull}" "${lfsDirectory}" "${purgeRemoteCache}"`;
|
const handleCaching = `${this.builderPathFull}/dist/remote-builder/handleCaching.sh "${this.cacheFolderFull}" "${this.libraryFolderFull}" "${lfsDirectory}" "${purgeRemoteCache}"`;
|
||||||
|
const remoteBuilderBranch = process.env.remoteBuilderBranch ? `--branch "${process.env.remoteBuilderBranch}"` : '';
|
||||||
|
const cloneRemoteBuilder = `git clone -q ${remoteBuilderBranch} ${unityBuilderRepoUrl} ${this.builderPathFull}`;
|
||||||
yield this.RemoteBuilderProviderPlatform.runBuildTask(this.buildGuid, 'alpine/git', [
|
yield this.RemoteBuilderProviderPlatform.runBuildTask(this.buildGuid, 'alpine/git', [
|
||||||
` printenv
|
` printenv
|
||||||
#
|
|
||||||
apk update -q
|
apk update -q
|
||||||
apk add unzip zip git-lfs jq tree -q
|
apk add unzip zip git-lfs jq tree -q
|
||||||
#
|
|
||||||
mkdir -p ${this.buildPathFull}
|
mkdir -p ${this.buildPathFull}
|
||||||
mkdir -p ${this.builderPathFull}
|
mkdir -p ${this.builderPathFull}
|
||||||
mkdir -p ${this.repoPathFull}
|
mkdir -p ${this.repoPathFull}
|
||||||
mkdir -p ${this.steamPathFull}
|
${cloneRemoteBuilder}
|
||||||
#
|
|
||||||
echo ' '
|
|
||||||
echo 'Cloning utility repositories for remote builder'
|
|
||||||
git clone -q --branch "remote-builder/unified-providers" ${unityBuilderRepoUrl} ${this.builderPathFull}
|
|
||||||
echo 'Cloned ${unityBuilderRepoUrl}'
|
|
||||||
git clone -q ${steamDeployRepoUrl} ${this.steamPathFull}
|
|
||||||
echo 'Cloned ${steamDeployRepoUrl}'
|
|
||||||
#
|
|
||||||
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}
|
||||||
echo 'Source repository initialized'
|
|
||||||
export LFS_ASSETS_HASH="$(cat ${this.repoPathFull}/.lfs-assets-id)"
|
export LFS_ASSETS_HASH="$(cat ${this.repoPathFull}/.lfs-assets-id)"
|
||||||
|
echo 'Source repository initialized'
|
||||||
|
echo ' '
|
||||||
${process.env.DEBUG ? '' : '#'}echo $LFS_ASSETS_HASH
|
${process.env.DEBUG ? '' : '#'}echo $LFS_ASSETS_HASH
|
||||||
${process.env.DEBUG ? '' : '#'}echo ' '
|
|
||||||
${process.env.DEBUG ? '' : '#'}echo 'Large File before LFS caching and pull'
|
${process.env.DEBUG ? '' : '#'}echo 'Large File before LFS caching and pull'
|
||||||
${process.env.DEBUG ? '' : '#'}ls -alh "${lfsDirectory}"
|
${process.env.DEBUG ? '' : '#'}ls -alh "${lfsDirectory}"
|
||||||
${process.env.DEBUG ? '' : '#'}echo ' '
|
${process.env.DEBUG ? '' : '#'}echo ' '
|
||||||
echo ' '
|
|
||||||
echo 'Starting checks of cache for the Unity project Library and git LFS files'
|
echo 'Starting checks of cache for the Unity project Library and git LFS files'
|
||||||
${handleCaching}
|
${handleCaching}
|
||||||
${process.env.DEBUG ? '' : '#'}echo 'Caching complete'
|
${process.env.DEBUG ? '' : '#'}echo 'Caching complete'
|
||||||
${process.env.DEBUG ? '' : '#'}echo ' '
|
${process.env.DEBUG ? '' : '#'}echo ' '
|
||||||
${process.env.DEBUG ? '' : '#'}echo 'Large File after LFS caching and pull'
|
${process.env.DEBUG ? '' : '#'}echo 'Large File after LFS caching and pull'
|
||||||
${process.env.DEBUG ? '' : '#'}ls -alh "${lfsDirectory}"
|
${process.env.DEBUG ? '' : '#'}ls -alh "${lfsDirectory}"
|
||||||
echo ' '
|
${process.env.DEBUG ? '' : '#'}echo ' '
|
||||||
#
|
|
||||||
${process.env.DEBUG ? '' : '#'}tree -L 4 "${this.buildPathFull}"
|
${process.env.DEBUG ? '' : '#'}tree -L 4 "${this.buildPathFull}"
|
||||||
${process.env.DEBUG ? '' : '#'}ls -lh "/${buildVolumeFolder}"
|
${process.env.DEBUG ? '' : '#'}ls -lh "/${buildVolumeFolder}"
|
||||||
echo ' '
|
${process.env.DEBUG ? '' : '#'}echo ' '
|
||||||
#
|
|
||||||
`,
|
`,
|
||||||
], `/${buildVolumeFolder}`, `/${buildVolumeFolder}/`, RemoteBuilder.defaultGitShaEnvironmentVariable, this.defaultSecrets);
|
], `/${buildVolumeFolder}`, `/${buildVolumeFolder}/`, RemoteBuilder.defaultGitShaEnvironmentVariable, this.defaultSecrets);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -114,56 +114,44 @@ class RemoteBuilder {
|
||||||
const testLFSFile = `${this.projectPathFull}/Assets/LFS_Test_File.jpg`;
|
const testLFSFile = `${this.projectPathFull}/Assets/LFS_Test_File.jpg`;
|
||||||
|
|
||||||
const unityBuilderRepoUrl = `https://${this.buildParams.githubToken}@github.com/game-ci/unity-builder.git`;
|
const unityBuilderRepoUrl = `https://${this.buildParams.githubToken}@github.com/game-ci/unity-builder.git`;
|
||||||
const steamDeployRepoUrl = `https://${this.buildParams.githubToken}@github.com/game-ci/steam-deploy.git`;
|
|
||||||
const targetBuildRepoUrl = `https://${this.buildParams.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
const targetBuildRepoUrl = `https://${this.buildParams.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 initializeSourceRepoForCaching = `${this.builderPathFull}/dist/remote-builder/cloneNoLFS.sh "${this.repoPathFull}" "${targetBuildRepoUrl}" "${testLFSFile}"`;
|
const initializeSourceRepoForCaching = `${this.builderPathFull}/dist/remote-builder/cloneNoLFS.sh "${this.repoPathFull}" "${targetBuildRepoUrl}" "${testLFSFile}"`;
|
||||||
const handleCaching = `${this.builderPathFull}/dist/remote-builder/handleCaching.sh "${this.cacheFolderFull}" "${this.libraryFolderFull}" "${lfsDirectory}" "${purgeRemoteCache}"`;
|
const handleCaching = `${this.builderPathFull}/dist/remote-builder/handleCaching.sh "${this.cacheFolderFull}" "${this.libraryFolderFull}" "${lfsDirectory}" "${purgeRemoteCache}"`;
|
||||||
|
const remoteBuilderBranch = process.env.remoteBuilderBranch ? `--branch "${process.env.remoteBuilderBranch}"` : '';
|
||||||
|
const cloneRemoteBuilder = `git clone -q ${remoteBuilderBranch} ${unityBuilderRepoUrl} ${this.builderPathFull}`;
|
||||||
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
||||||
this.buildGuid,
|
this.buildGuid,
|
||||||
'alpine/git',
|
'alpine/git',
|
||||||
[
|
[
|
||||||
` printenv
|
` printenv
|
||||||
#
|
|
||||||
apk update -q
|
apk update -q
|
||||||
apk add unzip zip git-lfs jq tree -q
|
apk add unzip zip git-lfs jq tree -q
|
||||||
#
|
|
||||||
mkdir -p ${this.buildPathFull}
|
mkdir -p ${this.buildPathFull}
|
||||||
mkdir -p ${this.builderPathFull}
|
mkdir -p ${this.builderPathFull}
|
||||||
mkdir -p ${this.repoPathFull}
|
mkdir -p ${this.repoPathFull}
|
||||||
mkdir -p ${this.steamPathFull}
|
${cloneRemoteBuilder}
|
||||||
#
|
|
||||||
echo ' '
|
|
||||||
echo 'Cloning utility repositories for remote builder'
|
|
||||||
git clone -q --branch "remote-builder/unified-providers" ${unityBuilderRepoUrl} ${this.builderPathFull}
|
|
||||||
echo 'Cloned ${unityBuilderRepoUrl}'
|
|
||||||
git clone -q ${steamDeployRepoUrl} ${this.steamPathFull}
|
|
||||||
echo 'Cloned ${steamDeployRepoUrl}'
|
|
||||||
#
|
|
||||||
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}
|
||||||
echo 'Source repository initialized'
|
|
||||||
export LFS_ASSETS_HASH="$(cat ${this.repoPathFull}/.lfs-assets-id)"
|
export LFS_ASSETS_HASH="$(cat ${this.repoPathFull}/.lfs-assets-id)"
|
||||||
|
echo 'Source repository initialized'
|
||||||
|
echo ' '
|
||||||
${process.env.DEBUG ? '' : '#'}echo $LFS_ASSETS_HASH
|
${process.env.DEBUG ? '' : '#'}echo $LFS_ASSETS_HASH
|
||||||
${process.env.DEBUG ? '' : '#'}echo ' '
|
|
||||||
${process.env.DEBUG ? '' : '#'}echo 'Large File before LFS caching and pull'
|
${process.env.DEBUG ? '' : '#'}echo 'Large File before LFS caching and pull'
|
||||||
${process.env.DEBUG ? '' : '#'}ls -alh "${lfsDirectory}"
|
${process.env.DEBUG ? '' : '#'}ls -alh "${lfsDirectory}"
|
||||||
${process.env.DEBUG ? '' : '#'}echo ' '
|
${process.env.DEBUG ? '' : '#'}echo ' '
|
||||||
echo ' '
|
|
||||||
echo 'Starting checks of cache for the Unity project Library and git LFS files'
|
echo 'Starting checks of cache for the Unity project Library and git LFS files'
|
||||||
${handleCaching}
|
${handleCaching}
|
||||||
${process.env.DEBUG ? '' : '#'}echo 'Caching complete'
|
${process.env.DEBUG ? '' : '#'}echo 'Caching complete'
|
||||||
${process.env.DEBUG ? '' : '#'}echo ' '
|
${process.env.DEBUG ? '' : '#'}echo ' '
|
||||||
${process.env.DEBUG ? '' : '#'}echo 'Large File after LFS caching and pull'
|
${process.env.DEBUG ? '' : '#'}echo 'Large File after LFS caching and pull'
|
||||||
${process.env.DEBUG ? '' : '#'}ls -alh "${lfsDirectory}"
|
${process.env.DEBUG ? '' : '#'}ls -alh "${lfsDirectory}"
|
||||||
echo ' '
|
${process.env.DEBUG ? '' : '#'}echo ' '
|
||||||
#
|
|
||||||
${process.env.DEBUG ? '' : '#'}tree -L 4 "${this.buildPathFull}"
|
${process.env.DEBUG ? '' : '#'}tree -L 4 "${this.buildPathFull}"
|
||||||
${process.env.DEBUG ? '' : '#'}ls -lh "/${buildVolumeFolder}"
|
${process.env.DEBUG ? '' : '#'}ls -lh "/${buildVolumeFolder}"
|
||||||
echo ' '
|
${process.env.DEBUG ? '' : '#'}echo ' '
|
||||||
#
|
|
||||||
`,
|
`,
|
||||||
],
|
],
|
||||||
`/${buildVolumeFolder}`,
|
`/${buildVolumeFolder}`,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue