Cleanup
parent
22791aa0eb
commit
fbda722d05
|
|
@ -1,96 +0,0 @@
|
||||||
[Cloud-Runner-Agent] awsStackName=game-ci-3-test
|
|
||||||
[Cloud-Runner-Agent] androidKeystoreBase64=
|
|
||||||
[Cloud-Runner-Agent] androidKeystorePass=
|
|
||||||
[Cloud-Runner-Agent] ANDROID_VERSION_CODE=0
|
|
||||||
[Cloud-Runner-Agent] kubeConfig=
|
|
||||||
[Cloud-Runner-Agent] customImage=false
|
|
||||||
[Cloud-Runner-Agent] HOSTNAME=ip-10-0-0-92.eu-west-2.compute.internal
|
|
||||||
[Cloud-Runner-Agent] remoteBuildCluster=
|
|
||||||
[Cloud-Runner-Agent] BUILDID=0-windows64-7zhj
|
|
||||||
[Cloud-Runner-Agent] androidKeyaliasPass=
|
|
||||||
[Cloud-Runner-Agent] SHLVL=1
|
|
||||||
[Cloud-Runner-Agent] githubRepo=game-ci/unity-builder
|
|
||||||
[Cloud-Runner-Agent] branch=remote-builder/unified-providers
|
|
||||||
[Cloud-Runner-Agent] HOME=/root
|
|
||||||
[Cloud-Runner-Agent] cloudRunnerCpu=1.0
|
|
||||||
[Cloud-Runner-Agent] cloudRunnerTests=true
|
|
||||||
[Cloud-Runner-Agent] versioningStrategy=None
|
|
||||||
[Cloud-Runner-Agent] platform=StandaloneWindows64
|
|
||||||
[Cloud-Runner-Agent] ANDROID_KEYSTORE_NAME=
|
|
||||||
[Cloud-Runner-Agent] githubEnabled=false
|
|
||||||
[Cloud-Runner-Agent] buildPathFull=/data/0-windows64-7zhj
|
|
||||||
[Cloud-Runner-Agent] version=2019.2.11f1
|
|
||||||
[Cloud-Runner-Agent] region=eu-west-2
|
|
||||||
[Cloud-Runner-Agent] AWS_EXECUTION_ENV=AWS_ECS_FARGATE
|
|
||||||
[Cloud-Runner-Agent] specifiedVersion=
|
|
||||||
[Cloud-Runner-Agent] runNumber=0
|
|
||||||
[Cloud-Runner-Agent] chownFilesTo=
|
|
||||||
[Cloud-Runner-Agent] BUILD_FILE=StandaloneWindows64.exe
|
|
||||||
[Cloud-Runner-Agent] ANDROID_KEYALIAS_NAME=
|
|
||||||
[Cloud-Runner-Agent] BUILD_NAME=StandaloneWindows64
|
|
||||||
[Cloud-Runner-Agent] buildMethod=
|
|
||||||
[Cloud-Runner-Agent] VERSION=none
|
|
||||||
[Cloud-Runner-Agent] logToFile=true
|
|
||||||
[Cloud-Runner-Agent] AWS_DEFAULT_REGION=eu-west-2
|
|
||||||
[Cloud-Runner-Agent] runnerTempPath=undefined
|
|
||||||
[Cloud-Runner-Agent] sshAgent=
|
|
||||||
[Cloud-Runner-Agent] androidVersionCode=false
|
|
||||||
[Cloud-Runner-Agent] androidKeystoreName=
|
|
||||||
[Cloud-Runner-Agent] gitPrivateToken=
|
|
||||||
[Cloud-Runner-Agent] BUILD_METHOD=
|
|
||||||
[Cloud-Runner-Agent] ECS_CONTAINER_METADATA_URI_V4=http://169.254.170.2/v4/606b4f3707824e329480a612293343cb-1854725462
|
|
||||||
[Cloud-Runner-Agent] customParameters=
|
|
||||||
[Cloud-Runner-Agent] CUSTOM_PARAMETERS=
|
|
||||||
[Cloud-Runner-Agent] steamPathFull=/data/0-windows64-7zhj/steam
|
|
||||||
[Cloud-Runner-Agent] kubeVolumeSize=5Gi
|
|
||||||
[Cloud-Runner-Agent] ECS_CONTAINER_METADATA_URI=http://169.254.170.2/v3/606b4f3707824e329480a612293343cb-1854725462
|
|
||||||
[Cloud-Runner-Agent] buildParameters={"version":"2019.2.11f1","customImage":false,"platform":"StandaloneWindows64","projectPath":"test-project","buildName":"StandaloneWindows64","buildPath":"build/StandaloneWindows64","buildFile":"StandaloneWindows64.exe","buildMethod":"","buildVersion":"none","androidVersionCode":0,"androidKeystoreName":"","androidKeystoreBase64":"","androidKeystorePass":"","androidKeyaliasName":"","androidKeyaliasPass":"","androidTargetSdkVersion":"","androidSdkManagerParameters":"","customParameters":"","sshAgent":"","gitPrivateToken":"","chownFilesTo":"","cloudRunnerCluster":"","awsBaseStackName":"game-ci-3-test","kubeConfig":"","githubToken":"","cloudRunnerMemory":"750M","cloudRunnerCpu":"1.0","kubeVolumeSize":"5Gi","kubeVolume":"","postBuildSteps":"","preBuildSteps":"","customBuildSteps":"\n - name: 'step 1'\n image: 'alpine'\n commands: ['printenv']\n secrets:\n - name: 'testSecretName'\n value: 'testSecretValue'\n ","runNumber":"0","branch":"remote-builder/unified-providers","githubRepo":"game-ci/unity-builder","logToFile":true,"remoteBuildCluster":"","awsStackName":"game-ci-3-test"}
|
|
||||||
[Cloud-Runner-Agent] cloudRunnerCluster=
|
|
||||||
[Cloud-Runner-Agent] repoPathFull=/data/0-windows64-7zhj/repo
|
|
||||||
[Cloud-Runner-Agent] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
||||||
[Cloud-Runner-Agent] androidAppBundle=false
|
|
||||||
[Cloud-Runner-Agent] libraryFolderFull=/data/0-windows64-7zhj/repo/test-project/Library
|
|
||||||
[Cloud-Runner-Agent] androidKeyaliasName=
|
|
||||||
[Cloud-Runner-Agent] preBuildSteps=
|
|
||||||
[Cloud-Runner-Agent] projectPath=test-project
|
|
||||||
[Cloud-Runner-Agent] buildFile=StandaloneWindows64.exe
|
|
||||||
[Cloud-Runner-Agent] ContainerMemory=750M
|
|
||||||
[Cloud-Runner-Agent] buildName=StandaloneWindows64
|
|
||||||
[Cloud-Runner-Agent] unityVersion=auto
|
|
||||||
[Cloud-Runner-Agent] BUILD_TARGET=StandaloneWindows64
|
|
||||||
[Cloud-Runner-Agent] targetPlatform=StandaloneWindows64
|
|
||||||
[Cloud-Runner-Agent] ALLOW_EMPTY_PASSWORD=yes
|
|
||||||
[Cloud-Runner-Agent] BUILD_PATH=build/StandaloneWindows64
|
|
||||||
[Cloud-Runner-Agent] testSecretName=testSecretValue
|
|
||||||
[Cloud-Runner-Agent] PROJECT_PATH=test-project
|
|
||||||
[Cloud-Runner-Agent] AWS_REGION=eu-west-2
|
|
||||||
[Cloud-Runner-Agent] awsBaseStackName=game-ci-3-test
|
|
||||||
[Cloud-Runner-Agent] GITHUB_WORKSPACE=/github/workspace
|
|
||||||
[Cloud-Runner-Agent] length=0
|
|
||||||
[Cloud-Runner-Agent] buildVersion=none
|
|
||||||
[Cloud-Runner-Agent] builderPathFull=/data/0-windows64-7zhj/builder
|
|
||||||
[Cloud-Runner-Agent] cliOptions=[object Object]
|
|
||||||
[Cloud-Runner-Agent] androidSdkManagerParameters=
|
|
||||||
[Cloud-Runner-Agent] cloudRunnerMemory=750M
|
|
||||||
[Cloud-Runner-Agent] name=Input
|
|
||||||
[Cloud-Runner-Agent] postBuildSteps=
|
|
||||||
[Cloud-Runner-Agent] gitSha=undefined
|
|
||||||
[Cloud-Runner-Agent] PWD=/data
|
|
||||||
[Cloud-Runner-Agent] allowDirtyBuild=false
|
|
||||||
[Cloud-Runner-Agent] buildsPath=build
|
|
||||||
[Cloud-Runner-Agent] githubToken=
|
|
||||||
[Cloud-Runner-Agent] UNITY_VERSION=2019.2.11f1
|
|
||||||
[Cloud-Runner-Agent] androidTargetSdkVersion=
|
|
||||||
[Cloud-Runner-Agent] buildPath=build/StandaloneWindows64
|
|
||||||
[Cloud-Runner-Agent] projectPathFull=/data/0-windows64-7zhj/repo/test-project
|
|
||||||
[Cloud-Runner-Agent] kubeVolume=
|
|
||||||
[Cloud-Runner-Agent] prototype=[object Object]
|
|
||||||
[Cloud-Runner-Agent] customBuildSteps=
|
|
||||||
[Cloud-Runner-Agent] - name: 'step 1'
|
|
||||||
[Cloud-Runner-Agent] image: 'alpine'
|
|
||||||
[Cloud-Runner-Agent] commands: ['printenv']
|
|
||||||
[Cloud-Runner-Agent] secrets:
|
|
||||||
[Cloud-Runner-Agent] - name: 'testSecretName'
|
|
||||||
[Cloud-Runner-Agent] value: 'testSecretValue'
|
|
||||||
[Cloud-Runner-Agent]
|
|
||||||
[Cloud-Runner-Agent] ContainerCpu=1.0
|
|
||||||
|
|
@ -554,8 +554,7 @@ class SetupRemoteRepository {
|
||||||
}
|
}
|
||||||
static printLFSHashState() {
|
static printLFSHashState() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`
|
yield remote_client_system_1.RemoteClientSystem.Run(`echo ' '
|
||||||
echo ' '
|
|
||||||
echo 'Contents of .lfs-assets-guid file:'
|
echo 'Contents of .lfs-assets-guid file:'
|
||||||
cat .lfs-assets-guid
|
cat .lfs-assets-guid
|
||||||
echo ' '
|
echo ' '
|
||||||
|
|
@ -564,14 +563,12 @@ class SetupRemoteRepository {
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Source repository initialized'
|
echo 'Source repository initialized'
|
||||||
ls ${cloud_runner_state_1.CloudRunnerState.projectPathFull}
|
ls ${cloud_runner_state_1.CloudRunnerState.projectPathFull}
|
||||||
echo ' '
|
echo ' '`);
|
||||||
`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static printCacheState(lfsCacheFolder, libraryCacheFolder) {
|
static printCacheState(lfsCacheFolder, libraryCacheFolder) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`
|
yield remote_client_system_1.RemoteClientSystem.Run(`echo ' '
|
||||||
echo ' '
|
|
||||||
echo "LFS cache for $branch"
|
echo "LFS cache for $branch"
|
||||||
du -sch "${lfsCacheFolder}/"
|
du -sch "${lfsCacheFolder}/"
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
@ -583,8 +580,7 @@ class SetupRemoteRepository {
|
||||||
echo '**'
|
echo '**'
|
||||||
echo 'Full cache'
|
echo 'Full cache'
|
||||||
du -sch "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull}/"
|
du -sch "${cloud_runner_state_1.CloudRunnerState.cacheFolderFull}/"
|
||||||
echo ' '
|
echo ' '`);
|
||||||
`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static handleCachePurging() {
|
static handleCachePurging() {
|
||||||
|
|
@ -652,38 +648,27 @@ class SetupRemoteRepository {
|
||||||
cloud_runner_logger_1.default.logRemoteCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`);
|
cloud_runner_logger_1.default.logRemoteCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`);
|
||||||
if (fs_1.default.existsSync(latestLibraryCacheFile)) {
|
if (fs_1.default.existsSync(latestLibraryCacheFile)) {
|
||||||
cloud_runner_logger_1.default.logRemoteCli(`Library cache exists`);
|
cloud_runner_logger_1.default.logRemoteCli(`Library cache exists`);
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`
|
const latestCacheFilePath = path_1.default.join(libraryCacheFolder, latestLibraryCacheFile);
|
||||||
unzip -q "${path_1.default.join(libraryCacheFolder, latestLibraryCacheFile)}" -d "$projectPathFull"
|
yield remote_client_system_1.RemoteClientSystem.Run(`unzip -q "${latestCacheFilePath}" -d "$projectPathFull"`);
|
||||||
tree "${cloud_runner_state_1.CloudRunnerState.libraryFolderFull}"
|
|
||||||
`);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static createLFSHashFiles() {
|
static createLFSHashFiles() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`
|
yield remote_client_system_1.RemoteClientSystem.Run(`git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid`);
|
||||||
git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid
|
yield remote_client_system_1.RemoteClientSystem.Run(`md5sum .lfs-assets-guid > .lfs-assets-guid-sum`);
|
||||||
`);
|
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`
|
|
||||||
md5sum .lfs-assets-guid > .lfs-assets-guid-sum
|
|
||||||
`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static cloneRepoWithoutLFSFiles() {
|
static cloneRepoWithoutLFSFiles() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
cloud_runner_logger_1.default.logRemoteCli(`Initializing source repository for cloning with caching of LFS files`);
|
cloud_runner_logger_1.default.logRemoteCli(`Initializing source repository for cloning with caching of LFS files`);
|
||||||
process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull);
|
process.chdir(cloud_runner_state_1.CloudRunnerState.repoPathFull);
|
||||||
// stop annoying git detatched head info
|
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`git config --global advice.detachedHead false`);
|
yield remote_client_system_1.RemoteClientSystem.Run(`git config --global advice.detachedHead false`);
|
||||||
cloud_runner_logger_1.default.logRemoteCli(`Cloning the repository being built:`);
|
cloud_runner_logger_1.default.logRemoteCli(`Cloning the repository being built:`);
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`git lfs install --skip-smudge`);
|
yield remote_client_system_1.RemoteClientSystem.Run(`git lfs install --skip-smudge`);
|
||||||
cloud_runner_logger_1.default.logRemoteCli(cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl);
|
cloud_runner_logger_1.default.logRemoteCli(cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl);
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`
|
yield remote_client_system_1.RemoteClientSystem.Run(`git clone --depth 1 ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl}`);
|
||||||
git clone --depth 1 ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl}
|
yield remote_client_system_1.RemoteClientSystem.Run(`git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.gitSha}`);
|
||||||
`);
|
|
||||||
yield remote_client_system_1.RemoteClientSystem.Run(`
|
|
||||||
git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.gitSha}
|
|
||||||
`);
|
|
||||||
cloud_runner_logger_1.default.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
cloud_runner_logger_1.default.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -26,8 +26,8 @@ export class SetupRemoteRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async printLFSHashState() {
|
private static async printLFSHashState() {
|
||||||
await RemoteClientSystem.Run(`
|
await RemoteClientSystem.Run(
|
||||||
echo ' '
|
`echo ' '
|
||||||
echo 'Contents of .lfs-assets-guid file:'
|
echo 'Contents of .lfs-assets-guid file:'
|
||||||
cat .lfs-assets-guid
|
cat .lfs-assets-guid
|
||||||
echo ' '
|
echo ' '
|
||||||
|
|
@ -36,13 +36,13 @@ export class SetupRemoteRepository {
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Source repository initialized'
|
echo 'Source repository initialized'
|
||||||
ls ${CloudRunnerState.projectPathFull}
|
ls ${CloudRunnerState.projectPathFull}
|
||||||
echo ' '
|
echo ' '`,
|
||||||
`);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async printCacheState(lfsCacheFolder: string, libraryCacheFolder: string) {
|
private static async printCacheState(lfsCacheFolder: string, libraryCacheFolder: string) {
|
||||||
await RemoteClientSystem.Run(`
|
await RemoteClientSystem.Run(
|
||||||
echo ' '
|
`echo ' '
|
||||||
echo "LFS cache for $branch"
|
echo "LFS cache for $branch"
|
||||||
du -sch "${lfsCacheFolder}/"
|
du -sch "${lfsCacheFolder}/"
|
||||||
echo '**'
|
echo '**'
|
||||||
|
|
@ -54,8 +54,8 @@ export class SetupRemoteRepository {
|
||||||
echo '**'
|
echo '**'
|
||||||
echo 'Full cache'
|
echo 'Full cache'
|
||||||
du -sch "${CloudRunnerState.cacheFolderFull}/"
|
du -sch "${CloudRunnerState.cacheFolderFull}/"
|
||||||
echo ' '
|
echo ' '`,
|
||||||
`);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static handleCachePurging() {
|
private static handleCachePurging() {
|
||||||
|
|
@ -123,36 +123,25 @@ export class SetupRemoteRepository {
|
||||||
CloudRunnerLogger.logRemoteCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`);
|
CloudRunnerLogger.logRemoteCli(`Checking if Library cache ${libraryCacheFolder}/${latestLibraryCacheFile} exists`);
|
||||||
if (fs.existsSync(latestLibraryCacheFile)) {
|
if (fs.existsSync(latestLibraryCacheFile)) {
|
||||||
CloudRunnerLogger.logRemoteCli(`Library cache exists`);
|
CloudRunnerLogger.logRemoteCli(`Library cache exists`);
|
||||||
await RemoteClientSystem.Run(`
|
const latestCacheFilePath = path.join(libraryCacheFolder, latestLibraryCacheFile);
|
||||||
unzip -q "${path.join(libraryCacheFolder, latestLibraryCacheFile)}" -d "$projectPathFull"
|
await RemoteClientSystem.Run(`unzip -q "${latestCacheFilePath}" -d "$projectPathFull"`);
|
||||||
tree "${CloudRunnerState.libraryFolderFull}"
|
|
||||||
`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async createLFSHashFiles() {
|
private static async createLFSHashFiles() {
|
||||||
await RemoteClientSystem.Run(`
|
await RemoteClientSystem.Run(`git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid`);
|
||||||
git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid
|
await RemoteClientSystem.Run(`md5sum .lfs-assets-guid > .lfs-assets-guid-sum`);
|
||||||
`);
|
|
||||||
await RemoteClientSystem.Run(`
|
|
||||||
md5sum .lfs-assets-guid > .lfs-assets-guid-sum
|
|
||||||
`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async cloneRepoWithoutLFSFiles() {
|
private static async cloneRepoWithoutLFSFiles() {
|
||||||
CloudRunnerLogger.logRemoteCli(`Initializing source repository for cloning with caching of LFS files`);
|
CloudRunnerLogger.logRemoteCli(`Initializing source repository for cloning with caching of LFS files`);
|
||||||
process.chdir(CloudRunnerState.repoPathFull);
|
process.chdir(CloudRunnerState.repoPathFull);
|
||||||
// stop annoying git detatched head info
|
|
||||||
await RemoteClientSystem.Run(`git config --global advice.detachedHead false`);
|
await RemoteClientSystem.Run(`git config --global advice.detachedHead false`);
|
||||||
CloudRunnerLogger.logRemoteCli(`Cloning the repository being built:`);
|
CloudRunnerLogger.logRemoteCli(`Cloning the repository being built:`);
|
||||||
await RemoteClientSystem.Run(`git lfs install --skip-smudge`);
|
await RemoteClientSystem.Run(`git lfs install --skip-smudge`);
|
||||||
CloudRunnerLogger.logRemoteCli(CloudRunnerState.targetBuildRepoUrl);
|
CloudRunnerLogger.logRemoteCli(CloudRunnerState.targetBuildRepoUrl);
|
||||||
await RemoteClientSystem.Run(`
|
await RemoteClientSystem.Run(`git clone --depth 1 ${CloudRunnerState.targetBuildRepoUrl}`);
|
||||||
git clone --depth 1 ${CloudRunnerState.targetBuildRepoUrl}
|
await RemoteClientSystem.Run(`git checkout ${CloudRunnerState.buildParams.gitSha}`);
|
||||||
`);
|
|
||||||
await RemoteClientSystem.Run(`
|
|
||||||
git checkout ${CloudRunnerState.buildParams.gitSha}
|
|
||||||
`);
|
|
||||||
CloudRunnerLogger.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
CloudRunnerLogger.logRemoteCli(`Checked out ${process.env.GITHUB_SHA}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue