Giter VIP home page Giter VIP logo

buildbot's Introduction

Implementing buildbot and it's flows as a graph database.

Graph Schema

The graph schema can be auto-generated by buildbot_flows/utils.py

Demo

The results of demo.py should look something like:

Startup a docker instance of neo4j

fab docker

Assign some login parameters, these are local to your neo4j server.

neo4j_login = {
    "username" : "buildbot",
    "password" : "tulsa",
    "url" : "http://localhost:7475"
}

Create a new graph connection

gdb = enhanced_GraphDatabase(**neo4j_login)

WARNING: this is a hard reset and will wipe any existing neo4j database. It's useful here for testing purposes only.

hard_reset(gdb)

Define some flows and some relationships:

flow = defined_nodes["flow"]
job  = defined_nodes["job"]

f1 = gdb.add_node(flow(description = "Install neo4j-rest-client"))
f2 = gdb.add_node(flow(description = "pip install neo4jrestclient"))
f3 = gdb.add_node(flow(description = "Install pip"))
f4 = gdb.add_node(flow(description = "sudo apt-get install pip"))

depends = defined_relationships[("flow","depends","flow")]
gdb.add_relationship(depends(f1,f2))
gdb.add_relationship(depends(f2,f3))
gdb.add_relationship(depends(f3,f4))

job_required = defined_relationships[("flow","requires","job")]
developer = gdb.add_node(job(description = "Developer"))
system_admin = gdb.add_node(job(description = "System Admin"))

gdb.add_relationship(job_required(f3,developer,time=0.5))
gdb.add_relationship(job_required(f2,developer,time=0.1))
gdb.add_relationship(job_required(f4,system_admin,time=0.25))

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.