Skip to content

Commit

Permalink
Added minimal task schema
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLorenzo committed Jan 22, 2018
1 parent 59d5a7b commit 5ee5bb2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
26 changes: 25 additions & 1 deletion shipitscript/data/shipit_task_schema.json
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
{}
{
"title": "Taskcluster ShipIt task minimal schema",
"type": "object",
"properties": {
"dependencies": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
}
},
"payload": {
"type": "object",
"properties": {
"release_name": {
"type": "string"
}
},
"required": ["release_name"],
"additionalProperties": false
}
},
"required": ["dependencies", "payload"]
}
7 changes: 6 additions & 1 deletion shipitscript/test/test_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
def test_validate_task():
context = Context()
context.config = get_default_config()
context.task = {}
context.task = {
'dependencies': ['someTaskId'],
'payload': {
'release_name': 'Firefox-59.0b3-build1'
}
}
validate_task_schema(context)

0 comments on commit 5ee5bb2

Please sign in to comment.