Hudson Plugin 0.1.0

Added by Toshiyuki Ando over 8 years ago

hello.

Redmine Hudson Plugin 0.1.0

What's hudson?

Huson is application for Continuous Integration.
Easy install configuration, and good ui.

More detail Meet Hudson

Features

Show Job List

  • show name, description, latest build ( build number, result, date ) and health report
    • bulid number linked to build result page
  • click [Build Now] request hudson to build
    • can't use authentication
  • Mr. hudson appears ( sorry, not emotional )

Show Build History

click note icon, show build history

  • show build number, result, date
    • bulid number linked to build result page
    • console icon linked to console page

Settings

  • can choose job
  • compact mode
    show only job name and latest build

Todo

  • more emotional
  • use authentication

How To Get

Repository( goolecode )
Download

Demo

You can see this plugin on our site
r-labs Hudson

Tested on Redmine 0.8.3 and current trunk.
Check it out, Any feedback or thoughts on useful features are welcome!

Thanks.

Replies (132)

RE: Hudson Plugin 0.1.0 - Added by Joe Kramer about 8 years ago

Help!

My Hudson is on https URL. After entering URL in Project>Plugin settings I get empty page with "internal server error".

And there's no way to change settings to something else! The settings page is now HTTP 500 error page!
Do I need to edit database directly to get rid of error? What do I need to edit in database?
Or I can run some rake command to reset the plugin?

Here's log output:

Processing HudsonSettingsController#edit (for 59.167.236.234 at 2009-10-28 08:11:07) [PUT]
  Session ID: 7f4215073c557b58810c0416deef6e9d
  Parameters: {"commit"=>"Save", "action"=>"edit", "_method"=>"put", "id"=>"xxxxxx", "settings"=>
{"show_compact"=>"0", "jobs"=>[""], "auth_user"=>"hudson-admin", "url"=>"https://xxxxxx.com/hud", 
"look_and_feel"=>"Hudson", "auth_password"=>"[FILTERED]", "get_build_details"=>"true"}, 
"controller"=>"hudson_settings"}

OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol):
    /usr/lib/ruby/1.8/net/http.rb:586:in `connect'
    /usr/lib/ruby/1.8/net/http.rb:586:in `connect'
    /vendor/plugins/redmine_hudson/app/helpers/hudson_helper.rb:30:in `open_hudson_api'
    /vendor/plugins/redmine_hudson/app/controllers/hudson_settings_controller.rb:120:in `find_hudson_jobs'
    /vendor/plugins/redmine_hudson/app/controllers/hudson_settings_controller.rb:72:in `joblist'
...
    /usr/lib/ruby/1.8/fcgi.rb:609:in `each'
    /usr/lib/ruby/1.8/fcgi.rb:609:in `each_cgi'
    /vendor/rails/railties/lib/fcgi_handler.rb:77:in `process_each_request'
    /vendor/rails/railties/lib/fcgi_handler.rb:76:in `catch'
    /vendor/rails/railties/lib/fcgi_handler.rb:76:in `process_each_request'
    /vendor/rails/railties/lib/fcgi_handler.rb:50:in `process!'
    /vendor/rails/railties/lib/fcgi_handler.rb:24:in `process!'
    /public/dispatch.fcgi:25

Rendering /opt/redmine/public/500.html (500 Internal Server Error)

Use https URL, get empty page with 'internal server error' - Added by Toshiyuki Ando about 8 years ago

Hi, Joe.

I have some question.

1. Which version do you use ?
2. Could you show me a url which you set ? ( you can randomize domain and host name. )

Which column has url setting?

column 'url' on 'hudson_settings'.

Can I reset settings?

Sorry, You can't reset settings using hudson plugin.
You have to edit database.

RE: Hudson Plugin 0.1.0 - Added by Joe Kramer about 8 years ago

Toshiyuki Ando wrote:

Hi, Joe.

I have some question.

1. Which version do you use ?

