true,

git plugin build in detached head as it can support commits from various
branches

Le dimanche 21 juillet 2013, Vincent Latombe a écrit :

> Hi,
>
> I do believe it is actually a feature. Let me explain why.
>
> Unlike most SCM plugins in Jenkins, the Git plugin allows to track all
> branches on the remote repositories, and to build any new commit that
> happens in any branch. It can be useful if you want to check your feature
> branches without creating a new job each time.
>
> The name of the field in configuration is *Branches to build*, so it
> isn't meant to contain the name of only *one* branch.
>
> In a simple CI scenario, it isn't necessary to create a local branch to
> build, since it is enough to use a detached head pointing to the commit
> selected to build.
>
> If what you want is to actually modify a branch, it is perfectly possible
> to do so, by using *Checkout/merge to local branch (optional)* (you can
> find it in the advanced section :s)
> Here, you just need to give a branch name, and a local branch with that
> name will be created pointing to the commit selected for building.
>
> Beware, if you gave a pattern in *Branches to build* that is matching
> several branches, it might be counter-intuitive (having local *master *branch
> that is pointing to *origin/unstable-experiment* isn't really what you
> want)
>
> I use this with the M2 Release plugin and have no problem releasing.
>
> Vincent
>
>
> 2013/7/21 Christoph Kutzinski <ku...@gmx.de <javascript:_e({}, 'cvml',
> 'ku...@gmx.de');>>:
> > Cannot say, why it is so, but I agree that it feels like a bug.
> >
> > I had no luck to get the M2 Release Plugin working with the git plugin at
> > all - even after following several advises found by googling for the
> > problem. I have now a freestyle job which does
> > git clone repo; mvn release:prepare release:perform
> >
> > Why is the git plugin making that so difficult?
> >
> >
> > Christoph
> >
> > Am 21.07.2013 08:45, schrieb domi:
> >>
> >> Hi everyone,
> >>
> >> is there a specific reason why the git-plugin does not checkout or
> >> change to an active branch?
> >>
> >> When I go to the workspace and check the git status, it tells me that we
> >> currently do not stay on any branch:
> >>
> >> elongatus:free domi$ *git status*
> >> *# Not currently on any branch.*
> >>
> >> nothing to commit (working directory clean)
> >> elongatus:free domi$ *git branch*
> >> ** (no branch)*
> >>
> >>    master
> >>
> >> Because of this, In every job I have to do this to stay on a real
> >> branch, otherwise the maven-release-plguin will not be able to do a
> >> release build.
> >> git checkout master || git checkout -b master
> >> git reset --hard origin/master
> >>
> >> So to me this feels more like a bug, but maybe there is a reason behind
> >> this?
> >>
> >> /Domi
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Jenkins Developers" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> >> an email to jenkinsci-dev+unsubscr...@googlegroups.com<javascript:_e({}, 
> >> 'cvml', 'jenkinsci-dev%2bunsubscr...@googlegroups.com');>
> .
> >> For more options, visit https://groups.google.com/groups/opt_out.
> >>
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Jenkins Developers" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to jenkinsci-dev+unsubscr...@googlegroups.com <javascript:_e({},
> 'cvml', 'jenkinsci-dev%2bunsubscr...@googlegroups.com');>.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-dev+unsubscr...@googlegroups.com <javascript:_e({},
> 'cvml', 'jenkinsci-dev%2bunsubscr...@googlegroups.com');>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to