Integration Jenkins & BitBucket

58 views
Skip to first unread message

Stefano

unread,
Nov 4, 2015, 2:15:29 PM11/4/15
to Jenkins Users
Hi, it's possible that Jenkins read the messages committed on BitBucket and every time found a specific string on commit message, it start a build?

Kristof Meixner

unread,
Nov 4, 2015, 5:42:33 PM11/4/15
to Jenkins Users
Hi!

Why would you make it dependent on the commit message?

There is a integration plugin that triggers a build on every change in the repository which might help you. There is also a plugin for pull requests that builds pull requests that triggers builds when you post a specific comment to the pull request.

Regards,
Kristof

Mark Waite

unread,
Nov 4, 2015, 5:46:07 PM11/4/15
to Jenkins Users
The git plugin has an Additional Behavior which allows it to ignore commits unless they include specific text.  Since bitbucket is a git repository, you should be able to use the git plugin to do that.

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/47debf02-d51c-47e5-89c2-8080b8f1d8bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stefano Cognigni

unread,
Nov 5, 2015, 9:52:58 AM11/5/15
to jenkins...@googlegroups.com
OK, it seems to work with git plugin, thanks.
Now, how can set the build start after specific commit?
I have tried with config to image:

http://s24.postimg.org/7hp7y5zxh/Fire_Shot_Capture_29_test_Config_Jenkins_ht.png

I would when commit message contain "FOO", make a build, but i don't
undestand if i make a webhook to bitbucket or not.
With this configuration any commit i push, don't start a build

Il 04/11/2015 18:45, Mark Waite ha scritto:
> The git plugin has an Additional Behavior which allows it to ignore
> commits unless they include specific text. Since bitbucket is a git
> repository, you should be able to use the git plugin to do that.
>
> Mark Waite
>
> On Wed, Nov 4, 2015 at 10:42 AM Kristof Meixner
> <kristof...@fatlenny.net <mailto:kristof...@fatlenny.net>> wrote:
>
> Hi!
>
> Why would you make it dependent on the commit message?
>
> There is a integration plugin that triggers a build on every change
> in the repository which might help you. There is also a plugin for
> pull requests that builds pull requests that triggers builds when
> you post a specific comment to the pull request.
>
> Regards,
> Kristof
>
>
> On Wednesday, 4 November 2015 15:15:29 UTC+1, Stefano wrote:
>
> Hi, it's possible that Jenkins read the messages committed on
> BitBucket and every time found a specific string on commit
> message, it start a build?
>
> --
> 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
> <mailto:jenkinsci-use...@googlegroups.com>.
> <https://groups.google.com/d/msgid/jenkinsci-users/47debf02-d51c-47e5-89c2-8080b8f1d8bb%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/R1kI8APtPvA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-use...@googlegroups.com
> <mailto:jenkinsci-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEkY6rdvTTsqCBkawqv9%2Bd1Upk9qQ8N9o0yGXjK-a1Efw%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEkY6rdvTTsqCBkawqv9%2Bd1Upk9qQ8N9o0yGXjK-a1Efw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Mark Waite

unread,
Nov 5, 2015, 11:47:20 PM11/5/15
to jenkins...@googlegroups.com
Your picture seems to show that you're not polling the repository.  I'd first test your sample job with a defined polling interval to confirm it behaves as expected with a polling interval.  Once you've confirmed that it ignores commits when you want, and honors them when you want, then you can experiment with webhooks.

Mark Waite


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/563B26F2.9000006%40gmail.com.

Stefano Cognigni

unread,
Nov 6, 2015, 10:23:17 AM11/6/15
to jenkins...@googlegroups.com
Thanks, i've resolved with "Commit Message Trigger Plugin"

Il 06/11/2015 00:47, Mark Waite ha scritto:
> Your picture seems to show that you're not polling the repository. I'd
> first test your sample job with a defined polling interval to confirm it
> behaves as expected with a polling interval. Once you've confirmed that
> it ignores commits when you want, and honors them when you want, then
> you can experiment with webhooks.
>
> Mark Waite
>
>
> On Thu, Nov 5, 2015 at 2:52 AM Stefano Cognigni
> <stefano....@gmail.com <mailto:stefano....@gmail.com>> wrote:
>
> OK, it seems to work with git plugin, thanks.
> Now, how can set the build start after specific commit?
> I have tried with config to image:
>
> http://s24.postimg.org/7hp7y5zxh/Fire_Shot_Capture_29_test_Config_Jenkins_ht.png
>
> I would when commit message contain "FOO", make a build, but i don't
> undestand if i make a webhook to bitbucket or not.
> With this configuration any commit i push, don't start a build
>
> Il 04/11/2015 18:45, Mark Waite ha scritto:
> > The git plugin has an Additional Behavior which allows it to ignore
> > commits unless they include specific text. Since bitbucket is a git
> > repository, you should be able to use the git plugin to do that.
> >
> > Mark Waite
> >
> > On Wed, Nov 4, 2015 at 10:42 AM Kristof Meixner
> > <kristof...@fatlenny.net
> <mailto:kristof...@fatlenny.net>
> <mailto:kristof...@fatlenny.net
> <mailto:kristof...@fatlenny.net>>> wrote:
> >
> > Hi!
> >
> > Why would you make it dependent on the commit message?
> >
> > There is a integration plugin that triggers a build on every
> change
> > in the repository which might help you. There is also a plugin for
> > pull requests that builds pull requests that triggers builds when
> > you post a specific comment to the pull request.
> >
> > Regards,
> > Kristof
> >
> >
> > On Wednesday, 4 November 2015 15:15:29 UTC+1, Stefano wrote:
> >
> > Hi, it's possible that Jenkins read the messages committed on
> > BitBucket and every time found a specific string on commit
> > message, it start a build?
> >
> > --
> > 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
> <mailto:jenkinsci-users%2Bunsu...@googlegroups.com>
> > <mailto:jenkinsci-use...@googlegroups.com
> <mailto:jenkinsci-users%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/jenkinsci-users/47debf02-d51c-47e5-89c2-8080b8f1d8bb%40googlegroups.com
> >
> <https://groups.google.com/d/msgid/jenkinsci-users/47debf02-d51c-47e5-89c2-8080b8f1d8bb%40googlegroups.com?utm_medium=email&utm_source=footer>.
> > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to a topic in the
> > Google Groups "Jenkins Users" group.
> > To unsubscribe from this topic, visit
> >
> https://groups.google.com/d/topic/jenkinsci-users/R1kI8APtPvA/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > jenkinsci-use...@googlegroups.com
> <mailto:jenkinsci-users%2Bunsu...@googlegroups.com>
> > <mailto:jenkinsci-use...@googlegroups.com
> <mailto:jenkinsci-users%2Bunsu...@googlegroups.com>>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEkY6rdvTTsqCBkawqv9%2Bd1Upk9qQ8N9o0yGXjK-a1Efw%40mail.gmail.com
> >
> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEkY6rdvTTsqCBkawqv9%2Bd1Upk9qQ8N9o0yGXjK-a1Efw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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
> <mailto:jenkinsci-users%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/R1kI8APtPvA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-use...@googlegroups.com
> <mailto:jenkinsci-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHfy1XfY%3D_KiKVn-qaqbAjgMJLJ-560%2B%2B45atf2Kn%3DhsA%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHfy1XfY%3D_KiKVn-qaqbAjgMJLJ-560%2B%2B45atf2Kn%3DhsA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages