shipit-cli
Shipit command line interface.
npm install --save-dev shipit-cli
Usage
Usage: shipit <environment> <tasks...>
Options:
-V, --version output the version number
--shipitfile <file> Specify a custom shipitfile to use
--require <files...> Script required before launching Shipit
--tasks List available tasks
--environments List available environments
-h, --help output usage information
shipitfile.js
module { shipit shipit}
API
shipit.task(name, [deps], fn)
Create a new Shipit task. If a promise is returned task will wait for completion.
shipit
shipit.blTask(name, [deps], fn)
Create a new Shipit task that will block other tasks during its execution. If a promise is returned other task will wait before start.
shipit
shipit.start(tasks)
Run Shipit tasks.
shipitstart'task'shipitstart'task1' 'task2'shipitstart'task1' 'task2'
shipit.local(command, [options])
Run a command locally and streams the result. See ssh-pool#exec.
shipit
shipit.remote(command, [options])
Run a command remotely and streams the result. Run a command locally and streams the result. See ssh-pool#connection.run.
shipit
shipit.copyToRemote(src, dest, [options])
Make a remote copy from a local path to a remote path. See ssh-pool#connection.copyToRemote.
shipit
shipit.copyFromRemote(src, dest, [options])
Make a remote copy from a remote path to a local path. See ssh-pool#connection.copyFromRemote.
shipit
shipit.log(...args)
Log using Shipit, same API as console.log
.
shipit
Workflow tasks
When the system initializes it automatically emits events:
- Emit event "init"
- Emit event "init:after_ssh_pool"
Each shipit task also generates events:
- Emit event "task_start"
- Emit event "task_stop"
- Emit event "task_err"
- Emit event "task_not_found"
Inside the task events, you can test for the task name.
shipit
License
MIT