debug skip cache and lfs capability
parent
5a08d19fa4
commit
b324d78732
|
|
@ -310,6 +310,8 @@ class BuildParameters {
|
||||||
asyncWorkflow: cloud_runner_options_1.default.asyncCloudRunner,
|
asyncWorkflow: cloud_runner_options_1.default.asyncCloudRunner,
|
||||||
githubCheckId: cloud_runner_options_1.default.githubCheckId,
|
githubCheckId: cloud_runner_options_1.default.githubCheckId,
|
||||||
triggerWorkflowOnComplete: cloud_runner_options_1.default.triggerWorkflowOnComplete,
|
triggerWorkflowOnComplete: cloud_runner_options_1.default.triggerWorkflowOnComplete,
|
||||||
|
cloudRunnerDebugSkipLFS: cloud_runner_options_1.default.cloudRunnerDebugSkipLFS,
|
||||||
|
cloudRunnerDebugSkipCache: cloud_runner_options_1.default.cloudRunnerDebugSkipCache,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -891,6 +893,12 @@ class CloudRunnerOptions {
|
||||||
static get cloudRunnerDebugEnv() {
|
static get cloudRunnerDebugEnv() {
|
||||||
return CloudRunnerOptions.getInput(`cloudRunnerDebugEnv`) || false;
|
return CloudRunnerOptions.getInput(`cloudRunnerDebugEnv`) || false;
|
||||||
}
|
}
|
||||||
|
static get cloudRunnerDebugSkipLFS() {
|
||||||
|
return CloudRunnerOptions.getInput(`cloudRunnerDebugSkipLFS`) || false;
|
||||||
|
}
|
||||||
|
static get cloudRunnerDebugSkipCache() {
|
||||||
|
return CloudRunnerOptions.getInput(`cloudRunnerDebugSkipCache`) || false;
|
||||||
|
}
|
||||||
static get watchCloudRunnerToEnd() {
|
static get watchCloudRunnerToEnd() {
|
||||||
if (CloudRunnerOptions.asyncCloudRunner) {
|
if (CloudRunnerOptions.asyncCloudRunner) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -4374,6 +4382,9 @@ class Caching {
|
||||||
}
|
}
|
||||||
static PullFromCache(cacheFolder, destinationFolder, cacheArtifactName = ``) {
|
static PullFromCache(cacheFolder, destinationFolder, cacheArtifactName = ``) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
if (cloud_runner_1.default.buildParameters.cloudRunnerDebugSkipCache) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
cacheArtifactName = cacheArtifactName.replace(' ', '');
|
cacheArtifactName = cacheArtifactName.replace(' ', '');
|
||||||
let compressionSuffix = '';
|
let compressionSuffix = '';
|
||||||
if (cloud_runner_1.default.buildParameters.useLz4Compression === true) {
|
if (cloud_runner_1.default.buildParameters.useLz4Compression === true) {
|
||||||
|
|
@ -4583,9 +4594,11 @@ class RemoteClient {
|
||||||
process.chdir(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);
|
process.chdir(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.smudge "git-lfs smudge -- %f"`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.smudge "git-lfs smudge -- %f"`);
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process"`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process"`);
|
||||||
|
if (!cloud_runner_1.default.buildParameters.cloudRunnerDebugSkipLFS) {
|
||||||
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs pull`);
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs pull`);
|
||||||
remote_client_logger_1.RemoteClientLogger.log(`pulled latest LFS files`);
|
remote_client_logger_1.RemoteClientLogger.log(`pulled latest LFS files`);
|
||||||
console_1.assert(fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.lfsFolderAbsolute));
|
console_1.assert(fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.lfsFolderAbsolute));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static runRemoteClientJob() {
|
static runRemoteClientJob() {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -74,6 +74,8 @@ class BuildParameters {
|
||||||
public asyncWorkflow!: boolean;
|
public asyncWorkflow!: boolean;
|
||||||
public githubCheckId!: string;
|
public githubCheckId!: string;
|
||||||
public triggerWorkflowOnComplete!: string[];
|
public triggerWorkflowOnComplete!: string[];
|
||||||
|
public cloudRunnerDebugSkipLFS!: boolean;
|
||||||
|
public cloudRunnerDebugSkipCache!: boolean;
|
||||||
|
|
||||||
static async create(): Promise<BuildParameters> {
|
static async create(): Promise<BuildParameters> {
|
||||||
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
|
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
|
||||||
|
|
@ -161,6 +163,8 @@ class BuildParameters {
|
||||||
asyncWorkflow: CloudRunnerOptions.asyncCloudRunner,
|
asyncWorkflow: CloudRunnerOptions.asyncCloudRunner,
|
||||||
githubCheckId: CloudRunnerOptions.githubCheckId,
|
githubCheckId: CloudRunnerOptions.githubCheckId,
|
||||||
triggerWorkflowOnComplete: CloudRunnerOptions.triggerWorkflowOnComplete,
|
triggerWorkflowOnComplete: CloudRunnerOptions.triggerWorkflowOnComplete,
|
||||||
|
cloudRunnerDebugSkipLFS: CloudRunnerOptions.cloudRunnerDebugSkipLFS,
|
||||||
|
cloudRunnerDebugSkipCache: CloudRunnerOptions.cloudRunnerDebugSkipCache,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,12 @@ class CloudRunnerOptions {
|
||||||
static get cloudRunnerDebugEnv(): boolean {
|
static get cloudRunnerDebugEnv(): boolean {
|
||||||
return CloudRunnerOptions.getInput(`cloudRunnerDebugEnv`) || false;
|
return CloudRunnerOptions.getInput(`cloudRunnerDebugEnv`) || false;
|
||||||
}
|
}
|
||||||
|
static get cloudRunnerDebugSkipLFS(): boolean {
|
||||||
|
return CloudRunnerOptions.getInput(`cloudRunnerDebugSkipLFS`) || false;
|
||||||
|
}
|
||||||
|
static get cloudRunnerDebugSkipCache(): boolean {
|
||||||
|
return CloudRunnerOptions.getInput(`cloudRunnerDebugSkipCache`) || false;
|
||||||
|
}
|
||||||
|
|
||||||
static get watchCloudRunnerToEnd(): boolean {
|
static get watchCloudRunnerToEnd(): boolean {
|
||||||
if (CloudRunnerOptions.asyncCloudRunner) {
|
if (CloudRunnerOptions.asyncCloudRunner) {
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,9 @@ export class Caching {
|
||||||
process.chdir(`${startPath}`);
|
process.chdir(`${startPath}`);
|
||||||
}
|
}
|
||||||
public static async PullFromCache(cacheFolder: string, destinationFolder: string, cacheArtifactName: string = ``) {
|
public static async PullFromCache(cacheFolder: string, destinationFolder: string, cacheArtifactName: string = ``) {
|
||||||
|
if (CloudRunner.buildParameters.cloudRunnerDebugSkipCache) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
cacheArtifactName = cacheArtifactName.replace(' ', '');
|
cacheArtifactName = cacheArtifactName.replace(' ', '');
|
||||||
let compressionSuffix = '';
|
let compressionSuffix = '';
|
||||||
if (CloudRunner.buildParameters.useLz4Compression === true) {
|
if (CloudRunner.buildParameters.useLz4Compression === true) {
|
||||||
|
|
|
||||||
|
|
@ -128,10 +128,12 @@ export class RemoteClient {
|
||||||
process.chdir(CloudRunnerFolders.repoPathAbsolute);
|
process.chdir(CloudRunnerFolders.repoPathAbsolute);
|
||||||
await CloudRunnerSystem.Run(`git config --global filter.lfs.smudge "git-lfs smudge -- %f"`);
|
await CloudRunnerSystem.Run(`git config --global filter.lfs.smudge "git-lfs smudge -- %f"`);
|
||||||
await CloudRunnerSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process"`);
|
await CloudRunnerSystem.Run(`git config --global filter.lfs.process "git-lfs filter-process"`);
|
||||||
|
if (!CloudRunner.buildParameters.cloudRunnerDebugSkipLFS) {
|
||||||
await CloudRunnerSystem.Run(`git lfs pull`);
|
await CloudRunnerSystem.Run(`git lfs pull`);
|
||||||
RemoteClientLogger.log(`pulled latest LFS files`);
|
RemoteClientLogger.log(`pulled latest LFS files`);
|
||||||
assert(fs.existsSync(CloudRunnerFolders.lfsFolderAbsolute));
|
assert(fs.existsSync(CloudRunnerFolders.lfsFolderAbsolute));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@CliFunction(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`)
|
@CliFunction(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`)
|
||||||
static async runRemoteClientJob() {
|
static async runRemoteClientJob() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue