スクリプトをリモートで実行タスク用のアーカイブを準備する
すべて表示 | すべて非表示
ファイル manifest.json に基づくスクリプトをリモートで実行タスクのアーカイブは、次の要件を満たす必要があります。
- アーカイブ形式:ZIP。
- 合計サイズ:1 GB 以下。
- アーカイブ内のファイルとフォルダーの数に制限はありません。
- アーカイブのマニフェストファイルは以下のスキーマと一致し、manifest.json という名前にする必要があります。スキーマは、デバイス上でタスクが実行されるときにのみ検証されます。
マニフェストファイルの 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
<file1>
<file2>
<folder1>/<file3>
<folder2>/<folder3>/<file4>
...
<fileX>
manifest.json はタスクのマニフェストファイルです。
<file1>, ...., <fileX> は、実行されるスクリプトを含むファイルのセットです。
ページのトップに戻る