mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-11 08:23:56 -07:00
Rename Cloud Runner to Orchestrator (#775)
* 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>
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
import OrchestratorSecret from '../options/orchestrator-secret';
|
||||
import OrchestratorEnvironmentVariable from '../options/orchestrator-environment-variable';
|
||||
import OrchestratorLogger from '../services/core/orchestrator-logger';
|
||||
import { OrchestratorFolders } from '../options/orchestrator-folders';
|
||||
import Orchestrator from '../orchestrator';
|
||||
|
||||
export class AsyncWorkflow {
|
||||
public static async runAsyncWorkflow(
|
||||
environmentVariables: OrchestratorEnvironmentVariable[],
|
||||
secrets: OrchestratorSecret[],
|
||||
): Promise<string> {
|
||||
try {
|
||||
OrchestratorLogger.log(`Orchestrator is running async mode`);
|
||||
const asyncEnvironmentVariable = new OrchestratorEnvironmentVariable();
|
||||
asyncEnvironmentVariable.name = `ASYNC_WORKFLOW`;
|
||||
asyncEnvironmentVariable.value = `true`;
|
||||
|
||||
let output = '';
|
||||
|
||||
output += await Orchestrator.Provider.runTaskInWorkflow(
|
||||
Orchestrator.buildParameters.buildGuid,
|
||||
`ubuntu`,
|
||||
`apt-get update > /dev/null
|
||||
apt-get install -y curl tar tree npm git git-lfs jq git > /dev/null
|
||||
mkdir /builder
|
||||
printenv
|
||||
git config --global advice.detachedHead false
|
||||
git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
|
||||
git config --global filter.lfs.process "git-lfs filter-process --skip"
|
||||
BRANCH="${Orchestrator.buildParameters.orchestratorBranch}"
|
||||
REPO="${OrchestratorFolders.unityBuilderRepoUrl}"
|
||||
if [ -n "$(git ls-remote --heads "$REPO" "$BRANCH" 2>/dev/null)" ]; then
|
||||
git clone -q -b "$BRANCH" "$REPO" /builder
|
||||
else
|
||||
echo "Remote branch $BRANCH not found in $REPO; falling back to a known branch"
|
||||
git clone -q -b orchestrator-develop "$REPO" /builder \
|
||||
|| git clone -q -b main "$REPO" /builder \
|
||||
|| git clone -q "$REPO" /builder
|
||||
fi
|
||||
git clone -q -b ${Orchestrator.buildParameters.branch} ${OrchestratorFolders.targetBuildRepoUrl} /repo
|
||||
cd /repo
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
unzip awscliv2.zip
|
||||
./aws/install
|
||||
aws --version
|
||||
node /builder/dist/index.js -m async-workflow`,
|
||||
`/${OrchestratorFolders.buildVolumeFolder}`,
|
||||
`/${OrchestratorFolders.buildVolumeFolder}/`,
|
||||
[...environmentVariables, asyncEnvironmentVariable],
|
||||
[
|
||||
...secrets,
|
||||
...[
|
||||
{
|
||||
ParameterKey: `GITHUB_TOKEN`,
|
||||
EnvironmentVariable: `GITHUB_TOKEN`,
|
||||
ParameterValue: process.env.GITHUB_TOKEN || ``,
|
||||
},
|
||||
{
|
||||
ParameterKey: `AWS_ACCESS_KEY_ID`,
|
||||
EnvironmentVariable: `AWS_ACCESS_KEY_ID`,
|
||||
ParameterValue: process.env.AWS_ACCESS_KEY_ID || ``,
|
||||
},
|
||||
{
|
||||
ParameterKey: `AWS_SECRET_ACCESS_KEY`,
|
||||
EnvironmentVariable: `AWS_SECRET_ACCESS_KEY`,
|
||||
ParameterValue: process.env.AWS_SECRET_ACCESS_KEY || ``,
|
||||
},
|
||||
],
|
||||
],
|
||||
);
|
||||
|
||||
return output;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user