cachePull cli
parent
7b3ecc56e3
commit
daf733d898
|
|
@ -582,11 +582,7 @@ class CLI {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
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:
|
|
||||||
${JSON.stringify(buildParameter, undefined, 4)}
|
|
||||||
`);
|
|
||||||
__1.CloudRunner.buildParameters = buildParameter;
|
__1.CloudRunner.buildParameters = buildParameter;
|
||||||
cloud_runner_logger_1.default.log(`${CLI.options['cachePushFrom']} ${CLI.options['cachePushTo']} ${CLI.options['artifactName']}`);
|
|
||||||
yield caching_1.Caching.PushToCache(CLI.options['cachePushTo'], CLI.options['cachePushFrom'], CLI.options['artifactName']);
|
yield caching_1.Caching.PushToCache(CLI.options['cachePushTo'], CLI.options['cachePushFrom'], CLI.options['artifactName']);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|
@ -595,7 +591,16 @@ class CLI {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static cachePull() {
|
static cachePull() {
|
||||||
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 || '{}');
|
||||||
|
__1.CloudRunner.buildParameters = buildParameter;
|
||||||
|
yield caching_1.Caching.PullFromCache(CLI.options['cachePushFrom'], CLI.options['cachePushTo'], CLI.options['artifactName']);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
cloud_runner_logger_1.default.log(`${error}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
static garbageCollectAws() {
|
static garbageCollectAws() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -100,13 +100,7 @@ export class CLI {
|
||||||
static async cachePush() {
|
static async cachePush() {
|
||||||
try {
|
try {
|
||||||
const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');
|
const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');
|
||||||
RemoteClientLogger.log(`Build Params:
|
|
||||||
${JSON.stringify(buildParameter, undefined, 4)}
|
|
||||||
`);
|
|
||||||
CloudRunner.buildParameters = buildParameter;
|
CloudRunner.buildParameters = buildParameter;
|
||||||
CloudRunnerLogger.log(
|
|
||||||
`${CLI.options['cachePushFrom']} ${CLI.options['cachePushTo']} ${CLI.options['artifactName']}`,
|
|
||||||
);
|
|
||||||
await Caching.PushToCache(CLI.options['cachePushTo'], CLI.options['cachePushFrom'], CLI.options['artifactName']);
|
await Caching.PushToCache(CLI.options['cachePushTo'], CLI.options['cachePushFrom'], CLI.options['artifactName']);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
CloudRunnerLogger.log(`${error}`);
|
CloudRunnerLogger.log(`${error}`);
|
||||||
|
|
@ -114,7 +108,19 @@ export class CLI {
|
||||||
}
|
}
|
||||||
|
|
||||||
@CliFunction(`cache-pull`, `pull from cache`)
|
@CliFunction(`cache-pull`, `pull from cache`)
|
||||||
static async cachePull() {}
|
static async cachePull() {
|
||||||
|
try {
|
||||||
|
const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');
|
||||||
|
CloudRunner.buildParameters = buildParameter;
|
||||||
|
await Caching.PullFromCache(
|
||||||
|
CLI.options['cachePushFrom'],
|
||||||
|
CLI.options['cachePushTo'],
|
||||||
|
CLI.options['artifactName'],
|
||||||
|
);
|
||||||
|
} catch (error: any) {
|
||||||
|
CloudRunnerLogger.log(`${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@CliFunction(`garbage-collect-aws`, `garbage collect aws`)
|
@CliFunction(`garbage-collect-aws`, `garbage collect aws`)
|
||||||
static async garbageCollectAws() {
|
static async garbageCollectAws() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue