mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-12 17:42:20 +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}',`
|
+ `'lastSuccessRunCommit': '${lastSuccessRunSha}',`
|
||||||
+ `'branch': '${process.env.GITHUB_REF}',`
|
+ `'branch': '${process.env.GITHUB_REF}',`
|
||||||
+ `'deployTimestamp': '${Date.now()}',`
|
+ `'deployTimestamp': '${Date.now()}',`
|
||||||
+ `'dockerfilePaths': '${JSON.stringify(filePathConfigs.dockerfilePaths)}',`
|
+ `'dockerfilePaths': '${JSON.stringify(filePathConfigs.dockerfilePaths, null, 2)}',`
|
||||||
+ `'manifestsPaths': '${JSON.stringify(filePathConfigs.manifestFilePaths)}',`
|
+ `'manifestsPaths': '${JSON.stringify(filePathConfigs.manifestFilePaths, null, 2)}',`
|
||||||
+ `'helmChartPaths': '${JSON.stringify(filePathConfigs.helmChartFilePaths)}',`
|
+ `'helmChartPaths': '${JSON.stringify(filePathConfigs.helmChartFilePaths, null, 2)}',`
|
||||||
+ `'provider': 'GitHub'`
|
+ `'provider': 'GitHub'`
|
||||||
+ `}`;
|
+ `}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -148,8 +148,12 @@ function getFilePathsConfigs() {
|
|||||||
const DOCKERFILE_PATH_LABEL_KEY = 'dockerfile-path';
|
const DOCKERFILE_PATH_LABEL_KEY = 'dockerfile-path';
|
||||||
let inputManifestFiles = inputParams.manifests || [];
|
let inputManifestFiles = inputParams.manifests || [];
|
||||||
filePathsConfig[MANIFEST_PATHS_KEY] = inputManifestFiles;
|
filePathsConfig[MANIFEST_PATHS_KEY] = inputManifestFiles;
|
||||||
let helmChartPaths = process.env.HELM_CHART_PATHS || '';
|
let helmChartPaths = [];
|
||||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths.split('\n');
|
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
|
//Fetch labels from each image
|
||||||
let imageNames = core.getInput('images').split('\n');
|
let imageNames = core.getInput('images').split('\n');
|
||||||
let imageDockerfilePathList = [];
|
let imageDockerfilePathList = [];
|
||||||
|
|||||||
@ -38,9 +38,9 @@ export function getWorkflowAnnotationsJson(lastSuccessRunSha: string, workflowFi
|
|||||||
+ `'lastSuccessRunCommit': '${lastSuccessRunSha}',`
|
+ `'lastSuccessRunCommit': '${lastSuccessRunSha}',`
|
||||||
+ `'branch': '${process.env.GITHUB_REF}',`
|
+ `'branch': '${process.env.GITHUB_REF}',`
|
||||||
+ `'deployTimestamp': '${Date.now()}',`
|
+ `'deployTimestamp': '${Date.now()}',`
|
||||||
+ `'dockerfilePaths': '${JSON.stringify(filePathConfigs.dockerfilePaths)}',`
|
+ `'dockerfilePaths': '${JSON.stringify(filePathConfigs.dockerfilePaths,null,2)}',`
|
||||||
+ `'manifestsPaths': '${JSON.stringify(filePathConfigs.manifestFilePaths)}',`
|
+ `'manifestsPaths': '${JSON.stringify(filePathConfigs.manifestFilePaths,null,2)}',`
|
||||||
+ `'helmChartPaths': '${JSON.stringify(filePathConfigs.helmChartFilePaths)}',`
|
+ `'helmChartPaths': '${JSON.stringify(filePathConfigs.helmChartFilePaths,null,2)}',`
|
||||||
+ `'provider': 'GitHub'`
|
+ `'provider': 'GitHub'`
|
||||||
+ `}`;
|
+ `}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { GitHubClient } from '../githubClient';
|
|||||||
import { StatusCodes } from "./httpClient";
|
import { StatusCodes } from "./httpClient";
|
||||||
import * as exec from "./exec";
|
import * as exec from "./exec";
|
||||||
import * as inputParams from "../input-parameters";
|
import * as inputParams from "../input-parameters";
|
||||||
|
import { Z_FILTERED } from 'zlib';
|
||||||
|
|
||||||
export function getExecutableExtension(): string {
|
export function getExecutableExtension(): string {
|
||||||
if (os.type().match(/^Win/)) {
|
if (os.type().match(/^Win/)) {
|
||||||
@ -140,8 +141,13 @@ export async function getFilePathsConfigs(): Promise<any> {
|
|||||||
let inputManifestFiles = inputParams.manifests || [];
|
let inputManifestFiles = inputParams.manifests || [];
|
||||||
filePathsConfig[MANIFEST_PATHS_KEY] = inputManifestFiles;
|
filePathsConfig[MANIFEST_PATHS_KEY] = inputManifestFiles;
|
||||||
|
|
||||||
let helmChartPaths = process.env.HELM_CHART_PATHS || '';
|
let helmChartPaths = [];
|
||||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths.split('\n');
|
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
|
//Fetch labels from each image
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user