Redmine 0.8.4.stable (PostgreSQL)

2. Could you show me a url which you set ? ( you can randomize domain and host name. )

Hudson is on https://redmine.domain.com/hud/
Redmine is on https://redmine.domain.com/

Which column has url setting?

column 'url' on 'hudson_settings'.

https://redmine.domain.com/hud/

Can I reset settings?

Sorry, You can't reset settings using hudson plugin.
You have to edit database.

What do I need to edit?

RE: Hudson Plugin 0.1.0 - Added by Joe Kramer about 8 years ago

Please add install instructions!

It took me a lot of time to figure out how to install the plugin.
By reading other plugins documentation i found out that after it's copied to vendor/plugins I need to run "rake db:migratesomething..." in order to make it work.
It's not specified anywhere!

Not every one out there is ruby-on-rails expert. It's probably less than 1% of users.

RE: Hudson Plugin 0.1.0 - Added by Toshiyuki Ando about 8 years ago

Joe Kramer wrote:

Please add install instructions!

Sorry, I forgot to add install instructions.
I fixed this problem next version.

RE: Hudson Plugin 0.1.0 - Added by Eric Schmidt about 8 years ago

Please add install instructions!
I'm a rails newbie and got no idea how to install this plugin.

Until now, i put it in the vendor/plugins dir. What should i do now?

Install Instructions - Added by Toshiyuki Ando about 8 years ago

  1. Copy the plugin into the vendor/plugins directory
  2. Migrate plugin: rake db:migrate_plugins RAILS_ENV=production
  3. Start Redmine.
  4. Enable the module on the project setting page.
  5. Goto Hudson setting page. ( click 'Hudson' tab, then click 'settings' in sidebar )
  6. Edit settings and click save button.
  7. Goto Hudson page. ( click 'Hudson' tab )

Hudson Plugin 1.0.1 released - Added by Toshiyuki Ando about 8 years ago

Plugin details

How to get

New feature

  • You can find jobs built today

Changed

  • Install Instructions (インストール手順の追加)

Fixed bug

  • You never can check off 'Show Compact'
  • Can't get RSS on activity page, when check 'Hudson' box
  • Anonymous can't see acitivity
  • Plugin can't show latest build result

Important reminder

Please use Compatibility View in IE8.

Recommend Hudson 1.313
If you use old version of Hudson, plugin may not get test results and changesets.
Plugin store build information, if plugin can't get test results or changesets.
But, If plugin fail, never get test results, changesets again.

Plugin has no exclusive control, so plugin doesn't work when redmine works on multi-process.
I'll try next version. (toned-down..sorry)

Plugin can get recent build infomation, more than a dozen.
If Hudson has many build infomations, Plugin can't get all. sorry.

Something is wrong with plugin, you should try to delete data from database.
( use 'delete history' button in setting page )

Feature of Hudson 1.0.2 - Added by Toshiyuki Ando about 8 years ago

If you have idea for feature below, let me know your idea.
I will add these feature in the next version.

  • Specifying of the order of jobs
  • Download artifact
  • Automatically update job status

Hudson Plugin 1.0.1 French Translation file - Added by Francois-Xavier CAUVIN about 8 years ago

Here is my french translation file. Thanks for this plugin.

fr.yml Magnifier (2.56 KB)

RE: Hudson Plugin 0.1.0 - Added by Toshiyuki Ando about 8 years ago

Thank you! Francois-Xavier CAUVIN.

Hudson Plugin 1.0.1.1 released - Added by Toshiyuki Ando almost 8 years ago

Plugin details

How to get

New feature

  • French Translation by Francois-Xavier CAUVIN

Changed

None.

Fixed bug

  • "rake db:migrate_plugins" doesn't work without rcov
  • Build job and Build history doesn't work on Redmine 0.8.7

Important reminder (重要な注意事項)

Please use Compatibility View in IE8.

