Giter Site home page Giter Site logo

werk's Introduction

werk

Dead simple task runner. Now with support for Docker.

Build status

CI Status

Installation

You can follow the installation guide available here.

Documentation

For more information on how to get started, please check the wiki.

Features

  • Automatic determination of the execution plan
  • Parallel jobs execution
  • Shell executor
  • Docker executor
  • Real-time output support for parallel jobs
  • Simple configuration DSL based on YAML
  • Execution report
  • Web UI for browsing the execution reports (?)
  • Enable logging

Example

Create a werk.yml with the following content:

version: "1"

description: "Manage Werk with Werk"

jobs:
  main:
    description: "Build application"
    executor: local
    commands:
      - shards build
    needs:
      - lint
      - test

  lint:
    description: "Lint code"
    executor: docker
    image: veelenga/ameba
    commands:
      - ameba
    can_fail: true

  test:
    description: "Test code"
    executor: local
    commands:
      - crystal spec

  docs:
    description: Generate API documentation
    executor: local
    commands:
      - crystal docs
      - open docs/index.html
    silent: true

after that, you can run

werk run

You can also start individual jobs by specifying a target like this:

werk run lint

Here's another example; in this case, I'm building Werk using itself.

asciicast

Contributing

  1. Fork it (https://github.com/marghidanu/werk/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

werk's People

Contributors

marghidanu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

werk's Issues

Docker inside docker

hello @marghidanu

Great project! This is very useful and well made

I wanted to know if i am running werk inside a container can i still use docker executor?

Rename "default" job to "main" in the Init subcommand

The "init" subcommand generates the base configuration with the wrong job name:

---
version: "1"
description: Lorem ipsum dolor sic amet ...
variables: {}
jobs:
  default:
    description: Default job
    variables: {}
    commands:
    - echo "Hello world!"
    needs: []
    can_fail: false
    silent: false

[main] --: /tmp/.WJf2lg: /bin/sh: bad interpreter: Text file busy

Hi,

I am trying to test Werk out for the first time and I'm running into the following error.

Here's how to repro:

docker run --name werk_test -dt centos:7 bash
docker exec -it werk_test bash
curl -LO https://github.com/marghidanu/werk/releases/download/0.7.3/werk-linux-x64
chmod +x werk-linux-x64

Now I add a very basic werk.yml:

version: "1"

description: "Manage Werk with Werk"

jobs:
  main:
    description: "sleep"
    executor: local
    commands:
      - sleep 1

Planning works:

./werk-linux-x64 plan
┌──────────────────────────────────┐
│             Stage 0              │
├────────┬─────────────┬───────────┤
│  Name  │ Description │ Can fail? │
├────────┼─────────────┼───────────┤
│  main  │ sleep       │    No     │
└────────┴─────────────┴───────────┘

But not running:

./werk-linux-x64 run
[main] --: /tmp/.et15hF: /bin/sh: bad interpreter: Text file busy

Any ideas or am I doing something wrong?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.