Code Monkey home page Code Monkey logo

goldberg's Introduction

Goldberg

Goldberg is a lightweight Continuous Integration Server that works for any language. It also supports RVM and Bundler for Ruby Projects.

Check out [Goldberg on Goldberg][] to see a live Goldberg server.

Installation

Please refer to INSTALLATION.md. More configuration options are in CONFIGURATION.md

Desktop Notification of Build Status

Goldberg generates feeds that work with all CruiseControl-compatible monitors like CCMenu (mac), BuildNotify (linux) & CCTray (windows). The feed is located in the root and is named cc.xml.

Help

  # To get man page style help
  ./bin/goldberg help [command]

We are nice people, talk to us!

Please add an issue on http://github.com/srushti/goldberg/issues if you find a bug, or reach us through the following channels for any help:

Why Goldberg?

Irony!

Goldberg

goldberg's People

Contributors

aakashd avatar achamian avatar alzeih avatar ariejan avatar arpancj avatar dexterous avatar drewolson avatar gja avatar jasim avatar kaiwren avatar libin avatar lucasefe avatar pahnin avatar preethiramdev avatar professor avatar rohitarondekar avatar srushti avatar suryagaddipati 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

goldberg's Issues

Parallel Builds

If two projects get updated at around the same time Goldberg should be able to run the projects in parallel (or even the parallel steps defined in #65). By default the maximum number of parallel builds should be based on the number of cores, but should be overrideable.

Subversion Support

We need to be able to add projects through subversion. The default should remain git. You configure svn by passing a command line arg (say, --svn) or if the url is svn://...

goldberg should do a bundle install for each project

I would expect that goldberg would do a "bundle install" after pulling the latest from git.

_rvm_reset:14: no matches found: /Users/tsedano/.rvm/bin/default*
_rvm_reset:14: no matches found: /Users/tsedano/.rvm/bin/passenger*
_rvm_reset:14: no matches found: /Users/tsedano/.rvm/bin/editor*
�[31mCould not find activesupport-2.3.4 in any of the sources�[0m
�[31mCould not find activesupport-2.3.4 in any of the sources�[0m

If I do a manual build install in the ~..goldberg/projects/PROJECT/code this goes away.

Support timing out a build

In the even of a build hanging, Goldberg should kill it after a configurable period of time and mark the build as failed, clearly stating that it failed because it hung.

Serial Steps

I should also be able to define steps in the build where one step (or multiple if #65 has already been implemented) has to be run before one (or multiple) other steps. I should be able to specify different configurations for each step.

Error running build if RVM is missing

I don't have RVM installed. When I start the poller, I get the following:

bash: -c: line 0: syntax error near unexpected token `;'
bash: -c: line 0: `( ; cd /root/.goldberg/projects/remindee/code;  (bundle check --no-color || bundle install --no-color) && rake default) 1>>/root/.goldberg/projects/remindee/builds/2/build_log 2>>/root/.goldberg/projects/remindee/builds/2/build_log'

I've only included the relevant part.

If I'm right the first part of this line returns nil: https://github.com/c42/goldberg/blob/master/app/models/build.rb#L58

I think we need to check if it returns nil and build an appropriate command string. What do you think?

undefined method `empty?' for nil:NilClass

I ran into an error trying to force a build on a new project I created. I was able to add the project using bin/goldberg add. After adding the project I launched the app with bin/goldberg start 3001. When I click force build on the project, nothing appears to happen (not sure if that is normal behavior), then when I click the project to see its builds, I get the standard Rails "We're sorry but something went wrong" error. Checking production.log yields the following error:

Started GET "/projects/amigo-master" for 172.16.0.70 at 2011-06-02 10:31:03 -0600
  Processing by ProjectsController#show as HTML
  Parameters: {"project_name"=>"amigo-master"}
Rendered projects/show.html.haml within layouts/application (1.8ms)
Completed   in 4ms

ActionView::Template::Error (undefined method `empty?' for nil:NilClass):
    22:       = @project.name
    23:       %em.project_ruby (#{@project.ruby})
    24:       %strong.project_status= "#{build_status(@build)}"
    25:     - unless @build.artefacts.empty?
    26:       %ul
    27:         Build artefacts
    28:         - @build.artefacts.each do |artefact|
  app/views/projects/show.html.haml:25:in `_app_views_projects_show_html_haml__3906049776127963241_30547500_2133775230302929165'

What is the best way to get around this?

Allow invoking of a different target

Currently, you can only run the default rake target, but you should be able to run a different target, e.g. something else which runs both "db:migrate" & "spec".

bin/goldberg add not adding project

Hi,

When trying to add a github project to Goldberg:

[deploy@li269-181 goldberg]$ bin/goldberg add [email protected]:tfw/ADA-CMS.git ada-cms          
executing /usr/bin/env bash -c "git clone --depth 1 [email protected]:tfw/ADA-CMS.git /home/deploy/.goldberg/projects/ada-cms/code --branch master"
error: unknown option `branch'
usage: git-clone [options] [--] <repo> [<dir>]

    -n, --no-checkout     don't create a checkout
    --bare                create a bare repository
    --naked               create a bare repository
    -l, --local           to clone from a local repository
    --no-hardlinks        don't use local hardlinks, always copy
    -s, --shared          setup as a shared repository
    --template ...        path to the template directory
    -q, --quiet           be quiet
    --reference ...       reference repository
    -o, --origin ...      use <name> instead of 'origin' to track upstream
    -u, --upload-pack ...
                          path to git-upload-pack on the remote
    --depth ...           create a shallow clone of that depth
    --use-separate-remote
                          compatibility, do not use
    --no-separate-remote  compatibility, do not use

ada-cms successfully added.
[deploy@li269-181 goldberg]$ bin/goldberg list
  Project Load (0.8ms)  SELECT "projects".* FROM "projects"

So, the project isn't added successfully - the branch arg isn't recognised - but the response message is that it's successful.

Adding with the -b arg results in the same.

[deploy@li269-181 goldberg]$ bin/goldberg add [email protected]:tfw/ADA-CMS.git ada-cms -b master
executing /usr/bin/env bash -c "git clone --depth 1 [email protected]:tfw/ADA-CMS.git /home/deploy/.goldberg/projects/ada-cms/code --branch master"
error: unknown option `branch'

Metadata/layout for the list of builds

See http://goldberg.c42.in/projects/wrest

  • Move the list to the left column so I don't have to scroll to the bottom of a long build log
  • Colour successes and failures differently - not necessarily the entire line but some part of it
  • Link the SHA of the build to the repository browser if one exists - especially useful for Github projects

Cache the build feed

Repeated queries from CCMenu and other build notifiers shouldn't slow the system to a crawl.

bin/goldberg start broken

Really enjoying this terrific build server yall have been kind enough to release.

Following the setup instructions in the README, I was able to get the server up and working by using rails s to boot Goldberg. If I boot it using bin/goldberg start, pages either never load, or errors are thrown (undefined method clear_active_connections! and an error related to page_cache).

I've tried editing the start script to explicitly use the mongrel server, which is what rails s would use, but it hasn't made any difference. Additionally, the server will sometimes flat-out fail when trying to boot, which results in a goldberg.pid file which must be removed by hand as the stop script doesn't delete it if the process is not found.

Thanks!

OS: Snow Leopard
Using RVM, ruby-1.9.2-p180

Public views

Have a page which can be exposed (without authentication) for public consumption, possibly without check in comments or committers names, just project name & a green or red status.

bundle install fails

I checked the source out, did a bundle install. This failed.

gogo@rnjn ~goldberg(master) >bundle install
Fetching source index for http://rubygems.org/
Using rake (0.9.0)
Using abstract (1.0.0)
Using activesupport (3.0.6)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.6)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.27)
Using actionpack (3.0.6)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.19)
Using actionmailer (3.0.6)
System.java:-2:in arraycopy': java.lang.ArrayIndexOutOfBoundsException from DefaultResolver.java:111:inmakeTime'
from DefaultResolver.java:277:in create' from DefaultResolver.java:317:inhandleScalar'

missing image /images/not_available.png

If you add a new project and goldberg starts a build, we get a missing image warning on the main page.

ActionController::RoutingError (No route matches "/images/not_available.png"):

The code that generates the request is here:

def project_status_image(status)
image_tag (status == 'building' ? "#{status}.gif" : "#{status}.png"), :alt => status, :title => status
end

I have a screenshot if its helpful.

(There's a side issue on why I'm getting this status at all. That may be worth discussing.)

zsh:1: command not found: bundle

I'm looking at my build_log file and here is what I see....

_rvm_reset:14: no matches found: /Users/tsedano/.rvm/bin/default*
_rvm_reset:14: no matches found: /Users/tsedano/.rvm/bin/passenger*
_rvm_reset:14: no matches found: /Users/tsedano/.rvm/bin/editor*
zsh:1: command not found: bundle
zsh:1: command not found: bundle

a) my ~/.rvm/bin directory contains my languages (I don't see passenger, etc in there)
ruby-1.9.2-p180
ruby-1.9.2-p180@goldberg
ruby-1.8.7-p302@rails3
...

b) I'm not sure why zsh is failing to find bundler. Maybe we need to setup zsh to understand about rvm and which ruby to use? Normally I default my entire system to 1.8.7 and I have specific projects use 1.9.2 -- today, I turned off my default rvm and zsh couldn't find bundler.

Any thoughts?

Parallel Steps

I should be able to define a project to run builds of multiple configurations, but still have one status which is an && of the statuses of all the builds. I don't care about the order of the builds.

Ruby version information should be more detailed

The builds page currently looks like wrest (1.9.2) or rspec-mocks (jruby). The ruby version information should be expanded to include

  • the runtime (MRI/YARV/JRUBY/RBX/MacRuby)
  • the version (1.8.6/1.8.7/1.9.2)
  • the patch number (1.9.2-p180)

development database is not configured

Goldberg is working nicely on my development machine. I'm now installing it on my CI machine. (I stole my database.yml file from a cruise control project.) It only had the test database environment defined. It appears that Goldberg also wants the development database configured. I'm guessing we need a RAILS_ENV="test" on one of the rake commands to fix this.

IRC Notifier

Build successes/failures should be postable to IRC. For examples, look at #jruby's logs.

Create a CHANGELOG

Create a CHANGELOG file under root so that supported features/fixed issues are clearly tracked in one place

Rake is not run with bundle exec

I am encountering a simple issue where rake is not run with bundle exec with ruins the purpose of using bundler in the first place. I will attempt to find where the command is run and supply a patch.

The Gemfile's dependencies are satisfied
rake aborted!
You have already activated rspec-core 2.5.2, but your Gemfile requires rspec-core 2.4.0. Consider using bundle exec.
/home/ci/.goldberg/projects/amigo-master/code/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
(in /home/ci/.goldberg/projects/amigo-master/code)

timestamps in local time zone

Although I like how the build timestamps are shown in UTC, I'd like to be able to configure goldberg to show the time in my local time zone. I was tempted to add in this code, but I wasn't sure how the group felt about this item.

Using project-specific goldberg_config.rb causes build to silently fail (no output)

I have tried various incantations of the goldberg_config.rb file, but in every case, when I specify any commands to override (such as ruby= or environment_variables= or even command=), the build will fail without producing any output. However, if I leave the file in place and remove any assignments from the configure block, I get normal build output.

Here are a few sample configs I tried that produced no output on failed builds:

Project.configure do |c|
  c.ruby = '1.9.2-p0'
  c.environment_variables = {'RACK_ENV' => 'test', 'CHARSET' => 'latin1'}
  c.rake_task = 'ci'
end
Project.configure do |c|
  c.ruby = '1.9.2-p0'
  c.environment_variables = {'RACK_ENV' => 'test', 'CHARSET' => 'latin1'}
  c.command = 'bundle exec rake ci'
end
Project.configure do |c|
  c.ruby = '1.9.2-p0'
  c.command = 'bundle exec rake ci'
end
Project.configure do |c|
  c.command = 'bundle exec rake ci'
end

If the file is empty or non-existant, the build produces output normally. Also of note, the poller log produces only a single line of output on failed builds: "Build Failed". No warnings or stack traces are output.

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.