cleanup
parent
2b24bb8882
commit
a2b26a7fa2
|
|
@ -5511,26 +5511,27 @@ class BuildAutomationWorkflow {
|
|||
apt-get install -y tar tree npm git-lfs jq git > /dev/null
|
||||
npm install -g n > /dev/null
|
||||
n stable > /dev/null
|
||||
${BuildAutomationWorkflow.TreeCommand}
|
||||
${setupHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
||||
export GITHUB_WORKSPACE="${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}"
|
||||
${BuildAutomationWorkflow.setupCommands(builderPath)}
|
||||
${setupHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
|
||||
${BuildAutomationWorkflow.TreeCommand}
|
||||
${buildHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
||||
${BuildAutomationWorkflow.BuildCommands(builderPath)}
|
||||
${buildHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}`;
|
||||
${buildHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
|
||||
${BuildAutomationWorkflow.TreeCommand}`;
|
||||
}
|
||||
static setupCommands(builderPath) {
|
||||
const commands = `mkdir -p ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute)} && git clone -q -b ${cloud_runner_1.default.buildParameters.cloudRunnerBranch} ${cloud_runner_folders_1.CloudRunnerFolders.unityBuilderRepoUrl} "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute)}" && chmod +x ${builderPath}`;
|
||||
const retainedWorkspaceCommands = `if [ -e "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)}" ] && [ -e "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `.git`))}" ]; then echo "Retained Workspace Already Exists!" && ${BuildAutomationWorkflow.TreeCommand} ; fi`;
|
||||
const retainedWorkspaceCommands = `if [ -e "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)}" ] && [ -e "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `.git`))}" ]; then echo "Retained Workspace Already Exists!" ; fi`;
|
||||
const cloneBuilderCommands = `if [ -e "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)}" ] && [ -e "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, `.git`))}" ]; then echo "Builder Already Exists!"; else ${commands}; fi`;
|
||||
return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||
echo "game ci cloud runner clone"
|
||||
${retainedWorkspaceCommands}
|
||||
${cloneBuilderCommands}
|
||||
${BuildAutomationWorkflow.TreeCommand}
|
||||
echo "game ci cloud runner bootstrap"
|
||||
node ${builderPath} -m remote-cli-pre-build
|
||||
${BuildAutomationWorkflow.TreeCommand}`;
|
||||
node ${builderPath} -m remote-cli-pre-build`;
|
||||
}
|
||||
static BuildCommands(builderPath) {
|
||||
const distFolder = path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist');
|
||||
|
|
@ -5547,9 +5548,7 @@ class BuildAutomationWorkflow {
|
|||
/entrypoint.sh
|
||||
echo "game ci cloud runner push library to cache"
|
||||
chmod +x ${builderPath}
|
||||
${BuildAutomationWorkflow.TreeCommand}
|
||||
node ${builderPath} -m remote-cli-post-build
|
||||
${BuildAutomationWorkflow.TreeCommand}`;
|
||||
node ${builderPath} -m remote-cli-post-build`;
|
||||
}
|
||||
static get TreeCommand() {
|
||||
return cloud_runner_options_1.default.cloudRunnerDebugTree
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -99,13 +99,16 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
|||
apt-get install -y tar tree npm git-lfs jq git > /dev/null
|
||||
npm install -g n > /dev/null
|
||||
n stable > /dev/null
|
||||
${BuildAutomationWorkflow.TreeCommand}
|
||||
${setupHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
||||
export GITHUB_WORKSPACE="${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.repoPathAbsolute)}"
|
||||
${BuildAutomationWorkflow.setupCommands(builderPath)}
|
||||
${setupHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
|
||||
${BuildAutomationWorkflow.TreeCommand}
|
||||
${buildHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
||||
${BuildAutomationWorkflow.BuildCommands(builderPath)}
|
||||
${buildHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}`;
|
||||
${buildHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
|
||||
${BuildAutomationWorkflow.TreeCommand}`;
|
||||
}
|
||||
|
||||
private static setupCommands(builderPath) {
|
||||
|
|
@ -119,7 +122,7 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
|||
CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute,
|
||||
)}" ] && [ -e "${CloudRunnerFolders.ToLinuxFolder(
|
||||
path.join(CloudRunnerFolders.repoPathAbsolute, `.git`),
|
||||
)}" ]; then echo "Retained Workspace Already Exists!" && ${BuildAutomationWorkflow.TreeCommand} ; fi`;
|
||||
)}" ]; then echo "Retained Workspace Already Exists!" ; fi`;
|
||||
|
||||
const cloneBuilderCommands = `if [ -e "${CloudRunnerFolders.ToLinuxFolder(
|
||||
CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute,
|
||||
|
|
@ -131,10 +134,8 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
|||
echo "game ci cloud runner clone"
|
||||
${retainedWorkspaceCommands}
|
||||
${cloneBuilderCommands}
|
||||
${BuildAutomationWorkflow.TreeCommand}
|
||||
echo "game ci cloud runner bootstrap"
|
||||
node ${builderPath} -m remote-cli-pre-build
|
||||
${BuildAutomationWorkflow.TreeCommand}`;
|
||||
node ${builderPath} -m remote-cli-pre-build`;
|
||||
}
|
||||
|
||||
private static BuildCommands(builderPath) {
|
||||
|
|
@ -153,9 +154,7 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
|||
/entrypoint.sh
|
||||
echo "game ci cloud runner push library to cache"
|
||||
chmod +x ${builderPath}
|
||||
${BuildAutomationWorkflow.TreeCommand}
|
||||
node ${builderPath} -m remote-cli-post-build
|
||||
${BuildAutomationWorkflow.TreeCommand}`;
|
||||
node ${builderPath} -m remote-cli-post-build`;
|
||||
}
|
||||
|
||||
private static get TreeCommand(): string {
|
||||
|
|
|
|||
Loading…
Reference in New Issue