基于 manifest.json 文件的“远程执行脚本”任务的压缩文件必须满足以下要求:
JSON 架构
{
"$schema": "http://json-schema.org/draft-07/schema#",
"titl
e": "Schema for execute scripts task
",
"ty
pe": "objec
t",
"propert
ies
": {
"
ver
sion": {
"type"
: "integer",
"enum": [1]
},
"
ac
tions":{
"typ
e": "array",
"items": {
"
type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["execute"]
},
"path": {
"type": "string"
},
"args": {
"type": "string"
},
"results":{
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -255,
"maximum": 255
},
"next":{
"type": "string",
"enum": ["break", "continue"]
}
},
"required": [
"code",
"next"
]
}
},
"default_next":{
"type": "string",
"enum
": ["break", "continue"]
}
},
"required": [
"type",
"path",
"default_next"
]
}
}
},
"requi
red
": [
"
v
ersion",
"actions"
]
}
{
"
version
": 1,
"
actions
": [
{
"
type
": "execute",
"
path
": "scripts/run1.cmd",
"
args
": "testArg",
"
results
": [
{
"
code
": 0,
"
next
": "continue"
}
],
"
default_next
": "break"
},
{
"
type
": "execute",
"
path
": "scripts/run2.cmd",
"
results
": [
{
"
code
": 0,
"
next
": "continue"
}
],
"
default_next
": "break"
},
{
"
type
": "execute",
"
path
": "scripts/run3.cmd",
"
results
": [
{
"
code
": 0,
"
next
": "continue"
}
],
"
default_next
": "break"
}
]
}
manifest.json
<file1>
<file2>
<folder1>/<file3>
<folder2>/<folder3>/<file4>
...
<fileX>
manifest.json 是该任务的清单文件。
<file1>, ...., <fileX>
是包含待执行脚本的文件集合。