local-system is now used for cloud runner test implementation AND correctly unset test CLI input

pull/353/head
Frostebite 2022-04-06 21:07:31 +01:00
parent 096443b669
commit e2241e9985
3 changed files with 26 additions and 17 deletions

5
dist/index.js vendored
View File

@ -580,6 +580,7 @@ class CLI {
} }
static cachePush() { static cachePush() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try {
const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}'); const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');
remote_client_logger_1.RemoteClientLogger.log(`Build Params: remote_client_logger_1.RemoteClientLogger.log(`Build Params:
${JSON.stringify(buildParameter, undefined, 4)} ${JSON.stringify(buildParameter, undefined, 4)}
@ -587,6 +588,10 @@ class CLI {
__1.CloudRunner.buildParameters = buildParameter; __1.CloudRunner.buildParameters = buildParameter;
cloud_runner_logger_1.default.log(`${CLI.options['cachePushFrom']} ${CLI.options['cachePushTo']} ${CLI.options['artifactName']}`); cloud_runner_logger_1.default.log(`${CLI.options['cachePushFrom']} ${CLI.options['cachePushTo']} ${CLI.options['artifactName']}`);
yield caching_1.Caching.PushToCache(CLI.options['cachePushFrom'], CLI.options['cachePushTo'], CLI.options['artifactName']); yield caching_1.Caching.PushToCache(CLI.options['cachePushFrom'], CLI.options['cachePushTo'], CLI.options['artifactName']);
}
catch (error) {
cloud_runner_logger_1.default.log(`${error}`);
}
}); });
} }
static cachePull() { static cachePull() {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -98,6 +98,7 @@ export class CLI {
@CliFunction(`cache-push`, `push to cache`) @CliFunction(`cache-push`, `push to cache`)
static async cachePush() { static async cachePush() {
try {
const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}'); const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');
RemoteClientLogger.log(`Build Params: RemoteClientLogger.log(`Build Params:
${JSON.stringify(buildParameter, undefined, 4)} ${JSON.stringify(buildParameter, undefined, 4)}
@ -107,6 +108,9 @@ export class CLI {
`${CLI.options['cachePushFrom']} ${CLI.options['cachePushTo']} ${CLI.options['artifactName']}`, `${CLI.options['cachePushFrom']} ${CLI.options['cachePushTo']} ${CLI.options['artifactName']}`,
); );
await Caching.PushToCache(CLI.options['cachePushFrom'], CLI.options['cachePushTo'], CLI.options['artifactName']); await Caching.PushToCache(CLI.options['cachePushFrom'], CLI.options['cachePushTo'], CLI.options['artifactName']);
} catch (error: any) {
CloudRunnerLogger.log(`${error}`);
}
} }
@CliFunction(`cache-pull`, `pull from cache`) @CliFunction(`cache-pull`, `pull from cache`)