You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You have a BitBucket repo, with the webhook correctly configured and working.
The Jenkinsfile in your BitBucket repo contains some BBPPR-related configuration (this could be none, or some triggers), in some branch e.g. develop. Let's call it "configuration A".
Create a Multibranch Pipeline e.g. "My Pipeline".
As the develop branch of the pipeline is discovered, the Jenkinsfile's "configuration A" is picked up and sticks with the pipeline's branch. You can verify this by clicking on the Configuration section of the branch's job.
The branch job keeps behaving as expected (the job is triggered by whatever trigger you configured or the job is not triggered if "configuration A" is no configuration at all).
Now change the BBPPR configuration into a different one, let's call it "configuration B".
Commit your change, push it.
Wait for pipeline's branch's job to pick up the new commit for the Jenkinsfile change.
The new BBPPR configuration is never picked up. The develop branch job keeps behaving as in "configuration A".
Expected Behaviour
The new Jenkinsfile's BBPPR configuration is picked up by the branch job.
My Specific Case
In my specific case I had this configuration at the beginning of my Jenkinsfile:
And I had a Multibranch pipeline with a develop branch, which was our trunk, which kept building at each PR creation, update or merge.
Then I removed that whole properties code from the Jenkinsfile, but the develop branch of the pipeline kept building at each PR creation, update or merge.
Please note I have experienced this the other way around too. There was a repo started with no triggers in the Jenkinsfile, then the branch was discovered. Then I added triggers afterwards but the job never started triggering via the webhook (despite webook requests were all sent correctly). If seen from this perspective, it might seem that the BBPPR plugin doesn't work at all, but it's actually the same problem described above.
Workaround
The only workaround I found to make it pick up the new configuration was:
Navigate to the Multibranch Pipeline (not the child job). Click Configure. In the Branch Sources, REMOVE Discover branches. Then hit Save. This will "unconfigure" the pipeline. The pipeline will die. All branches and build history is lost. You will just see a message that invites you to configure it. Once you reconfigure it and add the Discover branches behaviour back, the pipeline will rediscover all branches, including the develop branch. It will reset the build count to 1. But finally the new BBPPR configuration will be picked up.
Please note that manually editing the configuration's XML on the box did not do the trick. If you just do that, the old BBPPR configuration will magically reapper (as if it's stored in some sort of Jenkins cache).
Found in versions
Jenkins 2.482
BBPPR 3.1.3
The text was updated successfully, but these errors were encountered:
To Reproduce
You have a BitBucket repo, with the webhook correctly configured and working.
The Jenkinsfile in your BitBucket repo contains some BBPPR-related configuration (this could be none, or some triggers), in some branch e.g.
develop
. Let's call it "configuration A".Create a Multibranch Pipeline e.g. "My Pipeline".
As the
develop
branch of the pipeline is discovered, the Jenkinsfile's "configuration A" is picked up and sticks with the pipeline's branch. You can verify this by clicking on the Configuration section of the branch's job.The branch job keeps behaving as expected (the job is triggered by whatever trigger you configured or the job is not triggered if "configuration A" is no configuration at all).
Now change the BBPPR configuration into a different one, let's call it "configuration B".
Commit your change, push it.
Wait for pipeline's branch's job to pick up the new commit for the Jenkinsfile change.
The new BBPPR configuration is never picked up. The
develop
branch job keeps behaving as in "configuration A".Expected Behaviour
The new Jenkinsfile's BBPPR configuration is picked up by the branch job.
My Specific Case
In my specific case I had this configuration at the beginning of my Jenkinsfile:
And I had a Multibranch pipeline with a
develop
branch, which was our trunk, which kept building at each PR creation, update or merge.Then I removed that whole
properties
code from the Jenkinsfile, but thedevelop
branch of the pipeline kept building at each PR creation, update or merge.Please note I have experienced this the other way around too. There was a repo started with no triggers in the Jenkinsfile, then the branch was discovered. Then I added triggers afterwards but the job never started triggering via the webhook (despite webook requests were all sent correctly). If seen from this perspective, it might seem that the BBPPR plugin doesn't work at all, but it's actually the same problem described above.
Workaround
The only workaround I found to make it pick up the new configuration was:
Navigate to the Multibranch Pipeline (not the child job). Click Configure. In the Branch Sources, REMOVE Discover branches. Then hit Save. This will "unconfigure" the pipeline. The pipeline will die. All branches and build history is lost. You will just see a message that invites you to configure it. Once you reconfigure it and add the Discover branches behaviour back, the pipeline will rediscover all branches, including the
develop
branch. It will reset the build count to 1. But finally the new BBPPR configuration will be picked up.Please note that manually editing the configuration's XML on the box did not do the trick. If you just do that, the old BBPPR configuration will magically reapper (as if it's stored in some sort of Jenkins cache).
Found in versions
Jenkins 2.482
BBPPR 3.1.3
The text was updated successfully, but these errors were encountered: