vharavy
vharavy

Reputation: 4981

Jenkins does not build branch after merging with another one

I have a Jenkins job that builds all Git branches of some project. This job is triggered with push notification from GitLab. Everything works fine except for one problem. When I merge one branch into another:

git merge development some-feature

Jenkins does not build development branch because in most cases after the merge both development and some-feature point to the same commit and Jenkins already built this commit within some-feature branch.

Is there any way to work around this? I really need to build development in this case, because I would like developers (and testers) be able to get latest development build.

P.S. The same applies for other long-living branches we use (e.g. master).

Upvotes: 2

Views: 2021

Answers (2)

Ravikanth K
Ravikanth K

Reputation: 1

This works well for me...

[http://www.inanzzz.com/index.php/post/ljgv/setup-github-and-jenkins-integration-for-pull-request-builder-and-merger]

make sure -

  1. Type origin/master in "Branch Specifier" field
  2. Just the push event on your webhook creation.

Upvotes: 0

coffeebreaks
coffeebreaks

Reputation: 3817

Unfortunately this seems like a know problem, and a solution would be to create a separate project for your main branch or provide a fix :)

Upvotes: 2

Related Questions