cleanup
parent
2b24bb8882
commit
a2b26a7fa2
|
|
@ -5511,26 +5511,27 @@ class BuildAutomationWorkflow {
|
||||||
apt-get install -y tar tree npm git-lfs jq git > /dev/null
|
apt-get install -y tar tree npm git-lfs jq git > /dev/null
|
||||||
npm install -g n > /dev/null
|
npm install -g n > /dev/null
|
||||||
n stable > /dev/null
|
n stable > /dev/null
|
||||||
|
${BuildAutomationWorkflow.TreeCommand}
|
||||||
${setupHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
${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)}"
|
export GITHUB_WORKSPACE="${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}"
|
||||||
${BuildAutomationWorkflow.setupCommands(builderPath)}
|
${BuildAutomationWorkflow.setupCommands(builderPath)}
|
||||||
${setupHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
|
${setupHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
|
||||||
|
${BuildAutomationWorkflow.TreeCommand}
|
||||||
${buildHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
${buildHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
||||||
${BuildAutomationWorkflow.BuildCommands(builderPath)}
|
${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) {
|
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 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`;
|
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
|
return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||||
echo "game ci cloud runner clone"
|
echo "game ci cloud runner clone"
|
||||||
${retainedWorkspaceCommands}
|
${retainedWorkspaceCommands}
|
||||||
${cloneBuilderCommands}
|
${cloneBuilderCommands}
|
||||||
${BuildAutomationWorkflow.TreeCommand}
|
|
||||||
echo "game ci cloud runner bootstrap"
|
echo "game ci cloud runner bootstrap"
|
||||||
node ${builderPath} -m remote-cli-pre-build
|
node ${builderPath} -m remote-cli-pre-build`;
|
||||||
${BuildAutomationWorkflow.TreeCommand}`;
|
|
||||||
}
|
}
|
||||||
static BuildCommands(builderPath) {
|
static BuildCommands(builderPath) {
|
||||||
const distFolder = path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist');
|
const distFolder = path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist');
|
||||||
|
|
@ -5547,9 +5548,7 @@ class BuildAutomationWorkflow {
|
||||||
/entrypoint.sh
|
/entrypoint.sh
|
||||||
echo "game ci cloud runner push library to cache"
|
echo "game ci cloud runner push library to cache"
|
||||||
chmod +x ${builderPath}
|
chmod +x ${builderPath}
|
||||||
${BuildAutomationWorkflow.TreeCommand}
|
node ${builderPath} -m remote-cli-post-build`;
|
||||||
node ${builderPath} -m remote-cli-post-build
|
|
||||||
${BuildAutomationWorkflow.TreeCommand}`;
|
|
||||||
}
|
}
|
||||||
static get TreeCommand() {
|
static get TreeCommand() {
|
||||||
return cloud_runner_options_1.default.cloudRunnerDebugTree
|
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
|
apt-get install -y tar tree npm git-lfs jq git > /dev/null
|
||||||
npm install -g n > /dev/null
|
npm install -g n > /dev/null
|
||||||
n stable > /dev/null
|
n stable > /dev/null
|
||||||
|
${BuildAutomationWorkflow.TreeCommand}
|
||||||
${setupHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
${setupHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
||||||
export GITHUB_WORKSPACE="${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.repoPathAbsolute)}"
|
export GITHUB_WORKSPACE="${CloudRunnerFolders.ToLinuxFolder(CloudRunnerFolders.repoPathAbsolute)}"
|
||||||
${BuildAutomationWorkflow.setupCommands(builderPath)}
|
${BuildAutomationWorkflow.setupCommands(builderPath)}
|
||||||
${setupHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
|
${setupHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}
|
||||||
|
${BuildAutomationWorkflow.TreeCommand}
|
||||||
${buildHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
${buildHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}
|
||||||
${BuildAutomationWorkflow.BuildCommands(builderPath)}
|
${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) {
|
private static setupCommands(builderPath) {
|
||||||
|
|
@ -119,7 +122,7 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
||||||
CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute,
|
CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute,
|
||||||
)}" ] && [ -e "${CloudRunnerFolders.ToLinuxFolder(
|
)}" ] && [ -e "${CloudRunnerFolders.ToLinuxFolder(
|
||||||
path.join(CloudRunnerFolders.repoPathAbsolute, `.git`),
|
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(
|
const cloneBuilderCommands = `if [ -e "${CloudRunnerFolders.ToLinuxFolder(
|
||||||
CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute,
|
CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute,
|
||||||
|
|
@ -131,10 +134,8 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
||||||
echo "game ci cloud runner clone"
|
echo "game ci cloud runner clone"
|
||||||
${retainedWorkspaceCommands}
|
${retainedWorkspaceCommands}
|
||||||
${cloneBuilderCommands}
|
${cloneBuilderCommands}
|
||||||
${BuildAutomationWorkflow.TreeCommand}
|
|
||||||
echo "game ci cloud runner bootstrap"
|
echo "game ci cloud runner bootstrap"
|
||||||
node ${builderPath} -m remote-cli-pre-build
|
node ${builderPath} -m remote-cli-pre-build`;
|
||||||
${BuildAutomationWorkflow.TreeCommand}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BuildCommands(builderPath) {
|
private static BuildCommands(builderPath) {
|
||||||
|
|
@ -153,9 +154,7 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
||||||
/entrypoint.sh
|
/entrypoint.sh
|
||||||
echo "game ci cloud runner push library to cache"
|
echo "game ci cloud runner push library to cache"
|
||||||
chmod +x ${builderPath}
|
chmod +x ${builderPath}
|
||||||
${BuildAutomationWorkflow.TreeCommand}
|
node ${builderPath} -m remote-cli-post-build`;
|
||||||
node ${builderPath} -m remote-cli-post-build
|
|
||||||
${BuildAutomationWorkflow.TreeCommand}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static get TreeCommand(): string {
|
private static get TreeCommand(): string {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue