基於 manifest.json 檔案的遠端執行指令碼工作存檔必須符合以下要求:
JSON 架構
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title"
: "Schema for execute scripts task",
"type"
: "object",
"properties"
: {
"version"
: {
"type"
: "integer",
"enum"
: [1]
},
"actions"
:{
"type"
: "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"
]
}
}
},
"required"
: [
"version"
,
"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
<檔案 1>
<檔案 2>
<資料夾 1>/<檔案 3>
<資料夾 2>/<資料夾 3>/<檔案 4>
...
<檔案 X>
manifest.json 是工作的清單檔案。
<file1>, ...., <fileX>
是包含要執行的指令碼的檔案集。