스크립트 원격 실행 작업을 위한 압축 파일 준비
모두 펼치기 | 모두 접기
manifest.json 파일을 기반으로 스크립트 원격 실행 작업의 압축 파일은 다음 요구 사항을 충족해야 합니다.
- 압축 파일 형식: ZIP.
- 총 용량: 1GB 이하.
- 압축 파일에 있는 파일 및 폴더의 수에는 제한이 없습니다.
- 압축 파일의 매니페스트 파일은 아래의 스키마와 일치해야 하며 이름은 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>는 실행할 스크립트가 있는 파일 집합입니다.
맨 위로