Dogtools: task runners sharing a common spec

Xavi Soler, Feb 2017

@xavi_xsb

Dog

is a command line application

that runs automated tasks

$ dog
build               Build dog binary for current platform
build-all           Build dog binary for all platforms
clean               Clean compiled binaries
dist                Put all dist binaries in a compressed file
install-build-deps  Installs required dependencies for building dog
run-test-dogfiles   Run all Tasks in testdata Dogfiles

Dog

Dog

inspired by GNU Make,

but not a built tool

Dog

runs automated tasks:

build, install, test, deploy, run scripts,

config/infra management,

automation in general

Dog

knows about tasks

described in a Dogfile

Dogfile

is a specification that

describes tasks for a project

- task: clean
  description: Clean compiled binaries
  code: rm -rf dist

- task: test
  description: Run all tests
  code: go test ./...

- task: build
  description: Build binary for current platform
  pre:
    - test
    - clean
  env: OUTPUT_PATH=dist/current
  code: |
    go build \
      -ldflags "-s -w" \
      -o "${OUTPUT_PATH}/myapp" \
      .

Dogfile

Tasks in a Dogfile

can be written in sh, bash,

python, ruby, perl, nodejs and go

(default is sh)

Tasks in a Dogfile

Directives: task, description, code,

workdir, runner, pre, post, env, register

Non standard directives:

anything starting with x_

Dogfile Spec

https://github.com/dogtools/dog/blob/master/DOGFILE_SPEC.md

Dog/Dogfile Future

parameters as positional args

timeout directive

interactivity

dog as a library

dog as a library

github.com/dogtools/dog

github.com/dogtools/dog/run

dog as a library

allows building

other dogtools

Dogbot

Dogbot

first version published 2 days ago

github.com/dogtools/dogbot

Dogbot Future

more chat platforms

task arguments

Future Dogtools

Dogserve: remote (http) execution

Crondog: periodic execution

Thanks!

This is a learning process

Join at github.com/dogtools

Dogtools: task runners sharing a common spec

By Xavi Soler

Dogtools: task runners sharing a common spec

  • 528

More from Xavi Soler