log file path

pull/531/head
Frostebite 2023-05-14 17:40:30 +01:00
parent 1df6a12ca4
commit d3b4f28e32
4 changed files with 45 additions and 34 deletions

40
dist/index.js generated vendored
View File

@ -4295,7 +4295,7 @@ const yaml_1 = __importDefault(__nccwpck_require__(44603));
const github_1 = __importDefault(__nccwpck_require__(39789));
const build_parameters_1 = __importDefault(__nccwpck_require__(80787));
class RemoteClient {
static async runRemoteClientJob() {
static async setupRemoteClient() {
cloud_runner_logger_1.default.log(`bootstrap game ci cloud runner...`);
if (!(await RemoteClient.handleRetainedWorkspace())) {
await RemoteClient.bootstrapRepository();
@ -4303,7 +4303,22 @@ class RemoteClient {
await RemoteClient.replaceLargePackageReferencesWithSharedReferences();
await RemoteClient.runCustomHookFiles(`before-build`);
}
static async PostCLIBuild() {
static async remoteClientBuild() {
cloud_runner_logger_1.default.log(`bootstrap game ci cloud runner...`);
const distFolder = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist');
const ubuntuPlatformsFolder = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist', 'platforms', 'ubuntu');
cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${`${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.projectBuildFolderAbsolute)}/build`}
cd ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute)}
cp -r "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(distFolder, 'default-build-script'))}" "/UnityBuilderAction"
cp -r "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}" "/entrypoint.sh"
cp -r "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'steps'))}" "/steps"
chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps"
echo "game ci start"
/entrypoint.sh
echo "game ci caching results"`);
}
static async remoteClientPostBuild() {
remote_client_logger_1.RemoteClientLogger.log(`Running POST build tasks`);
await caching_1.Caching.PushToCache(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(`${cloud_runner_folders_1.CloudRunnerFolders.cacheFolderForCacheKeyFull}/Library`), cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.libraryFolderAbsolute), `lib-${cloud_runner_1.default.buildParameters.buildGuid}`);
await caching_1.Caching.PushToCache(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(`${cloud_runner_folders_1.CloudRunnerFolders.cacheFolderForCacheKeyFull}/build`), cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.projectBuildFolderAbsolute), `build-${cloud_runner_1.default.buildParameters.buildGuid}`);
@ -4435,10 +4450,13 @@ class RemoteClient {
}
__decorate([
cli_functions_repository_1.CliFunction(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`)
], RemoteClient, "runRemoteClientJob", null);
], RemoteClient, "setupRemoteClient", null);
__decorate([
cli_functions_repository_1.CliFunction(`remote-cli-build`, `sets up a repository, usually before a game-ci build`)
], RemoteClient, "remoteClientBuild", null);
__decorate([
cli_functions_repository_1.CliFunction(`remote-cli-post-build`, `runs a cloud runner build`)
], RemoteClient, "PostCLIBuild", null);
], RemoteClient, "remoteClientPostBuild", null);
exports.RemoteClient = RemoteClient;
@ -5695,20 +5713,8 @@ echo "log start" > /home/job-log.txt
node ${builderPath} -m remote-cli-pre-build`;
}
static BuildCommands(builderPath) {
const distFolder = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist');
const ubuntuPlatformsFolder = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist', 'platforms', 'ubuntu');
return `echo "game ci cloud runner initalized"
mkdir -p ${`${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.projectBuildFolderAbsolute)}/build`}
cd ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute)}
cp -r "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(distFolder, 'default-build-script'))}" "/UnityBuilderAction"
cp -r "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}" "/entrypoint.sh"
cp -r "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'steps'))}" "/steps"
chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps"
echo "game ci start"
/entrypoint.sh
echo "game ci caching results"
chmod +x ${builderPath}
node ${builderPath} -m remote-cli-build
node ${builderPath} -m remote-cli-post-build`;
}
}

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ import BuildParameters from '../../build-parameters';
export class RemoteClient {
@CliFunction(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`)
static async runRemoteClientJob() {
static async setupRemoteClient() {
CloudRunnerLogger.log(`bootstrap game ci cloud runner...`);
if (!(await RemoteClient.handleRetainedWorkspace())) {
await RemoteClient.bootstrapRepository();
@ -23,9 +23,27 @@ export class RemoteClient {
await RemoteClient.replaceLargePackageReferencesWithSharedReferences();
await RemoteClient.runCustomHookFiles(`before-build`);
}
@CliFunction(`remote-cli-build`, `sets up a repository, usually before a game-ci build`)
static async remoteClientBuild() {
CloudRunnerLogger.log(`bootstrap game ci cloud runner...`);
const distFolder = path.join(CloudRunnerFolders.builderPathAbsolute, 'dist');
const ubuntuPlatformsFolder = path.join(CloudRunnerFolders.builderPathAbsolute, 'dist', 'platforms', 'ubuntu');
CloudRunnerSystem.Run(`mkdir -p ${`${CloudRunnerFolders.ToLinuxFolder(
CloudRunnerFolders.projectBuildFolderAbsolute,
)}/build`}
cd ${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.projectPathAbsolute)}
cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(distFolder, 'default-build-script'))}" "/UnityBuilderAction"
cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}" "/entrypoint.sh"
cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'steps'))}" "/steps"
chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps"
echo "game ci start"
/entrypoint.sh
echo "game ci caching results"`);
}
@CliFunction(`remote-cli-post-build`, `runs a cloud runner build`)
public static async PostCLIBuild(): Promise<string> {
public static async remoteClientPostBuild(): Promise<string> {
RemoteClientLogger.log(`Running POST build tasks`);
await Caching.PushToCache(

View File

@ -97,21 +97,8 @@ node ${builderPath} -m remote-cli-pre-build`;
}
private static BuildCommands(builderPath: string) {
const distFolder = path.join(CloudRunnerFolders.builderPathAbsolute, 'dist');
const ubuntuPlatformsFolder = path.join(CloudRunnerFolders.builderPathAbsolute, 'dist', 'platforms', 'ubuntu');
return `echo "game ci cloud runner initalized"
mkdir -p ${`${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.projectBuildFolderAbsolute)}/build`}
cd ${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.projectPathAbsolute)}
cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(distFolder, 'default-build-script'))}" "/UnityBuilderAction"
cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}" "/entrypoint.sh"
cp -r "${CloudRunnerFolders.ToLinuxFolder(path.join(ubuntuPlatformsFolder, 'steps'))}" "/steps"
chmod -R +x "/entrypoint.sh"
chmod -R +x "/steps"
echo "game ci start"
/entrypoint.sh
echo "game ci caching results"
chmod +x ${builderPath}
node ${builderPath} -m remote-cli-build
node ${builderPath} -m remote-cli-post-build`;
}
}