From 840a6065e54d204c482b21df8077d3e3d69e0b89 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 17 Aug 2022 15:01:10 +0200 Subject: [PATCH] Allow single multiarch image (manifest) in build_from (#105) --- src/build.schema.json | 62 ++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/src/build.schema.json b/src/build.schema.json index 0eee8fc..5e2974a 100644 --- a/src/build.schema.json +++ b/src/build.schema.json @@ -8,36 +8,44 @@ "type": "object" }, "build_from": { - "additionalProperties": false, "default": {}, - "properties": { - "aarch64": { - "default": "homeassistant/aarch64-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", - "type": "string" - }, - "amd64": { - "default": "homeassistant/amd64-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", - "type": "string" - }, - "armhf": { - "default": "homeassistant/armhf-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", - "type": "string" + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "aarch64": { + "default": "homeassistant/aarch64-base:latest", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "type": "string" + }, + "amd64": { + "default": "homeassistant/amd64-base:latest", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "type": "string" + }, + "armhf": { + "default": "homeassistant/armhf-base:latest", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "type": "string" + }, + "armv7": { + "default": "homeassistant/armv7-base:latest", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "type": "string" + }, + "i386": { + "default": "homeassistant/i386-base:latest", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "type": "string" + } + }, + "type": "object" }, - "armv7": { - "default": "homeassistant/armv7-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", - "type": "string" - }, - "i386": { - "default": "homeassistant/i386-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", - "type": "string" + { + "type": "string", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$" } - }, - "type": "object" + ] }, "codenotary": { "additionalProperties": false,