Coder Social home page Coder Social logo

ryankee / concrete Goto Github PK

View Code? Open in Web Editor NEW
495.0 16.0 96.0 1.73 MB

Simple continuous integration server written with NodeJS and CoffeeScript

Home Page: http://ryankee.github.com/concrete

License: MIT License

CoffeeScript 6.90% JavaScript 5.81% HTML 85.52% CSS 1.77%

concrete's Introduction

Concrete

Concrete is a minimalistic Continuous Integration server.

concrete

Note: I don't have a lot of time to maintain, so I'm looking for folks who'd like to contribute. Post an issue if you'd like to toss some time towards new features, issues, or pull requests.

Quickstart

Note: This project requires a MongoDB instance

npm install -g concrete
git clone git://github.com/you/yourrepo.git
cd yourrepo
git config --add concrete.runner "coffee test/unit.coffee"
concrete .
open http://localhost:4567

Usage

Usage: concrete [-hpv] path_to_git_repo

Options:
  -h, --host     The hostname or ip of the host to bind to  [default: "0.0.0.0"]
  -p, --port     The port to listen on                      [default: 4567]
  --help         Show this message
  -v, --version  Show version

Setting the test runner

git config --add concrete.runner "coffee test/unit.coffee"

Setting the branch

git config --add concrete.branch deploy

Adding HTTP Basic authentication

git config --add concrete.user username
git config --add concrete.pass password

Post build

After building Concrete will run .git/hooks/build-failed or .git/hooks/build-worked depending on test outcome. Like all git hooks, they're just shell scripts so put whatever you want in there.

Concrete is heavily inspired by CI Joe

concrete's People

Contributors

davekaro avatar jfhbrook avatar joefiorini avatar josegonzalez avatar orpheuslummis avatar rclark72 avatar ryankee avatar sfarthin avatar werehamster 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

concrete's Issues

Restyling the dashboard a little

Been playing with concrete today, and I love the simplicity. I thought the dash was a little lacking, so I've added some stuff. If people like it I'll tidy it up and submit a pull request:

