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
d953c709a5
commit
27085d52d5
@ -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.helmChartFilePaths)}',`
|
||||
+ `'dockerfilePaths': '${JSON.stringify(filePathConfigs.dockerfilePaths, null, 2)}',`
|
||||
+ `'manifestsPaths': '${JSON.stringify(filePathConfigs.manifestFilePaths, null, 2)}',`
|
||||
+ `'helmChartPaths': '${JSON.stringify(filePathConfigs.helmChartFilePaths, null, 2)}',`
|
||||
+ `'provider': 'GitHub'`
|
||||
+ `}`;
|
||||
}
|
||||
|
||||
@ -148,8 +148,12 @@ function getFilePathsConfigs() {
|
||||
const DOCKERFILE_PATH_LABEL_KEY = 'dockerfile-path';
|
||||
let inputManifestFiles = inputParams.manifests || [];
|
||||
filePathsConfig[MANIFEST_PATHS_KEY] = inputManifestFiles;
|
||||
let helmChartPaths = process.env.HELM_CHART_PATHS || '';
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths.split('\n');
|
||||
let helmChartPaths = [];
|
||||
if (process.env.HELM_CHART_PATHS) {
|
||||
helmChartPaths = process.env.HELM_CHART_PATHS.split('\n');
|
||||
helmChartPaths.filter(val => val != "");
|
||||
}
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths;
|
||||
//Fetch labels from each image
|
||||
let imageNames = core.getInput('images').split('\n');
|
||||
let imageDockerfilePathList = [];
|
||||
|
||||
@ -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.helmChartFilePaths)}',`
|
||||
+ `'dockerfilePaths': '${JSON.stringify(filePathConfigs.dockerfilePaths,null,2)}',`
|
||||
+ `'manifestsPaths': '${JSON.stringify(filePathConfigs.manifestFilePaths,null,2)}',`
|
||||
+ `'helmChartPaths': '${JSON.stringify(filePathConfigs.helmChartFilePaths,null,2)}',`
|
||||
+ `'provider': 'GitHub'`
|
||||
+ `}`;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import { GitHubClient } from '../githubClient';
|
||||
import { StatusCodes } from "./httpClient";
|
||||
import * as exec from "./exec";
|
||||
import * as inputParams from "../input-parameters";
|
||||
import { Z_FILTERED } from 'zlib';
|
||||
|
||||
export function getExecutableExtension(): string {
|
||||
if (os.type().match(/^Win/)) {
|
||||
@ -140,8 +141,13 @@ export async function getFilePathsConfigs(): Promise<any> {
|
||||
let inputManifestFiles = inputParams.manifests || [];
|
||||
filePathsConfig[MANIFEST_PATHS_KEY] = inputManifestFiles;
|
||||
|
||||
let helmChartPaths = process.env.HELM_CHART_PATHS || '';
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths.split('\n');
|
||||
let helmChartPaths = [];
|
||||
if(process.env.HELM_CHART_PATHS){
|
||||
helmChartPaths = process.env.HELM_CHART_PATHS.split('\n');
|
||||
helmChartPaths.filter( val => val != "" );
|
||||
}
|
||||
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths;
|
||||
|
||||
//Fetch labels from each image
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user