Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

@runnerty/executor-shell

1.0.2 • Public • Published

Shell executor for Runnerty:

Configuration sample:

Local

{
  "id": "shell_default",
  "type": "@runnerty-executor-shell"
}

Remote (SSH)

{
  "id": "shell_ssh",
  "type": "@runnerty-executor-shell",
  "host": "remote.server.com",
  "username": "runnerty",
  "privateKey": "./ssh/privateKeyFile.pem"
}

Plan sample:

{
  "id":"shell_default",
  "command":"tar cvfz /var/backups/stf.tar /var/stranger_things/"
}
{
  "id":"shell_default",
  "command":"python",
  "args":["myscript.py","hello"]
}
{
  "id":"shell_default",
  "command":"echo",
  "args":["hello world"]
}

Using the outputJSON param, if you have a process which returns a JSON object, the executor will generate automatically a value for each value of the object:

{
  "id":"shell_default",
  "command":"node my-returning-object-process.js",
}

This the output of my-returning-object-process.js:

{
  "name": "my output name",
  "lastName": "my output lastName"
}

Output values with the object's values:

@GV(PROCESS_EXEC_JSON_NAME) --> "my output name"
@GV(PROCESS_EXEC_JSON_LASTNAME) --> "my output lastName"

install

npm i @runnerty/executor-shell

Downloadsweekly downloads

40

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability