From d953c709a500241c20881c044078d4d0ae247124 Mon Sep 17 00:00:00 2001 From: Jyotsna Date: Mon, 23 Nov 2020 14:50:29 +0530 Subject: [PATCH] JSON structure fixes --- lib/constants.js | 6 +++--- src/constants.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/constants.js b/lib/constants.js index adbf124f..f2ac7369 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -38,9 +38,9 @@ function getWorkflowAnnotationsJson(lastSuccessRunSha, workflowFilePath, filePat + `'lastSuccessRunCommit': '${lastSuccessRunSha}',` + `'branch': '${process.env.GITHUB_REF}',` + `'deployTimestamp': '${Date.now()}',` - + `'dockerfilePaths': '${filePathConfigs.dockerfilePaths}',` - + `'manifestsPaths': '${filePathConfigs.manifestFilePaths}',` - + `'helmChartPaths': '${filePathConfigs.helmChartPaths}',` + + `'dockerfilePaths': '${JSON.stringify(filePathConfigs.dockerfilePaths)}',` + + `'manifestsPaths': '${JSON.stringify(filePathConfigs.manifestFilePaths)}',` + + `'helmChartPaths': '${JSON.stringify(filePathConfigs.helmChartFilePaths)}',` + `'provider': 'GitHub'` + `}`; } diff --git a/src/constants.ts b/src/constants.ts index 505b371e..d215fd3a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -38,9 +38,9 @@ export function getWorkflowAnnotationsJson(lastSuccessRunSha: string, workflowFi + `'lastSuccessRunCommit': '${lastSuccessRunSha}',` + `'branch': '${process.env.GITHUB_REF}',` + `'deployTimestamp': '${Date.now()}',` - + `'dockerfilePaths': '${filePathConfigs.dockerfilePaths}',` - + `'manifestsPaths': '${filePathConfigs.manifestFilePaths}',` - + `'helmChartPaths': '${filePathConfigs.helmChartPaths}',` + + `'dockerfilePaths': '${JSON.stringify(filePathConfigs.dockerfilePaths)}',` + + `'manifestsPaths': '${JSON.stringify(filePathConfigs.manifestFilePaths)}',` + + `'helmChartPaths': '${JSON.stringify(filePathConfigs.helmChartFilePaths)}',` + `'provider': 'GitHub'` + `}`; }