We're currently having some trouble with the bitbucket branch source plugin used to handle a multibranch test job in one of our Jenkins instances (productive instance):
Any job related to a deleted branch is not getting deleted in Jenkins. Is is shown as disabled.
Checking the Scan Multibranch Pipeline Log
I find the following entries:
Will not remove foobranch because it is new
Will not remove PR-1 because it is new
Will not remove bar because it is new
Will not remove freeDiskSpaceHack because it is new
We have another instance (test instance) where everything is working as expected - branches get removed immediately, e.g. seeing the following in the log:
Will remove freeDiskSpaceHack
Will remove foo
Besides that there's no difference.
Will not remove <branch> because it is new
.Hopefully anyone has a clue.
Orphaned Item StrategyComputed folders can remove items immediately or leave them based on a desired retention strategy. By default, items will be removed as soon as the folder computation determines they are no longer present.
Jenkins Pipeline Vs. Multibranch Pipeline. A multibranch pipeline is meant for building multiple branches from a repository and deploy to multiple environments if required. A pipeline job supports both pipeline steps to be added in Jenkins configuration and form SCM.
Finally I found the hidded switch by myself. Feeling little bit stupid, though.
In the job configuration you can specify for how long to keep old items. When setting up this job initially I must have mixed up this setting with the setting which tells jenkins for how long to keep old builds. So it was set to 30 days.
Btw.: The number of builds kept for the individual branches are not affected by this setting...:
However to immeditaly get rid of orphaned branches one must not enter a number there, like:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With