By Brew:
brew install chyroc/tap/anbBy Go:
go get github.com/chyroc/anbid: unique id for task, can be used with set-output commandififargs supportexistfunction- and
!,&&,||operator
dir: support cmd and local_cmd task
server:
user: root
host: 1.2.3.4
tasks:
- name: "clone app"
if: |
!exist("/app-path")
local_cmd:
- git clone https://github.com/user/repo app-pathserver:
user: root
host: 1.2.3.4
tasks:
- name: "pull app"
if: exist("/app-path")
dir: app-path
local_cmd:
- git pull- cmd
- local_cmd
- upload
- download
server:
user: root
host: 1.2.3.4
tasks:
- cmd: ls
- name: exec commands
cmd:
- ls
- ls -alhserver:
user: root
host: 1.2.3.4
tasks:
- name: exec local command
local_cmd: go build -o /tmp/bin-file main.go
- name: exec server commands
cmd:
- lsserver:
user: root
host: 1.2.3.4
tasks:
- name: "upload file"
upload:
src: README.md
dest: /tmp/README.md
- name: "upload dir"
upload:
src: ./config/
dest: /tmp/config/server:
user: root
host: 1.2.3.4
tasks:
- name: "download file"
upload:
src: /tmp/server-README.md
dest: /tmp/local-README.md
- name: "upload dir"
upload:
src: /tmp/server-config/
dest: /tmp/local-config/