Hello Mark,
After looking at your third suggestion, we realized that the fetch and
checkout is occurring in the job's *workspace* instead of the directory
where the repo is stored. Is it possible to change the directory where the
git plugin works prior to fetching? I tried adding a shell command to
switch directories to where the repo is stored as one of the build steps
(right before the ant build) but that shell command is executed *after *git
has already checked out in the workspace of the job. Can I add arbitrary
commands before the plugin starts executing?
On Wednesday, September 10, 2014 4:43:04 PM UTC-4, polarice wrote:
>
> I have the git plugin installed and configured for one of my jobs. When I
> build the job, I expect it to pull the latest changes for the branch I
> specify and *then* continue with the rest of the build process (e.g.,
> unit tests, etc.).
>
> When I look at the console output, I see
>
> > git fetch --tags --progress ssh://gerrit@git-dev/Util
> +refs/heads/*:refs/remotes/origin/*
> > git rev-parse origin/some_branch^{commit}
> Checking out Revision <latest_SHA1> (origin/some_branch)
> > git config core.sparsecheckout
> > git checkout -f <latest_SHA1>
> > git rev-list <latest_SHA1>
>
>
> I see that the plugin fetches and checks out the proper commit hash, but when
> the tests run it seems as though the repo wasn't updated at all.
> If I go into the repository in Jenkins, I see there that the latest changes
> were never pulled. Why is this plugin behaving this way?
>
> *Shouldn't it pull before it tries to build?*
>
> I have git 1.8.5 installed on my Jenkins machine, which is a recommended
> version.
> https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.