Code Monkey home page Code Monkey logo

anvil's Introduction

anvil

Generic build server

Installation

$ heroku plugins:install https://github.com/ddollar/heroku-anvil

Usage

See the client usage docs for details.

API

Applications are described by a manifest, in JSON format:

{
  "README.md": {
    "mtime": 1339185087,
    "mode":  100644,
    "hash":  "0000000000000000000000000000000000000000000000000000000000000000"
  },
  "lib/web.rb": {
    "mtime": 1339185087,
    "mode":  100644,
    "hash":  "0000000000000000000000000000000000000000000000000000000000000000"
  }
}

POST /manifest

Store a manifest
Options
  • manifest: an application manifest as json
Example
$ curl -X POST https://anvil.herokuapp.com/manifest \
       -d "manifest=$(cat manifest.json)"
{"id":"00000000-0000-0000-0000-000000000000"}

POST /manifest/build

Build a manifest
Options
  • manifest: an application manifest as json
  • buildpack: a buildpack url (optional)
  • env: a hash of environment variables to use during build
Example
$ curl -v -X POST https://anvil.herokuapp.com/manifest \
       -d "manifest=$(cat manifest.json)" \
       -d "buildpack=https%3A%2F%2Fbuildkit.herokuapp.com%2Fbuildkit%2Fdefault.tgz" \
       -d "env={'FOO':'bar'}"
* Connected to anvil.herokuapp.com (107.20.215.233) port 443 (#0)
> POST /manifest/build HTTP/1.1
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Type: text/plain
< Transfer-Encoding: chunked
< X-Slug-Url: http://localhost:5000/slugs/00000000-0000-0000-0000-000000000000.tgz
< Connection: keep-alive
<
Launching build process... done
Recreating app from manifest... done
Fetching buildpack... done
Detecting buildpack... done, Buildkit+Ruby
Compiling app...
...

POST /manifest/diff

Return a list of hashes that are unknown by the server
Options
  • manifest: an application manifest as json
Example
$ curl -X POST https://anvil.herokuapp.com/manifest
       -d "manifest=$(cat manifest.json)"
["0000000000000000000000000000000000000000000000000000000000000000"]

GET /file/:hash

Retrieve a file by hash
Example
$ curl -X GET https://anvil.herokuapp.com/file/0000000000000000000000000000000000000000000000000000000000000000
file data here
…

POST /file/:hash

Store a file by hash
Example
$ curl -X POST https://anvil.herokuapp.com/file/0000000000000000000000000000000000000000000000000000000000000000
       -F data=@myfile
"ok"

anvil's People

Contributors

danp avatar ddollar avatar ryanbrainard avatar technomancy avatar

Watchers

 avatar  avatar  avatar

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.