Recommend Hudson 1.313
If you use old version of Hudson, plugin may not get test results and changesets.
Plugin store build information, if plugin can't get test results or changesets.
But, If plugin fail, never get test results, changesets again.

Plugin has no exclusive control, so plugin doesn't work when redmine works on multi-process.
I'll try next version. (toned-down..sorry)

Plugin can get recent build infomation, more than a dozen.
If Hudson has many build infomations, Plugin can't get all. sorry.

Something is wrong with plugin, you should try to delete data from database.
( use 'delete history' button in setting page )

RE: Hudson Plugin 0.1.0 - Added by Lalit Roul almost 8 years ago

hi,
I used the Hudson Plugin 1.0.1.1 in my redmine installations. It works great.
Thanks for the plugin. It really increases the capability of redmine and things we can do with it.

I would though request for a feature. I would also like to know the list of issues which got fixed in a particular build. In my company, we as such do not have a build day in the week - most of the time we give builds to our test team intermittently when we feel a significant number of bugs have been fixed, or when some major issues were fixed. This particular feature can be useful in two ways to us
- just before the test team starts testing on a new build, they know which issues got fixed in a build. currently they verify resolved issues, towards the end or in the immediate build after the issue is fixed.
- for the latest build we can also track the testing progress, this can be done by striking the bugs that are marked "closed" from the list of bugs that were "resolved" for the build.

For the table structure you have, I think it would be possible by using the hudson_build_changesets table. From the 'magic' string present in the revision log message you can find out which issues were resolved. You can list those issues. And if their status has been modified to "closed" you should have that issue item striked in the list. This need not be shown for all builds but for the last successful build. I am not a ruby programmer, but please let me know what you think on this.

Thanks once again.

RE: Hudson Plugin 0.1.0 - Added by Toshiyuki Ando almost 8 years ago

hi, Lalit

Thank you for your request.

I would also like to know the list of issues which got fixed in a particular build.

Good idea.
Redmine has a powerful query for issues.
So I think ...

1) You go to issues page.

2) Hudson plugin adds a filter for query, 'Hudson Job' and 'Hudson Build'

'Hudson Job' is a list box has a job list of Hudson. ( only latest build )

ex.

* Ruby App
* Java App

'Hudson Build' is a text box. You enter build number.
I would like to give alias for 'Last Successful Build', 'Last Failed Build' and 'Last Build'.

3) You select 'Ruby App' And 'Last Successful Build'

4) Redmine shows issues related with Last Successful Build of 'Ruby App'

Does this story meet your request?

RE: Hudson Plugin 0.1.0 - Added by Lalit Roul almost 8 years ago

hi Toshiyuki,

That would be great, I did not realise that redmine had a powerful query for issues. The query thing if it works is just perfect for us. The aliases will also be good. Also wanted to know do you have a mechanism to cleanup the tables in redmine for hudson, since we run builds frequently and also a have a bunch of jobs, we might end up having too many rows(in the db). Or else just like hudson has an option of saying 'Keep last N builds', is there such an option in the redmine plugin.

thanks n regards
Lalit

1) You go to issues page.

2) Hudson plugin adds a filter for query, 'Hudson Job' and 'Hudson Build'

'Hudson Job' is a list box has a job list of Hudson. ( only latest build )

ex.
[...]

'Hudson Build' is a text box. You enter build number.
I would like to give alias for 'Last Successful Build', 'Last Failed Build' and 'Last Build'.

3) You select 'Ruby App' And 'Last Successful Build'

4) Redmine shows issues related with Last Successful Build of 'Ruby App'

Does this story meet your request?

RE: Hudson Plugin 0.1.0 - Added by Robert Gruendler almost 8 years ago

when saving the settings for a project, i get the following exception:

