Giter Club home page Giter Club logo

uberalls's Introduction

uberalls Build Status Coverage Status

Code coverage metric storage service. Provide coverage metrics on differentials with Phabricator and Jenkins, just like Coveralls does for GitHub and TravisCI.

Running

Configure your database by editing config/default.json or specify a different file by passing an UBERALLS_CONFIG environment variable. The development and test runs use a SQLite database.

If you'd like to use MySQL, you could use the following configuration:

{
  "dbType": "mysql",
  "dbLocation": "user:password@/dbname?charset=utf8",
  "listenPort": 8080,
  "listenAddress": "0.0.0.0"
}

Jenkins integration

Uberalls works best when paired with our Phabricator Jenkins Plugin, which will record Cobertura data on master runs, and compare coverage to the base revision on differentials.

Jenkins Integration

On differentials, the delta in coverage is calculated by taking the base commit (from conduit metadata) and comparing that to the current coverage amount.

In order to have a baseline to compare against, you must also have jenkins build your project on your mainline branch ("master" by default). You can either create a separate job, or enable SCM polling under Build Triggers:

scm polling

Development

Get the source

go get github.com/uber/uberalls

Install Glide and dependencies

cd $GOPATH/src/github.com/uber/uberalls
go get github.com/Masterminds/glide
glide install

Run the thing

go build && ./uberalls

Run the tests

go test .

License

MIT Licensed

uberalls's People

Contributors

ascandella avatar michaeluber avatar ruoranwang avatar thecadams 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  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  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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uberalls's Issues

How to install

I must be missing it. How do I install this? Should it be on the same server as Jenkins?

Iโ€™m really excited to start using it!

Cannot build on go 1.7

With go 1.7 I'm getting the following results:

hello@foo:~$ go get github.com/uber/uberalls
# github.com/uber/uberalls
go/src/github.com/uber/uberalls/config.go:65: cannot use &newdb (type **gorm.DB) as type *gorm.DB in assignment

me@BUG-PHAB:~$ cd $GOPATH/src/github.com/uber/uberalls
me@BUG-PHAB:~/go/src/github.com/uber/uberalls$ go get github.com/tools/godep
me@BUG-PHAB:~/go/src/github.com/uber/uberalls$ godep restore
godep: open Godeps/Godeps.json: no such file or directory

me@BUG-PHAB:~/go/src/github.com/uber/uberalls$ go build
# github.com/uber/uberalls
./config.go:65: cannot use &newdb (type **gorm.DB) as type *gorm.DB in assignment
me@BUG-PHAB:~/go/src/github.com/uber/uberalls$

Any ideas on what I'm doing wrong?

Proper setup guide?

So I've been trying to set up this, my steps as follow

go get github.com/uber/uberalls
cd $GOPATH/src/github.com/uber/uberalls
go get github.com/tools/godep
godep restore
go build && ./uberalls

The app starts successfully and listens to 14740 and use sqlite in this case. Then I set the location of the uberalls instance to a local ip address, let's say 192.168.1.100:14740 in Jenkins, and did a baseline run building on the trunk (master in this case). Up til this setp everyting works fine and Jenkins sends non-diff to phabricator (e.g. [phabricator:non-differential] Sending coverage result).

But when I started another differential build, I got the following errors:

java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at java.net.Socket.connect(Socket.java:538)
    at java.net.Socket.<init>(Socket.java:434)
    at java.net.Socket.<init>(Socket.java:211)
    at hudson.util.NoClientBindProtocolSocketFactory.createSocket(NoClientBindProtocolSocketFactory.java:105)
    at hudson.util.NoClientBindProtocolSocketFactory.createSocket(NoClientBindProtocolSocketFactory.java:90)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at com.uber.jenkins.phabricator.uberalls.UberallsClient.getCoverage(UberallsClient.java:150)
    at com.uber.jenkins.phabricator.uberalls.UberallsClient.getParentCoverage(UberallsClient.java:75)
    at com.uber.jenkins.phabricator.BuildResultProcessor.processParentCoverage(BuildResultProcessor.java:85)
    at com.uber.jenkins.phabricator.PhabricatorNotifier.perform(PhabricatorNotifier.java:159)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
    at hudson.model.Run.execute(Run.java:1763)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
[phabricator:uberalls] unable to find coverage for parent commit
[phabricator:process-build-result] No unit results available.

I've also tried different protocals for the location instance, e.g. with and without http://, with or without port number, but so far no luck.

Could you shed some light on this?

Lines of Code

I'd like to see a LOC count in the coverage database. That way, we can do a weighted coverage report over many projects. Maybe I'll work on this.

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.