github integration issue

22 views
Skip to first unread message

pe...@rais.io

unread,
May 20, 2015, 7:19:09 AM5/20/15
to jenkins...@googlegroups.com
Hi

This is my first time setting up jenkins. Using 1.613

Simple task is to pull latest version of master from github when building a job. 

I am using:

GIT client plugin v 1.17.1
GIT plugin v 2.3.5

The problem: jenkins "talks" to github ok BUT it checks out a very very old version (last commit on the first day of the repository), not the latest version, i'm assuming its a simple config error but after many hours i'm stumped so hoping someone can help.

Git configuration in attached screenshot.

Console output:

Building in workspace /var/lib/jenkins/workspace/rais
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url ssh://g...@github.com/xxxxx/xxx.git # timeout=10
Fetching upstream changes from ssh://g...@github.com/xxxxx/xxx.git
 > git --version # timeout=10
 > git fetch --tags --progress ssh://g...@github.com/xxxxx/xxx.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 9d4fd82b50276e4b5a287a91caad1b2f28885c8d (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 9d4fd82b50276e4b5a287a91caad1b2f28885c8d
 > git rev-list 9d4fd82b50276e4b5a287a91caad1b2f28885c8d # timeout=10


"9d4fd82b50276e4b5a287a91caad1b2f28885c8d " is a commit from several months ago.




jenkins_git.PNG

Mark Waite

unread,
May 20, 2015, 8:29:26 AM5/20/15
to jenkins...@googlegroups.com
I think that log is showing that the workspace repository has a remote named "origin" (the default) and that remote has a branch named "master" and "git rev-parse" command in that workspace repository reports that origin/master or origin/origin/master points to commit 9d4fd82b5...  Assuming it is origin/master, that seems correct to me.

The "Checking out Revision" message hints to me that the repository origin/master points to 9d4fd82b5.  That seems correct to me.

You might check that you don't have a branch named origin, or a branch named origin/master in your GitHub repository, just in case that is somehow confusing the code which determines what branch to build.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0a0929df-6f8e-424d-a1cf-24a5569f755e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pe...@rais.io

unread,
May 20, 2015, 10:40:42 AM5/20/15
to jenkins...@googlegroups.com
Thanks Mark

It turns out its because I'm an idiot:)

I had setup a repository on a different account with the same name and then later migrated it to where we have actually put all the commits. My original setup used the old account, switching to the one we actually used had a much better result.

Thanks for your help.

Reply all
Reply to author
Forward
0 new messages