ActiveRecord::RecordInvalid (Validation failed: translation missing: en, field_hudson_job can't be blank):
  vendor/plugins/redmine_hudson/app/models/hudson_job.rb:33:in `after_save'
  vendor/plugins/redmine_hudson/app/controllers/hudson_settings_controller.rb:150:in `add_job'
  vendor/plugins/redmine_hudson/app/controllers/hudson_settings_controller.rb:147:in `each'
  vendor/plugins/redmine_hudson/app/controllers/hudson_settings_controller.rb:147:in `add_job'
  vendor/plugins/redmine_hudson/app/controllers/hudson_settings_controller.rb:33:in `edit'
  /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
  /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
  /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
  /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
  /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
  /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
  /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'

Anyone knows how to solve this?

thanks!

RE: Hudson Plugin 0.1.0 - Added by Toshiyuki Ando almost 8 years ago

Robert Gruendler wrote:

when saving the settings for a project, i get the following exception:

[...]

Anyone knows how to solve this?

Sorry, i fixed this bug.
Get latest source from repository , and try it.

RE: Hudson Plugin 0.1.0 - Added by Robert Gruendler almost 8 years ago

thanks a lot. the update fixed it!

RE: Hudson Plugin 0.1.0 - Added by Robert Gruendler almost 8 years ago

i'm not sure if that's the right place, but i think the redmine plugin for hudson (the other way round...) is also from you.

There seems to be a bug with linking the ticket pages from commit keywords (in the "Changes" section of hudson builds).

The redmine syntax for linking tickets in the Repository browser is "refs #TICKET_NUMBER". The redmine plugin in hudson recognizes those keywords and links them to redmine correctly, but it doesn't remove the "#", so redmine throws a 404.

So instead of http://myredmineProject/show/issue/200, the generated url looks like http://myredmineProject/issue/show/#200.

Am i missing something here or is this a bug ?

Anyway, thanks for those really neat plugins!

RE: Hudson Plugin 0.1.0 - Added by Toshiyuki Ando almost 8 years ago

Robert Gruendler wrote:

i'm not sure if that's the right place, but i think the redmine plugin for hudson (the other way round...) is also from you.
Anyway, thanks for those really neat plugins!

It doesn't matter to my plugin.
But, my friend fixed this bug.

Try following.

redmine.hpi - fixed ticket link problem

RE: Hudson Plugin 0.1.0 - Added by Robert Gruendler almost 8 years ago

thanks again, tue update fixed it.

RE: Hudson Plugin 0.1.0 - Added by Brian Jensen almost 8 years ago

Hi,

I have a problem with the the plugin parsing changesets. I use mercurial as SCM for all my jobs, I am wondering if maybe this is the problem? On the pages of my hudson builds the changesets are listed in any case, so I know that hudson has recorded the changesets. Its weird because the plugin parses test results and build status correctly.

Is there anyway I can see what the problem is?

I am using hudson 1.340 and your hudson plugin version 1.0.1.1. If you need any more info from me just let me know.

thanks,
Brian

RE: Hudson Plugin 0.1.0 - Added by Toshiyuki Ando almost 8 years ago

Hi Brian.

Sorry i didn't test on mercurial. only subversion.

Could you give me a xml?
Uri is http://{{url.to.your.hudson}}/job/{{job.name}}/api/xml?depth=1

It's too long to paste to here. so use attach file.
If you can't, you can send e-mail to me.

RE: Hudson Plugin 0.1.0 - Added by Brian Jensen almost 8 years ago

Hi,

I have sent you an email with two sample xml files with changesets in them. I hope this helps.

RE: Hudson Plugin 0.1.0 - Added by Toshiyuki Ando almost 8 years ago

I see.

My plugin needs following response.

<changeSet>
  <revision>29</revision>
</changeSet>

but Your hudson's response is

<changeSet>
  <rev>29</rev>
</changeSet>

So, my plugin can't get revison information. ( expected 'revision', but actually 'rev' )
I don't know this problem caused by mercurial or hudson 1.340.

I fixed this problem in trunk
If you can, try 1.0.2

1 2 3 4 5 6 (51-75/132)