Changes:

  • Relative dates/times, and moved the job date to a tab that isn't repeated for every job that was run on the same day
  • Added the sha/message/date of the commit that the job was run against
  • decreased emphasis on the job_id (that's in mongo) not sure why it's important (if at all)

Anyway, here's a quick screengrab.

Dashboard (see full size)

Let me know what you think!

GITHUB hooks support

Is there an easy way to trigger a build when a repo has been pushed to in github

incorrect order/display when refreshing page immediately after build

If a build the project, then refresh the page, the currently building item is listed in the incorrect order.

I'm not sure exactly what is causing this, but I'll attach a screenshot for reference. I think this may have started occurring when I killed the concrete server prematurely while a build was in process.

screenshot

Access online

I have a public facing application setup which allows access to port 443 and another on 80 (which re-directs). Since I only have a CentOS server, I can't open localhost:4567 instead, I want to bind it so I can access it via my domain.

I've tried setting the host to 127.0.0.1 and localhost but I can't access online still. Ideas?

Basic Auth is not working

I followed the instructions and added user / pass to git conf however basic auth is not implemented. Is there something I'm missing? I don't see where the user and pass are even being extracted from the git conf in git.js. What am I missing?

Failed MongoDB connection needs a proper error message

If you try to run Concrete without MongoDB available, it fails with the following:

$ concrete -h 127.0.0.1 .
Concrete listening on port 4567 with host 127.0.0.1
{ stack: [Getter/Setter],
  arguments: undefined,
  type: undefined,
  message: 'ECONNREFUSED, Connection refused',
  errno: 111,
  code: 'ECONNREFUSED',
  syscall: 'connect' }

It would be better to exit the process with error message Failed connecting to MongoDB or something similar.

coupled to git

it would be great if this was not coupled to git, maybe just provide --run "make test" etc

Ability to display badge like Travis CI

Would it be possible to have a badge in the repo's README.md (like Travis-CI projects do) that displays the build status? How hard would that be to implement? I could try to write a pull request.

Broken when building

As you can see, when I click build, or a commit is pushed, Concrete doesn't show anything for it.

8blU

When I visit the JSON for the job, this is what I see

{"addedTime":1365419596679,"log":"","running":false,"finished":false,"_id":"5162a64ca26d65ae77000004"}

i'd like to contribute to concrete

looking at the "age of issues", i would like to know, how can i proceed with this.

as you said: Note: I don't have a lot of time to maintain, so I'm looking for folks who'd like to contribute. Post an issue if you'd like to toss some time towards new features, issues, or pull requests.

do let me know what you think ..

Error: database names cannot contain the character '.'

Following the quickstart in the README I get the following error:

$ concrete .
path.exists is now called `fs.exists`.

/usr/local/lib/node_modules/concrete/node_modules/mongodb/lib/mongodb/db.js:216
    if(databaseName.indexOf(invalidChars[i]) != -1) throw new Error("database 
                                                          ^
Error: database names cannot contain the character '.'
    at validateDatabaseName (/usr/local/lib/node_modules/concrete/node_modules/mongodb/lib/mongodb/db.js:216:59)
    at new Db (/usr/local/lib/node_modules/concrete/node_modules/mongodb/lib/mongodb/db.js:77:3)
    at Object.<anonymous> (/usr/local/lib/node_modules/concrete/lib/jobs.js:5:8)
    at Object.<anonymous> (/usr/local/lib/node_modules/concrete/lib/jobs.js:144:4)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)

Template Error

Getting the following error when running concrete .:

Express

500 TemplateError: Error rendering /home/brian/.node_libraries/.npm/concrete/0.0.2/package/lib/views/index.coffee: Cannot read property 'length' of null

at Object. (/home/brian/.node_libraries/.npm/coffeekup/0.3.1/package/lib/coffeekup.js:404:21)
at ServerResponse._render (/home/brian/.node_libraries/.npm/express/2.4.7/package/lib/view.js:422:21)
at ServerResponse.render (/home/brian/.node_libraries/.npm/express/2.4.7/package/lib/view.js:315:17)
at /home/brian/.node_libraries/.npm/concrete/0.0.2/package/lib/server.js:52:18
at /home/brian/.node_libraries/.npm/concrete/0.0.2/package/lib/jobs.js:138:18
at /home/brian/.node_libraries/.npm/mongodb/0.9.7-1.4/package/lib/mongodb/cursor.js:126:30
at /home/brian/.node_libraries/.npm/mongodb/0.9.7-1.4/package/lib/mongodb/cursor.js:170:32
at /home/brian/.node_libraries/.npm/mongodb/0.9.7-1.4/package/lib/mongodb/cursor.js:465:48
at /home/brian/.node_libraries/.npm/mongodb/0.9.7-1.4/package/lib/mongodb/db.js:839:11
at [object Object].close (/home/brian/.node_libraries/.npm/mongodb/0.9.7-1.4/package/lib/mongodb/connection/server.js:75:38)

Error: No compatible version found: express@'>=2.4.0- <2.5.0-'

Looks like anything under Express 2.5.0 is in the 1.x range.

npm ERR! Valid install targets:
npm ERR! ["0.14.0","0.14.1","1.0.0beta","1.0.0beta2","1.0.0rc","1.0.0rc2","1.0.0rc3","1.0.0rc4","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","2.5.0","2.5.1","2.5.2"]

Please fix. :)

Remove dependency on MongoDB

MongoDB is nice and all, but it's a bit overkill for a minimalistic CI server. (IIRC, by default a MongoDB installation uses at least 3 GB of disk, which can be a problem if you want to run builds on a really cheap VPS.)

I'm proposing adding a setting for what storage to use, and add the possibility to save to the file system instead without using a database server. It could use a GDB database or be just as simple as storing everything in a JSON file.

I've done some work in this direction already, so I'm probing the interest in a pull request here.

Contributor

I'd like to contribute. I've been looking for a simple CI environment and this fits the bill, can definitely help out.

Scheduling & Examples

Is there a mechanism to schedule job runs? I'd like to test a repo nightly, new commits or no.

I whipped up some asphault to try concrete but I'm wondering - are there any advanced examples to look at?

Wrong path used for hooks

I'm not really familiar with the path module (or node in general) but it seems the paths like git.success are not getting expanded correctly in my situation.

I have a project called metric at ~/projects/metric. When I run concrete from within ~/projects it is trying to execute metric/.git/hooks/build-worked'instead of /Users/username/projects/metric/.git/hooks/build-worked

Let me know if you require more information!

oauth / simple HTTP auth

Would be nice just to put a password so can have concrete running on a public webserver,

Ideally oauth would be cool, so you can login from a github organisation.

I beleive janky implements this, and so the code may be reusable.

License missing

I don't see a license for your code. Can you please add 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.