srushti / goldberg Goto Github PK
View Code? Open in Web Editor NEWGoldberg is a lightweight CI server written in Ruby which worries about Bundler & RVM so that you don't have to.
License: Other
Goldberg is a lightweight CI server written in Ruby which worries about Bundler & RVM so that you don't have to.
License: Other
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.
Provide a build status badge which can be embedded in READMEs etc. See the README of VCR for an example.
I should be able to configure the setting of environment variables for the build process as part of the project config. This would allow me to, for example, set SPEC="--profile"
on my build so that rspec prints build stats.
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?
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.
Each build log should be prefixed with the following information:
ruby -v
See any of the project pages at http://golberg.c42.in
Goldberg seems to be deleting the Gemfile.lock even if it is versioned. https://gist.github.com/fa4eb6cc16d0ced1c0c2
Provide a mechanism (say, a pre-determined folder) that a build must do to expose build artefacts to the end user.
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.
This is a feature request
I'd like to configure goldberg to use rcov on my specs.
Running http://rubygems.org/gems/metrical or metrics_fu is a bonus.
This is a feature request
I'd like to configure goldberg.yml to use gmail to send out the "build failed" or "build succeeded" email. I would expect an email every time the build failed and one email when it started to succeed again.
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?
Check if there exists a Gemfile (and possibly a versioned Gemfile.lock) and if there are changes bundle install before running the build.
Repeated queries from CCMenu and other build notifiers shouldn't slow the system to a crawl.
Runtimes that need to be added to http://goldberg.c42.in :
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?
... possibly through the use of a goldberg_settings.rb or some such that gets checked in.
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
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.
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.
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'
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.
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.
I should be able to specify (in the project config?) that the build should use a certain branch
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:in
makeTime'
from DefaultResolver.java:277:in create' from DefaultResolver.java:317:in
handleScalar'
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.
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)
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.)
Goldberg assumes there is an existing build for every project, and so would be failing for a new project till at least one build is started.
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.
The builds page currently looks like wrest (1.9.2)
or rspec-mocks (jruby)
. The ruby version information should be expanded to include
See http://goldberg.c42.in/projects/wrest
Create a CHANGELOG file under root so that supported features/fixed issues are clearly tracked in one place
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".
Currently, a forced build doesn't do an update before running the build.
Can whoever that has access add the rspec-core project, running on JRuby 1.6.0 to http://goldberg.c42.in ?
The github url is https://github.com/rspec/rspec-core
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://...
Build successes/failures should be postable to IRC. For examples, look at #jruby's logs.
bin/goldberg add xyz xyz
will create an entry in Projects even though the clone was not successful. The web UI also fails to load and silently fails after this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.