any2api-invoker-ruby
Version:
Ruby invoker for any2api
102 lines (100 loc) • 3.21 kB
JSON
{
"parameters_schema": {
"invoker_config": {
"type": "json_object",
"default": { "access": "local" },
"json_schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"version": {
"description": "Ruby version, e.g., 2.2.0",
"type": "string"
},
"gemfile": {
"description": "Gem requirements, written to Gemfile",
"type": "string"
},
"gemfile_lock": {
"description": "Locked gem requirements, written to Gemfile.lock",
"type": "string"
},
"encoding_stdout": {
"description": "Encoding of stdout, e.g., utf8",
"type": "string"
},
"encoding_stderr": {
"description": "Encoding of stderr, e.g., utf8",
"type": "string"
},
"cwd": {
"description": "Current working directory, e.g., /tmp",
"type": "string"
},
"instance_path": {
"description": "Directory in which the instance is placed, e.g., /tmp/my-instance",
"type": "string"
},
"env": {
"description": "Environment variables; overrides environment variables mapped from parameters",
"type": "object"
},
"args": {
"description": "Command-line arguments; overrides arguments mapped from parameters",
"type": "object"
},
"stdin": {
"description": "Standard input; overrides standard input mapped from a parameter",
"type": "string"
},
"sudo_all": {
"description": "Use sudo for all actions",
"type": "boolean"
},
"sudo_cmd": {
"description": "Use sudo to execute command only",
"type": "boolean"
},
"sudo_user": {
"description": "Username for sudo, if other than root",
"type": "string"
},
"sudo_password": {
"description": "Password for sudo, if required",
"type": "string"
},
"access": {
"description": "Currently supported access mechanisms: local, ssh",
"type": "string",
"default": "local"
},
"ssh_port": {
"description": "SSH port",
"type": "integer",
"default": 22
},
"ssh_host": {
"description": "SSH host (DNS name or IP address)",
"type": "string"
},
"ssh_user": {
"description": "SSH username",
"type": "string",
"default": "ubuntu"
},
"ssh_private_key": {
"description": "SSH private key",
"type": "string"
}
},
"required": [ "access" ]
}
},
"cmd": {
"description": "Ruby command including all options and arguments",
"type": "string",
"default": "bundle exec ruby script.rb"
}
},
"parameters_required": [ "invoker_config", "cmd" ]
}