Move shell scripts into remote-cli
parent
ccfd3cdb2d
commit
44a7c1f5b3
|
|
@ -91,7 +91,8 @@ core.info(`\n`);
|
||||||
core.info(`INPUT:`);
|
core.info(`INPUT:`);
|
||||||
for (const element of properties) {
|
for (const element of properties) {
|
||||||
program.option(`--${element} <${element}>`, 'default description');
|
program.option(`--${element} <${element}>`, 'default description');
|
||||||
core.info(element);
|
if (model_1.Input[element] !== undefined && model_1.Input[element] !== '')
|
||||||
|
core.info(element);
|
||||||
}
|
}
|
||||||
core.info(`\n`);
|
core.info(`\n`);
|
||||||
program.option('-m, --mode <mode>', 'cli or default');
|
program.option('-m, --mode <mode>', 'cli or default');
|
||||||
|
|
@ -650,6 +651,7 @@ const AWS = __importStar(__webpack_require__(71786));
|
||||||
const core = __importStar(__webpack_require__(42186));
|
const core = __importStar(__webpack_require__(42186));
|
||||||
const zlib = __importStar(__webpack_require__(78761));
|
const zlib = __importStar(__webpack_require__(78761));
|
||||||
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
||||||
|
const __1 = __webpack_require__(41359);
|
||||||
class AWSBuildRunner {
|
class AWSBuildRunner {
|
||||||
static runTask(taskDef, ECS, CF, environment, buildGuid, commands) {
|
static runTask(taskDef, ECS, CF, environment, buildGuid, commands) {
|
||||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
||||||
|
|
@ -729,7 +731,7 @@ class AWSBuildRunner {
|
||||||
const stream = yield AWSBuildRunner.getLogStream(kinesis, kinesisStreamName);
|
const stream = yield AWSBuildRunner.getLogStream(kinesis, kinesisStreamName);
|
||||||
let iterator = yield AWSBuildRunner.getLogIterator(kinesis, stream);
|
let iterator = yield AWSBuildRunner.getLogIterator(kinesis, stream);
|
||||||
cloud_runner_logger_1.default.log(`Cloud runner job status is ${(_a = (yield AWSBuildRunner.describeTasks(ECS, clusterName, taskArn))) === null || _a === void 0 ? void 0 : _a.lastStatus}`);
|
cloud_runner_logger_1.default.log(`Cloud runner job status is ${(_a = (yield AWSBuildRunner.describeTasks(ECS, clusterName, taskArn))) === null || _a === void 0 ? void 0 : _a.lastStatus}`);
|
||||||
const logBaseUrl = `https://${AWS.config.region}.console.aws.amazon.com/cloudwatch/home?region=${AWS.config.region}#logsV2:log-groups/log-group/${taskDef.taskDefStackName}`;
|
const logBaseUrl = `https://${__1.Input.region}.console.aws.amazon.com/cloudwatch/home?region=${AWS.config.region}#logsV2:log-groups/log-group/${taskDef.taskDefStackName}`;
|
||||||
cloud_runner_logger_1.default.log(`You can also see the logs at AWS Cloud Watch: ${logBaseUrl}`);
|
cloud_runner_logger_1.default.log(`You can also see the logs at AWS Cloud Watch: ${logBaseUrl}`);
|
||||||
let readingLogs = true;
|
let readingLogs = true;
|
||||||
let timestamp = 0;
|
let timestamp = 0;
|
||||||
|
|
@ -3165,7 +3167,7 @@ class Input {
|
||||||
: false;
|
: false;
|
||||||
}
|
}
|
||||||
static get region() {
|
static get region() {
|
||||||
return Input.getInput('region') || 'no region set';
|
return Input.getInput('region') || 'eu-west-2';
|
||||||
}
|
}
|
||||||
static get githubRepo() {
|
static get githubRepo() {
|
||||||
return Input.getInput('GITHUB_REPOSITORY') || 'game-ci/unity-builder';
|
return Input.getInput('GITHUB_REPOSITORY') || 'game-ci/unity-builder';
|
||||||
|
|
@ -3187,7 +3189,7 @@ class Input {
|
||||||
return Input.getInput('branch');
|
return Input.getInput('branch');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 'main';
|
return 'remote-builder/unified-providers';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static get runNumber() {
|
static get runNumber() {
|
||||||
|
|
@ -3269,7 +3271,7 @@ class Input {
|
||||||
return Input.getInput('cloudRunnerCluster') || '';
|
return Input.getInput('cloudRunnerCluster') || '';
|
||||||
}
|
}
|
||||||
static get awsBaseStackName() {
|
static get awsBaseStackName() {
|
||||||
return Input.getInput('awsBaseStackName') || '';
|
return Input.getInput('awsBaseStackName') || 'game-ci-3-test';
|
||||||
}
|
}
|
||||||
static get kubeConfig() {
|
static get kubeConfig() {
|
||||||
return Input.getInput('kubeConfig') || '';
|
return Input.getInput('kubeConfig') || '';
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -52,7 +52,7 @@ core.info(`\n`);
|
||||||
core.info(`INPUT:`);
|
core.info(`INPUT:`);
|
||||||
for (const element of properties) {
|
for (const element of properties) {
|
||||||
program.option(`--${element} <${element}>`, 'default description');
|
program.option(`--${element} <${element}>`, 'default description');
|
||||||
core.info(element);
|
if (Input[element] !== undefined && Input[element] !== '') core.info(element);
|
||||||
}
|
}
|
||||||
core.info(`\n`);
|
core.info(`\n`);
|
||||||
program.option('-m, --mode <mode>', 'cli or default');
|
program.option('-m, --mode <mode>', 'cli or default');
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import * as core from '@actions/core';
|
||||||
import CloudRunnerTaskDef from '../services/cloud-runner-task-def';
|
import CloudRunnerTaskDef from '../services/cloud-runner-task-def';
|
||||||
import * as zlib from 'zlib';
|
import * as zlib from 'zlib';
|
||||||
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
||||||
|
import { Input } from '../..';
|
||||||
|
|
||||||
class AWSBuildRunner {
|
class AWSBuildRunner {
|
||||||
static async runTask(
|
static async runTask(
|
||||||
|
|
@ -112,7 +113,7 @@ class AWSBuildRunner {
|
||||||
`Cloud runner job status is ${(await AWSBuildRunner.describeTasks(ECS, clusterName, taskArn))?.lastStatus}`,
|
`Cloud runner job status is ${(await AWSBuildRunner.describeTasks(ECS, clusterName, taskArn))?.lastStatus}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
const logBaseUrl = `https://${AWS.config.region}.console.aws.amazon.com/cloudwatch/home?region=${AWS.config.region}#logsV2:log-groups/log-group/${taskDef.taskDefStackName}`;
|
const logBaseUrl = `https://${Input.region}.console.aws.amazon.com/cloudwatch/home?region=${AWS.config.region}#logsV2:log-groups/log-group/${taskDef.taskDefStackName}`;
|
||||||
CloudRunnerLogger.log(`You can also see the logs at AWS Cloud Watch: ${logBaseUrl}`);
|
CloudRunnerLogger.log(`You can also see the logs at AWS Cloud Watch: ${logBaseUrl}`);
|
||||||
let readingLogs = true;
|
let readingLogs = true;
|
||||||
let timestamp: number = 0;
|
let timestamp: number = 0;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class Input {
|
||||||
: false;
|
: false;
|
||||||
}
|
}
|
||||||
static get region(): string {
|
static get region(): string {
|
||||||
return Input.getInput('region') || 'no region set';
|
return Input.getInput('region') || 'eu-west-2';
|
||||||
}
|
}
|
||||||
static get githubRepo(): string {
|
static get githubRepo(): string {
|
||||||
return Input.getInput('GITHUB_REPOSITORY') || 'game-ci/unity-builder';
|
return Input.getInput('GITHUB_REPOSITORY') || 'game-ci/unity-builder';
|
||||||
|
|
@ -39,7 +39,7 @@ class Input {
|
||||||
} else if (Input.getInput('branch')) {
|
} else if (Input.getInput('branch')) {
|
||||||
return Input.getInput('branch');
|
return Input.getInput('branch');
|
||||||
} else {
|
} else {
|
||||||
return 'main';
|
return 'remote-builder/unified-providers';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static get runNumber() {
|
static get runNumber() {
|
||||||
|
|
@ -148,7 +148,7 @@ class Input {
|
||||||
}
|
}
|
||||||
|
|
||||||
static get awsBaseStackName() {
|
static get awsBaseStackName() {
|
||||||
return Input.getInput('awsBaseStackName') || '';
|
return Input.getInput('awsBaseStackName') || 'game-ci-3-test';
|
||||||
}
|
}
|
||||||
|
|
||||||
static get kubeConfig() {
|
static get kubeConfig() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue