4

I have to skip some jenkins build based on git commit message. So I have searched and found this jenkins plugin.But I could not configure enable ci-skip in multi branch pipeline job. This option is not available in multi branch pipeline setup.

Is there a way to configure this [ci skip] in multi branch jenkins pipeline?

Is it usable in jenkinsfile or Is it possible to prevent jenkins build based on commit message in jenkinsfile?

StephenKing
  • 36,187
  • 11
  • 83
  • 112
Yahwe Raj
  • 1,947
  • 5
  • 25
  • 37

2 Answers2

4

You are not the only one experiencing problems with [ci skip]:

It looks like the plugin is yet broken.

0

When you configure your branch sources to poll your Git repository in your multibranch pipeline, you can in theory add an additional behaviour to ignore commits with certain messages, such as [skip], as shown in the example below :

Polling ignore commits

I say "in theory" because I never could make that work, either on a multibranch pipeline job or on a simple pipeline job (with pipeline script from SCM).

Pom12
  • 7,622
  • 5
  • 50
  • 69
  • I couldn't see this additional behaviours option in the multibranch pipeline job configuration. Is it need to install any jenkins plugin? – Yahwe Raj Sep 14 '16 at 09:55
  • No need to install another plugin, you can find it in your `multibranch pipeline` configuration under `Branch Sources` > `Git` (after added with `Add Source` button) > `Additionnal Behaviours` -> `Add` – Pom12 Sep 14 '16 at 12:31
  • Thanks for the suggestion. I have configured bitbucket project source, so it doesn't appear in the branch sources. Is there anyway to configure the additional behaviours option in bitbucket sources? – Yahwe Raj Sep 19 '16 at 06:32
  • I think you can use standard branch sources (i.e. not Gitbucket specific configuration) and then just put your Gitbucket repo URL as you would do with Github or custom Gitbucket. – Pom12 Sep 19 '16 at 07:33