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
34bbe17ae7
commit
ba95de9cac
@ -151,12 +151,13 @@ function getFilePathsConfigs() {
|
||||
let helmChartPaths = process.env.HELM_CHART_PATHS || '';
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths.split('\n');
|
||||
//Fetch labels from each image
|
||||
let imageToBuildConfigMap = [];
|
||||
let imageNames = core.getInput('images').split('\n');
|
||||
let imageDockerfilePathList = [];
|
||||
for (const image of imageNames) {
|
||||
let args = [image];
|
||||
let resultObj;
|
||||
let containerRegistryName = image;
|
||||
let imageDockerfilePathObj = {};
|
||||
try {
|
||||
let usrname = process.env.CR_USERNAME || null;
|
||||
let pwd = process.env.CR_PASSWORD || null;
|
||||
@ -188,14 +189,15 @@ function getFilePathsConfigs() {
|
||||
if (resultObj) {
|
||||
resultObj = resultObj[0];
|
||||
if ((resultObj.Config) && (resultObj.Config.Labels) && (resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY])) {
|
||||
imageToBuildConfigMap[image] = resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY];
|
||||
imageDockerfilePathObj[image] = resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY];
|
||||
}
|
||||
else {
|
||||
imageToBuildConfigMap[image] = 'Not available';
|
||||
imageDockerfilePathObj[image] = 'Not available';
|
||||
}
|
||||
imageDockerfilePathList.push(imageDockerfilePathObj);
|
||||
}
|
||||
}
|
||||
filePathsConfig[DOCKERFILE_PATH_KEY] = imageToBuildConfigMap;
|
||||
filePathsConfig[DOCKERFILE_PATH_KEY] = imageDockerfilePathList;
|
||||
return Promise.resolve(filePathsConfig);
|
||||
});
|
||||
}
|
||||
|
||||
@ -144,13 +144,15 @@ export async function getFilePathsConfigs(): Promise<any> {
|
||||
filePathsConfig[HELM_CHART_KEY] = helmChartPaths.split('\n');
|
||||
|
||||
//Fetch labels from each image
|
||||
let imageToBuildConfigMap: any = [];
|
||||
|
||||
let imageNames = core.getInput('images').split('\n');
|
||||
let imageDockerfilePathList: any = [];
|
||||
|
||||
for(const image of imageNames){
|
||||
let args: string[] = [image];
|
||||
let resultObj: any;
|
||||
let containerRegistryName = image;
|
||||
let imageDockerfilePathObj: any = {};
|
||||
|
||||
try{
|
||||
let usrname = process.env.CR_USERNAME || null;
|
||||
@ -188,15 +190,16 @@ export async function getFilePathsConfigs(): Promise<any> {
|
||||
if(resultObj){
|
||||
resultObj = resultObj[0];
|
||||
if((resultObj.Config) && (resultObj.Config.Labels) && (resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY])){
|
||||
imageToBuildConfigMap[image] = resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY];
|
||||
imageDockerfilePathObj[image] = resultObj.Config.Labels[DOCKERFILE_PATH_LABEL_KEY];
|
||||
}
|
||||
else{
|
||||
imageToBuildConfigMap[image] = 'Not available';
|
||||
imageDockerfilePathObj[image] = 'Not available';
|
||||
}
|
||||
imageDockerfilePathList.push(imageDockerfilePathObj);
|
||||
}
|
||||
}
|
||||
|
||||
filePathsConfig[DOCKERFILE_PATH_KEY] = imageToBuildConfigMap;
|
||||
filePathsConfig[DOCKERFILE_PATH_KEY] = imageDockerfilePathList;
|
||||
|
||||
return Promise.resolve(filePathsConfig);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user