mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-11 16:52:18 +08:00
JSON structure fixes
This commit is contained in:
parent
52883f3264
commit
34bbe17ae7
@ -38,9 +38,9 @@ function getWorkflowAnnotationsJson(lastSuccessRunSha, workflowFilePath, filePat
|
||||
+ `'lastSuccessRunCommit': '${lastSuccessRunSha}',`
|
||||
+ `'branch': '${process.env.GITHUB_REF}',`
|
||||
+ `'deployTimestamp': '${Date.now()}',`
|
||||
+ `'dockerfilePaths': ${JSON.stringify(filePathConfigs.dockerfilePaths)},`
|
||||
+ `'manifestsPaths': ${JSON.stringify(filePathConfigs.manifestFilePaths)},`
|
||||
+ `'helmChartPaths': ${JSON.stringify(filePathConfigs.helmChartPaths)},`
|
||||
+ `'dockerfilePaths': '${filePathConfigs.dockerfilePaths}',`
|
||||
+ `'manifestsPaths': '${filePathConfigs.manifestFilePaths}',`
|
||||
+ `'helmChartPaths': '${filePathConfigs.helmChartPaths}',`
|
||||
+ `'provider': 'GitHub'`
|
||||
+ `}`;
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ function getFilePathsConfigs() {
|
||||
let inputManifestFiles = inputParams.manifests || [];
|
||||
filePathsConfig[MANIFEST_PATHS_KEY] = inputManifestFiles;
|
||||
let helmChartPaths = process.env.HELM_CHART_PATHS || '';
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths;
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths.split('\n');
|
||||
//Fetch labels from each image
|
||||
let imageToBuildConfigMap = [];
|
||||
let imageNames = core.getInput('images').split('\n');
|
||||
@ -190,6 +190,9 @@ function getFilePathsConfigs() {
|
||||
if ((resultObj.Config) && (resultObj.Config.Labels) && (resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY])) {
|
||||
imageToBuildConfigMap[image] = resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY];
|
||||
}
|
||||
else {
|
||||
imageToBuildConfigMap[image] = 'Not available';
|
||||
}
|
||||
}
|
||||
}
|
||||
filePathsConfig[DOCKERFILE_PATH_KEY] = imageToBuildConfigMap;
|
||||
|
||||
@ -38,9 +38,9 @@ export function getWorkflowAnnotationsJson(lastSuccessRunSha: string, workflowFi
|
||||
+ `'lastSuccessRunCommit': '${lastSuccessRunSha}',`
|
||||
+ `'branch': '${process.env.GITHUB_REF}',`
|
||||
+ `'deployTimestamp': '${Date.now()}',`
|
||||
+ `'dockerfilePaths': ${JSON.stringify(filePathConfigs.dockerfilePaths)},`
|
||||
+ `'manifestsPaths': ${JSON.stringify(filePathConfigs.manifestFilePaths)},`
|
||||
+ `'helmChartPaths': ${JSON.stringify(filePathConfigs.helmChartPaths)},`
|
||||
+ `'dockerfilePaths': '${filePathConfigs.dockerfilePaths}',`
|
||||
+ `'manifestsPaths': '${filePathConfigs.manifestFilePaths}',`
|
||||
+ `'helmChartPaths': '${filePathConfigs.helmChartPaths}',`
|
||||
+ `'provider': 'GitHub'`
|
||||
+ `}`;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ export async function getFilePathsConfigs(): Promise<any> {
|
||||
filePathsConfig[MANIFEST_PATHS_KEY] = inputManifestFiles;
|
||||
|
||||
let helmChartPaths = process.env.HELM_CHART_PATHS || '';
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths;
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths.split('\n');
|
||||
|
||||
//Fetch labels from each image
|
||||
let imageToBuildConfigMap: any = [];
|
||||
@ -190,6 +190,9 @@ export async function getFilePathsConfigs(): Promise<any> {
|
||||
if((resultObj.Config) && (resultObj.Config.Labels) && (resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY])){
|
||||
imageToBuildConfigMap[image] = resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY];
|
||||
}
|
||||
else{
|
||||
imageToBuildConfigMap[image] = 'Not available';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user