mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-13 01:13:54 -07:00
9d475434d3
* Rename "Cloud Runner" to "Orchestrator" across entire codebase Breaking change: All CloudRunner classes, options, environment variables, and action.yml inputs have been renamed to Orchestrator equivalents. - Renamed src/model/cloud-runner/ directory to src/model/orchestrator/ - Renamed all cloud-runner-* files to orchestrator-* - Renamed all CloudRunner* classes to Orchestrator* (15+ classes) - Renamed all cloudRunner* properties to orchestrator* equivalents - Renamed CLOUD_RUNNER_* env vars to ORCHESTRATOR_* - Updated action.yml [CloudRunner] markers to [Orchestrator] - Updated workflow files and package.json test scripts - Updated all runtime strings (cache paths, log messages, branch refs) - Rebuilt dist/index.js No backward compatibility layer is provided. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove tracked log/temp files and add to .gitignore Remove $LOG_FILE and temp/job-log.txt debug artifacts that should not be in the repository. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
91 lines
3.1 KiB
TypeScript
91 lines
3.1 KiB
TypeScript
import path from 'node:path';
|
|
import OrchestratorOptions from './orchestrator-options';
|
|
import Orchestrator from '../orchestrator';
|
|
import BuildParameters from '../../build-parameters';
|
|
|
|
export class OrchestratorFolders {
|
|
public static readonly repositoryFolder = 'repo';
|
|
|
|
public static ToLinuxFolder(folder: string) {
|
|
return folder.replace(/\\/g, `/`);
|
|
}
|
|
|
|
// Only the following paths that do not start a path.join with another "Full" suffixed property need to start with an absolute /
|
|
|
|
public static get uniqueOrchestratorJobFolderAbsolute(): string {
|
|
return Orchestrator.buildParameters && BuildParameters.shouldUseRetainedWorkspaceMode(Orchestrator.buildParameters)
|
|
? path.join(`/`, OrchestratorFolders.buildVolumeFolder, Orchestrator.lockedWorkspace)
|
|
: path.join(`/`, OrchestratorFolders.buildVolumeFolder, Orchestrator.buildParameters.buildGuid);
|
|
}
|
|
|
|
public static get cacheFolderForAllFull(): string {
|
|
return path.join('/', OrchestratorFolders.buildVolumeFolder, OrchestratorFolders.cacheFolder);
|
|
}
|
|
|
|
public static get cacheFolderForCacheKeyFull(): string {
|
|
return path.join(
|
|
'/',
|
|
OrchestratorFolders.buildVolumeFolder,
|
|
OrchestratorFolders.cacheFolder,
|
|
Orchestrator.buildParameters.cacheKey,
|
|
);
|
|
}
|
|
|
|
public static get builderPathAbsolute(): string {
|
|
return path.join(
|
|
OrchestratorOptions.useSharedBuilder
|
|
? `/${OrchestratorFolders.buildVolumeFolder}`
|
|
: OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute,
|
|
`builder`,
|
|
);
|
|
}
|
|
|
|
public static get repoPathAbsolute(): string {
|
|
return path.join(OrchestratorFolders.uniqueOrchestratorJobFolderAbsolute, OrchestratorFolders.repositoryFolder);
|
|
}
|
|
|
|
public static get projectPathAbsolute(): string {
|
|
return path.join(OrchestratorFolders.repoPathAbsolute, Orchestrator.buildParameters.projectPath);
|
|
}
|
|
|
|
public static get libraryFolderAbsolute(): string {
|
|
return path.join(OrchestratorFolders.projectPathAbsolute, `Library`);
|
|
}
|
|
|
|
public static get projectBuildFolderAbsolute(): string {
|
|
return path.join(OrchestratorFolders.repoPathAbsolute, Orchestrator.buildParameters.buildPath);
|
|
}
|
|
|
|
public static get lfsFolderAbsolute(): string {
|
|
return path.join(OrchestratorFolders.repoPathAbsolute, `.git`, `lfs`);
|
|
}
|
|
|
|
public static get purgeRemoteCaching(): boolean {
|
|
return process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined;
|
|
}
|
|
|
|
public static get lfsCacheFolderFull() {
|
|
return path.join(OrchestratorFolders.cacheFolderForCacheKeyFull, `lfs`);
|
|
}
|
|
|
|
public static get libraryCacheFolderFull() {
|
|
return path.join(OrchestratorFolders.cacheFolderForCacheKeyFull, `Library`);
|
|
}
|
|
|
|
public static get unityBuilderRepoUrl(): string {
|
|
return `https://${Orchestrator.buildParameters.gitPrivateToken}@github.com/${Orchestrator.buildParameters.orchestratorRepoName}.git`;
|
|
}
|
|
|
|
public static get targetBuildRepoUrl(): string {
|
|
return `https://${Orchestrator.buildParameters.gitPrivateToken}@github.com/${Orchestrator.buildParameters.githubRepo}.git`;
|
|
}
|
|
|
|
public static get buildVolumeFolder() {
|
|
return 'data';
|
|
}
|
|
|
|
public static get cacheFolder() {
|
|
return 'cache';
|
|
}
|
|
}
|