-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* pipeline jsonschema added a schema definition and validation for pipeline.yaml files Signed-off-by: Gerd Oberlechner <[email protected]> * adapt test Signed-off-by: Gerd Oberlechner <[email protected]> * schema loading tests Signed-off-by: Gerd Oberlechner <[email protected]> --------- Signed-off-by: Gerd Oberlechner <[email protected]>
- Loading branch information
Showing
15 changed files
with
644 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
228 changes: 228 additions & 0 deletions
228
tooling/templatize/pkg/pipeline/pipeline.schema.v1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "pipeline.schema.v1", | ||
"type": "object", | ||
"definitions": { | ||
"variable": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"input": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"step": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"step", | ||
"name" | ||
] | ||
}, | ||
"configRef": { | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": "string" | ||
} | ||
}, | ||
"oneOf": [ | ||
{ | ||
"required": [ | ||
"name", | ||
"input" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"name", | ||
"configRef" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"name", | ||
"value" | ||
] | ||
} | ||
], | ||
"required": [ | ||
"name" | ||
] | ||
} | ||
}, | ||
"properties": { | ||
"serviceGroup": { | ||
"type": "string" | ||
}, | ||
"rolloutName": { | ||
"type": "string" | ||
}, | ||
"resourceGroups": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"subscription": { | ||
"type": "string" | ||
}, | ||
"steps": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"action": { | ||
"type": "string", | ||
"enum": ["ARM", "Shell"] | ||
}, | ||
"template": { | ||
"type": "string" | ||
}, | ||
"parameters": { | ||
"type": "string" | ||
}, | ||
"deploymentLevel": { | ||
"type": "string", | ||
"enum": ["ResourceGroup", "Subscription"] | ||
}, | ||
"command": { | ||
"type": "string" | ||
}, | ||
"variables": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/variable" | ||
} | ||
}, | ||
"dependsOn": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"dryRun": { | ||
"type": "object" | ||
} | ||
}, | ||
"oneOf": [ | ||
{ | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"action": { | ||
"type": "string", | ||
"enum": ["ARM"] | ||
}, | ||
"template": { | ||
"type": "string" | ||
}, | ||
"parameters": { | ||
"type": "string" | ||
}, | ||
"variables": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/variable" | ||
} | ||
}, | ||
"dependsOn": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"deploymentLevel": { | ||
"type": "string", | ||
"enum": ["ResourceGroup", "Subscription"] | ||
} | ||
}, | ||
"required": [ | ||
"template", | ||
"parameters" | ||
] | ||
}, | ||
{ | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"action": { | ||
"type": "string", | ||
"enum": ["Shell"] | ||
}, | ||
"command": { | ||
"type": "string" | ||
}, | ||
"variables": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/variable" | ||
} | ||
}, | ||
"dependsOn": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"dryRun": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"command": { | ||
"type": "string" | ||
}, | ||
"variables": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/variable" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"command" | ||
] | ||
} | ||
], | ||
"required": [ | ||
"name", | ||
"action" | ||
] | ||
} | ||
}, | ||
"aksCluster": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"subscription", | ||
"steps" | ||
] | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"serviceGroup", | ||
"rolloutName", | ||
"resourceGroups" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.