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

19
dist/index.js vendored
View File

@ -580,13 +580,18 @@ class CLI {
} }
static cachePush() { static cachePush() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}'); try {
remote_client_logger_1.RemoteClientLogger.log(`Build Params: const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');
${JSON.stringify(buildParameter, undefined, 4)} remote_client_logger_1.RemoteClientLogger.log(`Build Params:
`); ${JSON.stringify(buildParameter, undefined, 4)}
__1.CloudRunner.buildParameters = buildParameter; `);
cloud_runner_logger_1.default.log(`${CLI.options['cachePushFrom']} ${CLI.options['cachePushTo']} ${CLI.options['artifactName']}`); __1.CloudRunner.buildParameters = buildParameter;
yield caching_1.Caching.PushToCache(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']);
}
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,15 +98,19 @@ export class CLI {
@CliFunction(`cache-push`, `push to cache`) @CliFunction(`cache-push`, `push to cache`)
static async cachePush() { static async cachePush() {
const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}'); try {
RemoteClientLogger.log(`Build Params: const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');
${JSON.stringify(buildParameter, undefined, 4)} RemoteClientLogger.log(`Build Params:
`); ${JSON.stringify(buildParameter, undefined, 4)}
CloudRunner.buildParameters = buildParameter; `);
CloudRunnerLogger.log( CloudRunner.buildParameters = buildParameter;
`${CLI.options['cachePushFrom']} ${CLI.options['cachePushTo']} ${CLI.options['artifactName']}`, CloudRunnerLogger.log(
); `${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`)