github / janky

Continuous integration server built on top of Jenkins and Hubot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Janky Front-end doesn't have build info

bhardin opened this issue · comments

We recently moved our jenkins server to a different IP and changed the DNS record accordingly.

All of the setup, build, and room command work and don't report errors. However, the front end interface only has old build data and not the new build data that is present on the new jenkins server.

I took a shot and thought it was something with the inititial db creation. So I rotated Janky to a different server and reset it up. Still having the same problem. Hubot is pushing the build to Jenkins and Jenkins successfully runs, but the Janky web interface is blank. The room notifications aren't coming back either.

When running hubot ci status returns no build information.

You need to run hubot ci setup build-name for all of your builds after changing the address of your Janky install. This is because jobs on Jenkins are named using a MD5 of the build's name, repo url, config and Janky address. See Janky::Repository#job_name.

hubot ci setup build-name has already been run... Hubot responds back with it being setup and Jenkins shows the new repo with MD5 hash... but the front-end does not show any data.

This has something to do with the build status not getting populated into the db. Everything I track down comes down to a database lookup. Maybe somewhere in here: https://github.com/github/janky/blob/master/lib/janky/build.rb#L44

What happens when you push to a repo? Are you seeing a new build on Jenkins?

Yes. When I push to a repo, Jenkins kicks off the builds and successfully completes them. However, Janky doesn't show any data.

I don't have permission to reopen this issue.

Any word on this? Can I jump on IRC with you to help fix? I would love to get this working. Hubot is very sad.

I'm seeing this, too. If I run ruby to list the Build objects from the DB, they all have started_at of nil. I can verify that asking for a build (ci build whatever) creates a new row in the DB, but the started_at is nil. And Jenkins runs the build to completion, but there completed_at is also never updated (or any other field). I dug around in the gem source, but didn't see where these things are expected to be updated. Help?

Please try upgrading to 0.9.13.

I'm experiencing the exact same issue on 0.9.13. Any idea?

I'm reopening this, but we will need more detail on this to dig in. @luisobo did you run hubot ci setup build-name for your instance? Are you seeing jobs created in Jenkins?

Yes, I run setup. Yes, there are running jobs in Jenkins.
I updated to master and I still have the problem.
I cleared the janky db and recreated the jobs and still nothing.

the setup works
building works
push-to-build works

status reports "no build" for every project
status project-name doesn't respond (the api returns and empty array)

maybe unrelated: the commit status thing doesn't work either.

More info (just in case):
The default template for the Jenkins job doesn't configure the variable "JANKY_BRANCH" which it to fail upon build trigger. Workaround: go to jenkins and add the variable. Solution: update the Janky default template.
The default project restricts the build to nodes tagged as "master" which doesn't work for our thing. Workaround: change the tag manually. Solution: Create my own Jenkins configuration.

Hope it helps. Thanks for reopening this.

  • Luis

Ah, I added a note to the README about the JANKY_BRANCH ... we need a better solution for the job stuff. Probably should be an example xml file just kept in this repo.

The JANKY_BRANCH problem is unrelated, I still have the problem. This is still a legit issue.

More info: we are using CloudBees but they claim compatibility.

Have you check /configure on your Jenkins server? The Jenkins URL needs to
be setotherwise output doesn't show up. Check logs for a context dump
mixed I'm with a time out error.

On Thursday, December 13, 2012, Luis Solano wrote:

More info: we are using CloudBees but they claim compatibilityhttp://blog.cloudbees.com/2011/12/devcloud-meets-github-janky.html.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-11341455.

Riley Guerin
(310) 431-6240 :M
(213) 229-5466 :O

sorry, I don't understand. If I go to "#{my_jenkins_url}/configure" I see the configuration of my Jenkins instance. Where does it need to be set?

In the Janky DB there are no URLs for any builds.

In the logs, both Janky and Jenkins, there is nothing wrong apparently.

😞 we don't have that option in our Jenkins. we're using CloudBees.

I have to imagine that they auto-configure it by default and hide the option

Is there a timeout error in your logs by any chance? It should come right after the app handles a POST to _builder

no request to _builder at all

only _github and _hubot.

Confirmed: JENKINS_URL is set properly

should look something like this if you initiate with `ci build abc/master'

heroku[router]: at=info method=POST path=/_hubot/abc/master?room_id=development&user=REDA host=REDA.herokuapp.com fwd=107.21.69.185 dyno=web.1 queue=0 wait=0ms connect=5ms service=2060ms status=201 bytes=22
heroku[router]: at=info method=POST path=/_builder host=REDA.herokuapp.com fwd=192.155.80.141 dyno=web.1 queue=0 wait=0ms connect=5ms service=18ms status=201 bytes=2
heroku[router]: at=info method=POST path=/_builder host=REDA.herokuapp.com fwd=192.155.80.141 dyno=web.1 queue=0 wait=0ms connect=2ms service=5ms status=400 bytes=11
heroku[router]: at=info method=POST path=/_builder host=REDA.herokuapp.com fwd=192.155.80.141 dyno=web.1 queue=0 wait=0ms connect=3ms service=560ms status=201 bytes=2

Nothing like that. Only POSTs to _github and a few _hubot

Try opening logs, hit enter a few times, initiate a build with hubot like I did above then paste the logs here

Having this same issue.

When running hubot ci build <name>/<branch>, the build in jenkins is triggered, the build starts, completes, and passes. However, when I run

heroku pg:psql
...
select * from builds;

The outputted rows have started_at and completed_at set to nil. The build never gets past the queued phase.

Running the latest janky from GitHub (0.9.14), as well as Jenkins 1.427 (as specified by the README)