From 48ab5b7bdc0b9d34345f48dc970da1777823cb25 Mon Sep 17 00:00:00 2001 From: Jurre Stender Date: Mon, 30 Aug 2021 11:43:51 +0200 Subject: [PATCH] Add some error logging --- src/main.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.ts b/src/main.ts index 764531d..6353e4d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,6 +26,8 @@ export async function run(context: Context): Promise { return // No parameters, nothing to do } + core.info('Starting updater') + core.debug(JSON.stringify(params)) core.setSecret(params.jobToken) @@ -35,6 +37,8 @@ export async function run(context: Context): Promise { const apiClient = new APIClient(client, params) try { + core.info('Fetching job details') + const details = await apiClient.getJobDetails() const credentials = await apiClient.getCredentials() const updater = new Updater( @@ -46,16 +50,23 @@ export async function run(context: Context): Promise { ) try { + core.info('Pulling updater and proxy images') + await ImageService.pull(UPDATER_IMAGE_NAME) await ImageService.pull(PROXY_IMAGE_NAME) } catch (error) { + core.error('Error fetching updater and proxy images') + await failJob(apiClient, error, DependabotErrorType.Image) return } try { + core.info('Starting update process') + await updater.runUpdater() } catch (error) { + core.error('Error performing update') await failJob(apiClient, error, DependabotErrorType.UpdateRun) return }