fix
parent
c3ec13930c
commit
5133a0bcd7
|
@ -5924,11 +5924,15 @@ class BuildAutomationWorkflow {
|
||||||
static get BuildWorkflow() {
|
static get BuildWorkflow() {
|
||||||
const setupHooks = command_hook_service_1.CommandHookService.getHooks(cloud_runner_1.default.buildParameters.commandHooks).filter((x) => x.step?.includes(`setup`));
|
const setupHooks = command_hook_service_1.CommandHookService.getHooks(cloud_runner_1.default.buildParameters.commandHooks).filter((x) => x.step?.includes(`setup`));
|
||||||
const buildHooks = command_hook_service_1.CommandHookService.getHooks(cloud_runner_1.default.buildParameters.commandHooks).filter((x) => x.step?.includes(`build`));
|
const buildHooks = command_hook_service_1.CommandHookService.getHooks(cloud_runner_1.default.buildParameters.commandHooks).filter((x) => x.step?.includes(`build`));
|
||||||
const builderPath = cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist', `index.js`));
|
const builderPath = cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute));
|
||||||
|
// const builderPath = CloudRunnerFolders.ToLinuxFolder(
|
||||||
|
// path.join(CloudRunnerFolders.builderPathAbsolute, 'dist', `index.js`),
|
||||||
|
// );
|
||||||
return `echo "cloud runner build workflow starting"
|
return `echo "cloud runner build workflow starting"
|
||||||
apt-get update > /dev/null
|
apt-get update > /dev/null
|
||||||
apt-get install -y curl tar tree npm git-lfs jq git > /dev/null
|
apt-get install -y curl tar tree npm git-lfs jq git > /dev/null
|
||||||
npm i -g n > /dev/null
|
npm i -g n > /dev/null
|
||||||
|
npm install --global yarn > /dev/null
|
||||||
n 16.16.0 > /dev/null
|
n 16.16.0 > /dev/null
|
||||||
npm --version
|
npm --version
|
||||||
node --version
|
node --version
|
||||||
|
@ -5946,8 +5950,9 @@ class BuildAutomationWorkflow {
|
||||||
const cloneBuilderCommands = `if [ -e "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)}" ] && [ -e "${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, `.git`))}" ] ; then echo "Builder Already Exists!" && tree ${cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute}; 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(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, `.git`))}" ] ; then echo "Builder Already Exists!" && tree ${cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute}; else ${commands} ; fi`;
|
||||||
return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||||
${cloneBuilderCommands}
|
${cloneBuilderCommands}
|
||||||
|
yarn install --cwd ${builderPath}
|
||||||
echo "log start" >> /home/job-log.txt
|
echo "log start" >> /home/job-log.txt
|
||||||
node ${builderPath} -m remote-cli-pre-build`;
|
yarn run cli --cwd ${builderPath} -m remote-cli-pre-build`;
|
||||||
}
|
}
|
||||||
static BuildCommands(builderPath) {
|
static BuildCommands(builderPath) {
|
||||||
const distFolder = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist');
|
const distFolder = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist');
|
||||||
|
@ -5962,8 +5967,8 @@ node ${builderPath} -m remote-cli-pre-build`;
|
||||||
chmod -R +x "/steps"
|
chmod -R +x "/steps"
|
||||||
echo "game ci start"
|
echo "game ci start"
|
||||||
echo "game ci start" >> /home/job-log.txt
|
echo "game ci start" >> /home/job-log.txt
|
||||||
/entrypoint.sh | node ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt
|
/entrypoint.sh | yarn run cli --cwd ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt
|
||||||
node ${builderPath} -m remote-cli-post-build`;
|
yarn run cli --cwd ${builderPath} -m remote-cli-post-build`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.BuildAutomationWorkflow = BuildAutomationWorkflow;
|
exports.BuildAutomationWorkflow = BuildAutomationWorkflow;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -50,14 +50,18 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
||||||
const buildHooks = CommandHookService.getHooks(CloudRunner.buildParameters.commandHooks).filter((x) =>
|
const buildHooks = CommandHookService.getHooks(CloudRunner.buildParameters.commandHooks).filter((x) =>
|
||||||
x.step?.includes(`build`),
|
x.step?.includes(`build`),
|
||||||
);
|
);
|
||||||
const builderPath = CloudRunnerFolders.ToLinuxFolder(
|
|
||||||
path.join(CloudRunnerFolders.builderPathAbsolute, 'dist', `index.js`),
|
const builderPath = CloudRunnerFolders.ToLinuxFolder(path.join(CloudRunnerFolders.builderPathAbsolute));
|
||||||
);
|
|
||||||
|
// const builderPath = CloudRunnerFolders.ToLinuxFolder(
|
||||||
|
// path.join(CloudRunnerFolders.builderPathAbsolute, 'dist', `index.js`),
|
||||||
|
// );
|
||||||
|
|
||||||
return `echo "cloud runner build workflow starting"
|
return `echo "cloud runner build workflow starting"
|
||||||
apt-get update > /dev/null
|
apt-get update > /dev/null
|
||||||
apt-get install -y curl tar tree npm git-lfs jq git > /dev/null
|
apt-get install -y curl tar tree npm git-lfs jq git > /dev/null
|
||||||
npm i -g n > /dev/null
|
npm i -g n > /dev/null
|
||||||
|
npm install --global yarn > /dev/null
|
||||||
n 16.16.0 > /dev/null
|
n 16.16.0 > /dev/null
|
||||||
npm --version
|
npm --version
|
||||||
node --version
|
node --version
|
||||||
|
@ -88,8 +92,9 @@ export class BuildAutomationWorkflow implements WorkflowInterface {
|
||||||
|
|
||||||
return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||||
${cloneBuilderCommands}
|
${cloneBuilderCommands}
|
||||||
|
yarn install --cwd ${builderPath}
|
||||||
echo "log start" >> /home/job-log.txt
|
echo "log start" >> /home/job-log.txt
|
||||||
node ${builderPath} -m remote-cli-pre-build`;
|
yarn run cli --cwd ${builderPath} -m remote-cli-pre-build`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BuildCommands(builderPath: string) {
|
private static BuildCommands(builderPath: string) {
|
||||||
|
@ -106,7 +111,7 @@ node ${builderPath} -m remote-cli-pre-build`;
|
||||||
chmod -R +x "/steps"
|
chmod -R +x "/steps"
|
||||||
echo "game ci start"
|
echo "game ci start"
|
||||||
echo "game ci start" >> /home/job-log.txt
|
echo "game ci start" >> /home/job-log.txt
|
||||||
/entrypoint.sh | node ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt
|
/entrypoint.sh | yarn run cli --cwd ${builderPath} -m remote-cli-log-stream --logFile /home/job-log.txt
|
||||||
node ${builderPath} -m remote-cli-post-build`;
|
yarn run cli --cwd ${builderPath} -m remote-cli-post-build`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue