AWS integration test pipeline
parent
cb3e768054
commit
f6a73f1dca
|
|
@ -57,4 +57,10 @@ jobs:
|
|||
AWS_DEFAULT_REGION: eu-west-2
|
||||
CloudRunnerBranch: remote-builder/unified-providers
|
||||
DEBUG: true
|
||||
INCLUDE_CLOUD_RUNNER_TEST: true
|
||||
remoteBuilderIntegrationTests: true
|
||||
cloudRunnerCluster: aws
|
||||
projectPath: ${{ matrix.projectPath }}
|
||||
unityVersion: ${{ matrix.unityVersion }}
|
||||
targetPlatform: ${{ matrix.targetPlatform }}
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
awsBaseStackName: game-ci-stack
|
||||
|
|
|
|||
|
|
@ -280,6 +280,7 @@ class BuildParameters {
|
|||
runNumber: input_1.default.runNumber,
|
||||
branch: input_1.default.branch,
|
||||
githubRepo: input_1.default.githubRepo,
|
||||
logToFile: false,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
@ -648,6 +649,8 @@ const core = __importStar(__webpack_require__(42186));
|
|||
const zlib = __importStar(__webpack_require__(78761));
|
||||
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
||||
const __1 = __webpack_require__(41359);
|
||||
const fs_1 = __importDefault(__webpack_require__(35747));
|
||||
const cloud_runner_state_1 = __webpack_require__(70912);
|
||||
class AWSBuildRunner {
|
||||
static runTask(taskDef, ECS, CF, environment, buildGuid, commands) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
||||
|
|
@ -779,6 +782,9 @@ class AWSBuildRunner {
|
|||
else if (message.includes('Rebuilding Library because the asset database could not be found!')) {
|
||||
core.warning('LIBRARY NOT FOUND!');
|
||||
}
|
||||
if (cloud_runner_state_1.CloudRunnerState.buildParams.logToFile) {
|
||||
fs_1.default.appendFileSync(`${cloud_runner_state_1.CloudRunnerState.buildGuid}-outputfile.txt`, `${message}\r\n`);
|
||||
}
|
||||
cloud_runner_logger_1.default.log(message);
|
||||
}
|
||||
}
|
||||
|
|
@ -3146,6 +3152,9 @@ const core = __webpack_require__(42186);
|
|||
* Note that input is always passed as a string, even booleans.
|
||||
*/
|
||||
class Input {
|
||||
static get remoteBuilderIntegrationTests() {
|
||||
return Input.getInput(`remoteBuilderIntegrationTests`);
|
||||
}
|
||||
static getInput(query) {
|
||||
return Input.githubEnabled
|
||||
? core.getInput(query)
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -39,6 +39,7 @@ class BuildParameters {
|
|||
public runNumber;
|
||||
public branch;
|
||||
public githubRepo;
|
||||
public logToFile;
|
||||
|
||||
static async create(): Promise<BuildParameters> {
|
||||
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
|
||||
|
|
@ -83,6 +84,7 @@ class BuildParameters {
|
|||
runNumber: Input.runNumber,
|
||||
branch: Input.branch,
|
||||
githubRepo: Input.githubRepo,
|
||||
logToFile: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import CloudRunnerTaskDef from '../services/cloud-runner-task-def';
|
|||
import * as zlib from 'zlib';
|
||||
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
||||
import { Input } from '../..';
|
||||
import fs from 'fs';
|
||||
import { CloudRunnerState } from '../state/cloud-runner-state';
|
||||
|
||||
class AWSBuildRunner {
|
||||
static async runTask(
|
||||
|
|
@ -176,6 +178,9 @@ class AWSBuildRunner {
|
|||
} else if (message.includes('Rebuilding Library because the asset database could not be found!')) {
|
||||
core.warning('LIBRARY NOT FOUND!');
|
||||
}
|
||||
if (CloudRunnerState.buildParams.logToFile) {
|
||||
fs.appendFileSync(`${CloudRunnerState.buildGuid}-outputfile.txt`, `${message}\r\n`);
|
||||
}
|
||||
CloudRunnerLogger.log(message);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,7 @@ import Input from '../input';
|
|||
describe('Cloud Runner', () => {
|
||||
it('responds', () => {});
|
||||
});
|
||||
if (process.env.INCLUDE_CLOUD_RUNNER_TEST !== undefined) {
|
||||
describe('Cloud Runner', () => {
|
||||
it('builds', async () => {
|
||||
await runTestBuild();
|
||||
}, 500000);
|
||||
});
|
||||
}
|
||||
|
||||
async function runTestBuild() {
|
||||
Input.cliOptions = {
|
||||
versioning: 'None',
|
||||
projectPath: 'test-project',
|
||||
|
|
@ -27,8 +19,12 @@ async function runTestBuild() {
|
|||
`,
|
||||
};
|
||||
Input.githubEnabled = false;
|
||||
it('builds', async () => {
|
||||
if (Input.remoteBuilderIntegrationTests) {
|
||||
const buildParameter = await BuildParameters.create();
|
||||
buildParameter.logToFile = true;
|
||||
const baseImage = new ImageTag(buildParameter);
|
||||
|
||||
await CloudRunner.run(buildParameter, baseImage.toString());
|
||||
}
|
||||
}, 500000);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ const core = require('@actions/core');
|
|||
class Input {
|
||||
public static githubEnabled = true;
|
||||
public static cliOptions;
|
||||
static get remoteBuilderIntegrationTests(): boolean {
|
||||
return Input.getInput(`remoteBuilderIntegrationTests`);
|
||||
}
|
||||
private static getInput(query) {
|
||||
return Input.githubEnabled
|
||||
? core.getInput(query)
|
||||
|
|
|
|||
Loading…
Reference in New Issue