--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/build.json",
+ "title": "Foundry Build Notification",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "repository": {
+ "description": "The repository that sources were taken from",
+ "type": "string",
+ "pattern": "^(https|file)://.*$"
+ },
+
+ "branch": {
+ "description": "The branch that the sources were taken from",
+ "type": "string"
+ },
+
+ "commit": {
+ "description": "The commit that uniquely identifies the built sources",
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]+$"
+ },
+
+ "artifacts": {
+ "description": "The files resulting from the build",
+ "type": "array",
+ "items": {
+ "type": "#/$defs/artifact"
+ },
+ "minItems": 1
+ },
+
+ "logs": {
+ "description": "Logfiles from the build",
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1
+ }
+ },
+
+ "required": [
+ "repository",
+ "branch",
+ "commit",
+ "artifacts",
+ "logs"
+ ],
+
+ "$defs": {
+ "artifact": {
+ "type": "object",
+ "properties": {
+ "uri": {
+ "description": "URI of the artifact",
+ "type": "string"
+ },
+ "checksum": {
+ "description": "Hex-encoded sha512 checksum of the artifact",
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{128}$"
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.buildrequest.json",
+ "title": "Foundry BuildRequest Message",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "repository": {
+ "description": "URL of the repository where the code to be built is located",
+ "type": "string"
+ },
+
+ "branch": {
+ "description": "Name of the branch that contains the commit to be built",
+ "type": "string"
+ },
+
+ "commit": {
+ "description": "Commit that is to be built",
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]+$"
+ }
+ },
+
+ "required": [
+ "tid",
+ "repository",
+ "branch",
+ "commit"
+ ]
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/commit.json",
+ "title": "Foundry Commit Notification",
+ "type": "object",
+
+ "properties": {
+ "repository": {
+ "description": "The URL of the repository the commit was detected at",
+ "type": "string",
+ "pattern": "^(https|file)://.*$"
+ },
+
+ "branch": {
+ "description": "The name of the branch the commit was detected on",
+ "type": "string"
+ },
+
+ "commit": {
+ "description": "The hash of the detected commit",
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]+$"
+ },
+
+ "timestamp": {
+ "description": "The unix timestamp of the time the change was detected",
+ "type": "integer"
+ }
+ },
+
+ "required": [
+ "repository",
+ "commit",
+ "branch"
+ ]
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.dist.json",
+ "title": "Foundry Dist Notification",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "artifacts": {
+ "description": "Artifacts that were published",
+ "type": "array",
+ "items": {
+ "type": "#/$defs/artifact"
+ }
+ "minItems": 1
+ },
+
+ "repository": {
+ "description": "The repository where the artifacts were published",
+ "type": "string"
+ }
+ },
+
+ "required": [
+ "tid",
+ "artifacts",
+ "repository"
+ ],
+
+ "$defs": {
+ "artifact": {
+ "type": "object",
+ "properties": {
+ "uri": {
+ "description": "URI of the artifact",
+ "type": "string"
+ },
+
+ "checksum": {
+ "description": "hex-encoded sha512 hash of the artifact",
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{128}$"
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.distrequest.json",
+ "title": "Foundry DistRequest Message",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "repository": {
+ "description": "URL of the source tree the artifacts were built from",
+ "type": "string"
+ },
+
+ "branch": {
+ "description": "Name of the branch the artifacts were built from",
+ "type": "string"
+ },
+
+ "commit": {
+ "description": "Commit the artifacts were built from",
+ "type": "string"
+ },
+
+ "artifacts": {
+ "description": "List of artifacts built from the source tree",
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1
+ }
+ },
+
+ "required": [
+ "tid",
+ "repository",
+ "branch",
+ "commit",
+ "artifacts"
+ ]
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.merge.json",
+ "title": "Foundry Merge Notification",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "repository": {
+ "description": "URL of the repository where the merge was done",
+ "type": "string"
+ },
+
+ "source-branch": {
+ "description": "Name of the branch that was merged",
+ "type": "string"
+ },
+
+ "destination-branch": {
+ "description": "Name of the branch that was merged into",
+ "type": "string"
+ },
+
+ "status": {
+ "description": "Indicates merge success (zero) or failure (non-zero)",
+ "type": "integer"
+ },
+
+ "log": {
+ "description": "URI of the merge log",
+ "type": "string"
+ }
+ },
+
+ "required": [
+ "tid",
+ "repository",
+ "source-branch",
+ "destination-branch",
+ "status",
+ "log"
+ ]
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.mergerequest.json",
+ "title": "Foundry MergeRequst Message",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "repository": {
+ "description": "URL of the repository containing the code to be tested",
+ "type": "string"
+ },
+
+ "source-branch": {
+ "description": "Name of the source for the merge operation",
+ "type": "string"
+ },
+
+ "destination-branch": {
+ "description": "Name of the destination for the merge operation",
+ "type": "string"
+ }
+ },
+
+ "required": [
+ "tid",
+ "repository",
+ "source-branch",
+ "destination-branch"
+ ]
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.sign.json",
+ "title": "Foundry Sign Notification",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "artifacts": {
+ "description": "The files that have been signed",
+ "type": "array",
+ "items": {
+ "type": "#/$defs/artifact"
+ },
+ "minItems": 1
+ },
+
+ "key": {
+ "description": "The key that was used for signing",
+ "type": "string"
+ }
+ },
+
+ "required": [
+ "tid",
+ "artifacts",
+ "key"
+ ],
+
+ "$defs": {
+ "artifact": {
+ "type": "object",
+ "properties": {
+ "uri": {
+ "description": "URI of the artifact",
+ "type": "string"
+ },
+
+ "checksum": {
+ "description": "hex-encoded sha512 hash of the artifact",
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{128}$"
+ }
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.signrequest.json",
+ "title": "Foundry SignRequest Message",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "artifacts": {
+ "description": "The artifacts to be signed",
+ "type": "array",
+ "items": {
+ "type": "#/$defs/artifact"
+ },
+ "minItems": 1
+ }
+ },
+
+ "required": [
+ "tid",
+ "artifacts"
+ ],
+
+ "$defs": {
+ "artifact": {
+ "type": "object",
+
+ "properties": {
+ "uri": {
+ "description": "URI of the artifact",
+ "type": "string"
+ },
+ "checksum": {
+ "description": "hex-encoded sha512 checksum of the artifact",
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]{128}$"
+ }
+ },
+
+ "required": [
+ "uri",
+ "checksum"
+ }
+ }
+ }
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.test.json",
+ "title": "Foundry Test Notification",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "repository": {
+ "description": "URL of the source tree that was tested",
+ "type": "string"
+ },
+
+ "branch": {
+ "description": "Name of the branch that was tested",
+ "type": "string"
+ },
+
+ "commit": {
+ "description": "The commit that was tested",
+ "type": "string"
+ },
+
+ "result": {
+ "description": "Result of the test (zero = success, non-zero = failure)",
+ "type": "integer"
+ },
+
+ "logs": {
+ "description": "Log files generated during the test",
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "minItems": 1
+ }
+ },
+
+ "required": [
+ "tid",
+ "repository",
+ "branch",
+ "commit",
+ "result",
+ "logs"
+ ]
+}
--- /dev/null
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://m10k.eu/foundry/msg.testrequest.json",
+ "title": "Foundry TestRequest Message",
+ "type": "object",
+
+ "properties": {
+ "tid": {
+ "description": "Unique identifier of this transaction",
+ "type": "string"
+ },
+
+ "repository": {
+ "description": "URL of the repository containing the code to be tested",
+ "type": "string"
+ },
+
+ "branch": {
+ "description": "Name of the branch containing the commit to be tested",
+ "type": "string"
+ },
+
+ "commit": {
+ "description": "Commit that is to be tested",
+ "type": "string",
+ "pattern": "^[0-9a-fA-F]+$"
+ }
+ },
+
+ "required": [
+ "tid",
+ "repository",
+ "branch",
+ "commit"
+ ]
+}