fix
parent
78945915b9
commit
7376cfa225
|
|
@ -78,6 +78,7 @@ jobs:
|
||||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
awsBaseStackName: game-ci-stack-integration-tests
|
awsBaseStackName: game-ci-stack-integration-tests
|
||||||
CloudRunnerBranch: remote-builder/unified-providers
|
CloudRunnerBranch: remote-builder/unified-providers
|
||||||
|
cloudRunnerTests: true
|
||||||
postBuildSteps: |
|
postBuildSteps: |
|
||||||
name: upload
|
name: upload
|
||||||
image: amazon/aws-cli
|
image: amazon/aws-cli
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ jobs:
|
||||||
projectPath: test-project
|
projectPath: test-project
|
||||||
unityVersion: 2019.3.15f1
|
unityVersion: 2019.3.15f1
|
||||||
versioning: None
|
versioning: None
|
||||||
|
cloudRunnerTests: true
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# Upload #
|
# Upload #
|
||||||
|
|
|
||||||
|
|
@ -463,6 +463,7 @@ exports.Caching = void 0;
|
||||||
const console_1 = __webpack_require__(57082);
|
const console_1 = __webpack_require__(57082);
|
||||||
const fs_1 = __importDefault(__webpack_require__(35747));
|
const fs_1 = __importDefault(__webpack_require__(35747));
|
||||||
const path_1 = __importDefault(__webpack_require__(85622));
|
const path_1 = __importDefault(__webpack_require__(85622));
|
||||||
|
const __1 = __webpack_require__(41359);
|
||||||
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
||||||
const cloud_runner_state_1 = __webpack_require__(70912);
|
const cloud_runner_state_1 = __webpack_require__(70912);
|
||||||
const cloud_runner_agent_system_1 = __webpack_require__(87685);
|
const cloud_runner_agent_system_1 = __webpack_require__(87685);
|
||||||
|
|
@ -500,7 +501,9 @@ class Caching {
|
||||||
cacheSelection = latest;
|
cacheSelection = latest;
|
||||||
}
|
}
|
||||||
if (fs_1.default.existsSync(cacheSelection)) {
|
if (fs_1.default.existsSync(cacheSelection)) {
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
|
if (__1.Input.cloudRunnerTests) {
|
||||||
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
|
||||||
|
}
|
||||||
cloud_runner_logger_1.default.logCli(`cache item exists`);
|
cloud_runner_logger_1.default.logCli(`cache item exists`);
|
||||||
console_1.assert(fs_1.default.existsSync(destinationFolder));
|
console_1.assert(fs_1.default.existsSync(destinationFolder));
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
|
||||||
|
|
@ -727,6 +730,7 @@ const caching_1 = __webpack_require__(35010);
|
||||||
const lfs_hashing_1 = __webpack_require__(47011);
|
const lfs_hashing_1 = __webpack_require__(47011);
|
||||||
const cloud_runner_agent_system_1 = __webpack_require__(87685);
|
const cloud_runner_agent_system_1 = __webpack_require__(87685);
|
||||||
const path_1 = __importDefault(__webpack_require__(85622));
|
const path_1 = __importDefault(__webpack_require__(85622));
|
||||||
|
const __1 = __webpack_require__(41359);
|
||||||
class SetupCloudRunnerRepository {
|
class SetupCloudRunnerRepository {
|
||||||
static run() {
|
static run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
|
@ -735,20 +739,30 @@ class SetupCloudRunnerRepository {
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.repoPathFull}`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`mkdir -p ${cloud_runner_state_1.CloudRunnerState.repoPathFull}`);
|
||||||
yield SetupCloudRunnerRepository.cloneRepoWithoutLFSFiles();
|
yield SetupCloudRunnerRepository.cloneRepoWithoutLFSFiles();
|
||||||
SetupCloudRunnerRepository.LFS_ASSETS_HASH = yield lfs_hashing_1.LFSHashing.createLFSHashFiles();
|
SetupCloudRunnerRepository.LFS_ASSETS_HASH = yield lfs_hashing_1.LFSHashing.createLFSHashFiles();
|
||||||
cloud_runner_logger_1.default.logCli(SetupCloudRunnerRepository.LFS_ASSETS_HASH);
|
if (__1.Input.cloudRunnerTests) {
|
||||||
|
cloud_runner_logger_1.default.logCli(SetupCloudRunnerRepository.LFS_ASSETS_HASH);
|
||||||
|
}
|
||||||
yield lfs_hashing_1.LFSHashing.printLFSHashState();
|
yield lfs_hashing_1.LFSHashing.printLFSHashState();
|
||||||
cloud_runner_logger_1.default.logCli(`Library Caching`);
|
cloud_runner_logger_1.default.logCli(`Library Caching`);
|
||||||
console_1.assert(!fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.libraryFolderFull), `!Warning!: The Unity library was included in the git repository`);
|
console_1.assert(!fs_1.default.existsSync(cloud_runner_state_1.CloudRunnerState.libraryFolderFull), `!Warning!: The Unity library was included in the git repository`);
|
||||||
cloud_runner_logger_1.default.logCli(`LFS Caching`);
|
cloud_runner_logger_1.default.logCli(`LFS Caching`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.lfsDirectory, '..')}`);
|
if (__1.Input.cloudRunnerTests) {
|
||||||
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.lfsDirectory, '..')}`);
|
||||||
|
}
|
||||||
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.lfsDirectory, `${SetupCloudRunnerRepository.LFS_ASSETS_HASH}.zip`);
|
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.lfsDirectory, `${SetupCloudRunnerRepository.LFS_ASSETS_HASH}.zip`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.lfsDirectory, '..')}`);
|
if (__1.Input.cloudRunnerTests) {
|
||||||
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.lfsDirectory, '..')}`);
|
||||||
|
}
|
||||||
yield caching_1.Caching.printCacheState(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.libraryCacheFolder);
|
yield caching_1.Caching.printCacheState(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.libraryCacheFolder);
|
||||||
yield SetupCloudRunnerRepository.pullLatestLFS();
|
yield SetupCloudRunnerRepository.pullLatestLFS();
|
||||||
yield caching_1.Caching.PushToCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.lfsDirectory, SetupCloudRunnerRepository.LFS_ASSETS_HASH);
|
yield caching_1.Caching.PushToCache(cloud_runner_state_1.CloudRunnerState.lfsCacheFolder, cloud_runner_state_1.CloudRunnerState.lfsDirectory, SetupCloudRunnerRepository.LFS_ASSETS_HASH);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.libraryCacheFolder, '..')}`);
|
if (__1.Input.cloudRunnerTests) {
|
||||||
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.libraryCacheFolder, '..')}`);
|
||||||
|
}
|
||||||
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.libraryCacheFolder, cloud_runner_state_1.CloudRunnerState.libraryFolderFull);
|
yield caching_1.Caching.PullFromCache(cloud_runner_state_1.CloudRunnerState.libraryCacheFolder, cloud_runner_state_1.CloudRunnerState.libraryFolderFull);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.libraryCacheFolder, '..')}`);
|
if (__1.Input.cloudRunnerTests) {
|
||||||
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree ${path_1.default.join(cloud_runner_state_1.CloudRunnerState.libraryCacheFolder, '..')}`);
|
||||||
|
}
|
||||||
caching_1.Caching.handleCachePurging();
|
caching_1.Caching.handleCachePurging();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
@ -765,8 +779,10 @@ class SetupCloudRunnerRepository {
|
||||||
cloud_runner_logger_1.default.logCli(`Cloning the repository being built:`);
|
cloud_runner_logger_1.default.logCli(`Cloning the repository being built:`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git lfs install --skip-smudge`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git lfs install --skip-smudge`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git clone ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${cloud_runner_state_1.CloudRunnerState.repoPathFull}`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git clone ${cloud_runner_state_1.CloudRunnerState.targetBuildRepoUrl} ${cloud_runner_state_1.CloudRunnerState.repoPathFull}`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`ls -lh`);
|
if (__1.Input.cloudRunnerTests) {
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`ls -lh`);
|
||||||
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`tree`);
|
||||||
|
}
|
||||||
cloud_runner_logger_1.default.logCli(`${cloud_runner_state_1.CloudRunnerState.buildParams.branch}`);
|
cloud_runner_logger_1.default.logCli(`${cloud_runner_state_1.CloudRunnerState.buildParams.branch}`);
|
||||||
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.branch}`);
|
yield cloud_runner_agent_system_1.CloudRunnerAgentSystem.Run(`git checkout ${cloud_runner_state_1.CloudRunnerState.buildParams.branch}`);
|
||||||
cloud_runner_logger_1.default.logCli(`Checked out ${process.env.GITHUB_SHA}`);
|
cloud_runner_logger_1.default.logCli(`Checked out ${process.env.GITHUB_SHA}`);
|
||||||
|
|
@ -969,14 +985,17 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.AWSError = void 0;
|
exports.AWSError = void 0;
|
||||||
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
const cloud_runner_logger_1 = __importDefault(__webpack_require__(22855));
|
||||||
const core = __importStar(__webpack_require__(42186));
|
const core = __importStar(__webpack_require__(42186));
|
||||||
|
const __1 = __webpack_require__(41359);
|
||||||
class AWSError {
|
class AWSError {
|
||||||
static handleStackCreationFailure(error, CF, taskDefStackName) {
|
static handleStackCreationFailure(error, CF, taskDefStackName) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
cloud_runner_logger_1.default.log('aws error: ');
|
cloud_runner_logger_1.default.log('aws error: ');
|
||||||
core.error(JSON.stringify(error, undefined, 4));
|
core.error(JSON.stringify(error, undefined, 4));
|
||||||
cloud_runner_logger_1.default.log('Getting events and resources for task stack');
|
if (__1.Input.cloudRunnerTests) {
|
||||||
const events = (yield CF.describeStackEvents({ StackName: taskDefStackName }).promise()).StackEvents;
|
cloud_runner_logger_1.default.log('Getting events and resources for task stack');
|
||||||
cloud_runner_logger_1.default.log(JSON.stringify(events, undefined, 4));
|
const events = (yield CF.describeStackEvents({ StackName: taskDefStackName }).promise()).StackEvents;
|
||||||
|
cloud_runner_logger_1.default.log(JSON.stringify(events, undefined, 4));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2410,16 +2429,17 @@ exports.default = KubernetesTaskRunner;
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 71899:
|
/***/ 71899:
|
||||||
/***/ ((__unused_webpack_module, exports) => {
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.CloudRunnerBuildCommandProcessor = void 0;
|
exports.CloudRunnerBuildCommandProcessor = void 0;
|
||||||
|
const __1 = __webpack_require__(41359);
|
||||||
class CloudRunnerBuildCommandProcessor {
|
class CloudRunnerBuildCommandProcessor {
|
||||||
static ProcessCommands(commands, buildParameters) {
|
static ProcessCommands(commands, buildParameters) {
|
||||||
return `echo "---"
|
return `echo "---"
|
||||||
printenv
|
${__1.Input.cloudRunnerTests ? '' : '#'} printenv
|
||||||
echo "start"
|
echo "start"
|
||||||
${commands}
|
${commands}
|
||||||
echo "end---${buildParameters.logId}"
|
echo "end---${buildParameters.logId}"
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -13,12 +13,12 @@
|
||||||
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"cli": "yarn ts-node src/index.ts -m cli",
|
"cli": "yarn ts-node src/index.ts -m cli",
|
||||||
"cli-aws": "cross-env cloudRunnerCluster=aws yarn ts-node src/index.ts -m cli",
|
"cli-aws": "cross-env cloudRunnerCluster=aws yarn run test-cli",
|
||||||
"cli-k8s": "cross-env cloudRunnerCluster=k8s yarn ts-node src/index.ts -m cli",
|
"cli-k8s": "cross-env cloudRunnerCluster=k8s yarn run test-cli",
|
||||||
"test-cli": "yarn ts-node src/index.ts -m cli --projectPath test-project",
|
"test-cli": "cross-env cloudRunnerTests=true yarn ts-node src/index.ts -m cli --projectPath test-project",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test-i": "yarn run test-i-aws && yarn run test-i-k8s",
|
"test-i": "yarn run test-i-aws && yarn run test-i-k8s",
|
||||||
"test-i-f": "yarn run test-i-aws && yarn run test-i-k8s && yarn run cli-k8s --projectPath test-project && yarn run cli-aws --projectPath test-project",
|
"test-i-f": "yarn run test-i-aws && yarn run test-i-k8s && yarn run cli-k8s && yarn run cli-aws",
|
||||||
"test-i-aws": "cross-env cloudRunnerTests=true cloudRunnerCluster=aws yarn test -i",
|
"test-i-aws": "cross-env cloudRunnerTests=true cloudRunnerCluster=aws yarn test -i",
|
||||||
"test-i-k8s": "cross-env cloudRunnerTests=true cloudRunnerCluster=k8s yarn test -i"
|
"test-i-k8s": "cross-env cloudRunnerTests=true cloudRunnerCluster=k8s yarn test -i"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { assert } from 'console';
|
import { assert } from 'console';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import { Input } from '../..';
|
||||||
import CloudRunnerLogger from '../../cloud-runner/services/cloud-runner-logger';
|
import CloudRunnerLogger from '../../cloud-runner/services/cloud-runner-logger';
|
||||||
import { CloudRunnerState } from '../../cloud-runner/state/cloud-runner-state';
|
import { CloudRunnerState } from '../../cloud-runner/state/cloud-runner-state';
|
||||||
import { CloudRunnerAgentSystem } from './cloud-runner-agent-system';
|
import { CloudRunnerAgentSystem } from './cloud-runner-agent-system';
|
||||||
|
|
@ -41,7 +42,9 @@ export class Caching {
|
||||||
cacheSelection = latest;
|
cacheSelection = latest;
|
||||||
}
|
}
|
||||||
if (fs.existsSync(cacheSelection)) {
|
if (fs.existsSync(cacheSelection)) {
|
||||||
await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
|
if (Input.cloudRunnerTests) {
|
||||||
|
await CloudRunnerAgentSystem.Run(`tree ${destinationFolder}`);
|
||||||
|
}
|
||||||
CloudRunnerLogger.logCli(`cache item exists`);
|
CloudRunnerLogger.logCli(`cache item exists`);
|
||||||
assert(fs.existsSync(destinationFolder));
|
assert(fs.existsSync(destinationFolder));
|
||||||
await CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
|
await CloudRunnerAgentSystem.Run(`unzip "${cacheSelection}" -d "${destinationFolder}/.."`);
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { Caching } from './caching';
|
||||||
import { LFSHashing } from './lfs-hashing';
|
import { LFSHashing } from './lfs-hashing';
|
||||||
import { CloudRunnerAgentSystem } from './cloud-runner-agent-system';
|
import { CloudRunnerAgentSystem } from './cloud-runner-agent-system';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import { Input } from '../..';
|
||||||
|
|
||||||
export class SetupCloudRunnerRepository {
|
export class SetupCloudRunnerRepository {
|
||||||
static LFS_ASSETS_HASH;
|
static LFS_ASSETS_HASH;
|
||||||
|
|
@ -16,7 +17,10 @@ export class SetupCloudRunnerRepository {
|
||||||
await SetupCloudRunnerRepository.cloneRepoWithoutLFSFiles();
|
await SetupCloudRunnerRepository.cloneRepoWithoutLFSFiles();
|
||||||
|
|
||||||
SetupCloudRunnerRepository.LFS_ASSETS_HASH = await LFSHashing.createLFSHashFiles();
|
SetupCloudRunnerRepository.LFS_ASSETS_HASH = await LFSHashing.createLFSHashFiles();
|
||||||
CloudRunnerLogger.logCli(SetupCloudRunnerRepository.LFS_ASSETS_HASH);
|
|
||||||
|
if (Input.cloudRunnerTests) {
|
||||||
|
CloudRunnerLogger.logCli(SetupCloudRunnerRepository.LFS_ASSETS_HASH);
|
||||||
|
}
|
||||||
await LFSHashing.printLFSHashState();
|
await LFSHashing.printLFSHashState();
|
||||||
CloudRunnerLogger.logCli(`Library Caching`);
|
CloudRunnerLogger.logCli(`Library Caching`);
|
||||||
assert(
|
assert(
|
||||||
|
|
@ -24,13 +28,18 @@ export class SetupCloudRunnerRepository {
|
||||||
`!Warning!: The Unity library was included in the git repository`,
|
`!Warning!: The Unity library was included in the git repository`,
|
||||||
);
|
);
|
||||||
CloudRunnerLogger.logCli(`LFS Caching`);
|
CloudRunnerLogger.logCli(`LFS Caching`);
|
||||||
await CloudRunnerAgentSystem.Run(`tree ${path.join(CloudRunnerState.lfsDirectory, '..')}`);
|
|
||||||
|
if (Input.cloudRunnerTests) {
|
||||||
|
await CloudRunnerAgentSystem.Run(`tree ${path.join(CloudRunnerState.lfsDirectory, '..')}`);
|
||||||
|
}
|
||||||
await Caching.PullFromCache(
|
await Caching.PullFromCache(
|
||||||
CloudRunnerState.lfsCacheFolder,
|
CloudRunnerState.lfsCacheFolder,
|
||||||
CloudRunnerState.lfsDirectory,
|
CloudRunnerState.lfsDirectory,
|
||||||
`${SetupCloudRunnerRepository.LFS_ASSETS_HASH}.zip`,
|
`${SetupCloudRunnerRepository.LFS_ASSETS_HASH}.zip`,
|
||||||
);
|
);
|
||||||
await CloudRunnerAgentSystem.Run(`tree ${path.join(CloudRunnerState.lfsDirectory, '..')}`);
|
if (Input.cloudRunnerTests) {
|
||||||
|
await CloudRunnerAgentSystem.Run(`tree ${path.join(CloudRunnerState.lfsDirectory, '..')}`);
|
||||||
|
}
|
||||||
await Caching.printCacheState(CloudRunnerState.lfsCacheFolder, CloudRunnerState.libraryCacheFolder);
|
await Caching.printCacheState(CloudRunnerState.lfsCacheFolder, CloudRunnerState.libraryCacheFolder);
|
||||||
await SetupCloudRunnerRepository.pullLatestLFS();
|
await SetupCloudRunnerRepository.pullLatestLFS();
|
||||||
await Caching.PushToCache(
|
await Caching.PushToCache(
|
||||||
|
|
@ -38,9 +47,15 @@ export class SetupCloudRunnerRepository {
|
||||||
CloudRunnerState.lfsDirectory,
|
CloudRunnerState.lfsDirectory,
|
||||||
SetupCloudRunnerRepository.LFS_ASSETS_HASH,
|
SetupCloudRunnerRepository.LFS_ASSETS_HASH,
|
||||||
);
|
);
|
||||||
await CloudRunnerAgentSystem.Run(`tree ${path.join(CloudRunnerState.libraryCacheFolder, '..')}`);
|
|
||||||
|
if (Input.cloudRunnerTests) {
|
||||||
|
await CloudRunnerAgentSystem.Run(`tree ${path.join(CloudRunnerState.libraryCacheFolder, '..')}`);
|
||||||
|
}
|
||||||
await Caching.PullFromCache(CloudRunnerState.libraryCacheFolder, CloudRunnerState.libraryFolderFull);
|
await Caching.PullFromCache(CloudRunnerState.libraryCacheFolder, CloudRunnerState.libraryFolderFull);
|
||||||
await CloudRunnerAgentSystem.Run(`tree ${path.join(CloudRunnerState.libraryCacheFolder, '..')}`);
|
|
||||||
|
if (Input.cloudRunnerTests) {
|
||||||
|
await CloudRunnerAgentSystem.Run(`tree ${path.join(CloudRunnerState.libraryCacheFolder, '..')}`);
|
||||||
|
}
|
||||||
|
|
||||||
Caching.handleCachePurging();
|
Caching.handleCachePurging();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
@ -58,8 +73,10 @@ export class SetupCloudRunnerRepository {
|
||||||
await CloudRunnerAgentSystem.Run(
|
await CloudRunnerAgentSystem.Run(
|
||||||
`git clone ${CloudRunnerState.targetBuildRepoUrl} ${CloudRunnerState.repoPathFull}`,
|
`git clone ${CloudRunnerState.targetBuildRepoUrl} ${CloudRunnerState.repoPathFull}`,
|
||||||
);
|
);
|
||||||
await CloudRunnerAgentSystem.Run(`ls -lh`);
|
if (Input.cloudRunnerTests) {
|
||||||
await CloudRunnerAgentSystem.Run(`tree`);
|
await CloudRunnerAgentSystem.Run(`ls -lh`);
|
||||||
|
await CloudRunnerAgentSystem.Run(`tree`);
|
||||||
|
}
|
||||||
CloudRunnerLogger.logCli(`${CloudRunnerState.buildParams.branch}`);
|
CloudRunnerLogger.logCli(`${CloudRunnerState.buildParams.branch}`);
|
||||||
await CloudRunnerAgentSystem.Run(`git checkout ${CloudRunnerState.buildParams.branch}`);
|
await CloudRunnerAgentSystem.Run(`git checkout ${CloudRunnerState.buildParams.branch}`);
|
||||||
CloudRunnerLogger.logCli(`Checked out ${process.env.GITHUB_SHA}`);
|
CloudRunnerLogger.logCli(`Checked out ${process.env.GITHUB_SHA}`);
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
||||||
import * as SDK from 'aws-sdk';
|
import * as SDK from 'aws-sdk';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
import { Input } from '../..';
|
||||||
|
|
||||||
export class AWSError {
|
export class AWSError {
|
||||||
static async handleStackCreationFailure(error: any, CF: SDK.CloudFormation, taskDefStackName: string) {
|
static async handleStackCreationFailure(error: any, CF: SDK.CloudFormation, taskDefStackName: string) {
|
||||||
CloudRunnerLogger.log('aws error: ');
|
CloudRunnerLogger.log('aws error: ');
|
||||||
core.error(JSON.stringify(error, undefined, 4));
|
core.error(JSON.stringify(error, undefined, 4));
|
||||||
CloudRunnerLogger.log('Getting events and resources for task stack');
|
if (Input.cloudRunnerTests) {
|
||||||
const events = (await CF.describeStackEvents({ StackName: taskDefStackName }).promise()).StackEvents;
|
CloudRunnerLogger.log('Getting events and resources for task stack');
|
||||||
CloudRunnerLogger.log(JSON.stringify(events, undefined, 4));
|
const events = (await CF.describeStackEvents({ StackName: taskDefStackName }).promise()).StackEvents;
|
||||||
|
CloudRunnerLogger.log(JSON.stringify(events, undefined, 4));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { BuildParameters } from '../..';
|
import { BuildParameters, Input } from '../..';
|
||||||
|
|
||||||
export class CloudRunnerBuildCommandProcessor {
|
export class CloudRunnerBuildCommandProcessor {
|
||||||
public static ProcessCommands(commands: string, buildParameters: BuildParameters): string {
|
public static ProcessCommands(commands: string, buildParameters: BuildParameters): string {
|
||||||
return `echo "---"
|
return `echo "---"
|
||||||
printenv
|
${Input.cloudRunnerTests ? '' : '#'} printenv
|
||||||
echo "start"
|
echo "start"
|
||||||
${commands}
|
${commands}
|
||||||
echo "end---${buildParameters.logId}"
|
echo "end---${buildParameters.logId}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue