Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63031

DELETE Event in the multibranch pipeline events log

    XMLWordPrintable

Details

    • Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Major
    • Resolution: Fixed
    • Jenkins and bitbucket working together using the bitbucket-server-integration plugin.

      I have a jenkinsJob of the type multibranch pipeline.
      I am using the bitbucket-server-integration as branch source
      I am using a jenkinsFile to build

    Description

      in the "multibranch pipeline" event only UPDATED events are listed.

      i would like to have DELETE events as well

      I get the below text in the "multibranch pipeline events"

      [Fri Jul 10 12:21:05 CEST 2020] Received com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer$BitbucketSCMHeadEvent UPDATED event from fuulibrary with timestamp Fri Jul 10 12:20:57 CEST 2020

      That triggers a valid build, but i would also like to instantaneously have the DELETED branches crossed out. 

      Attachments

        Activity

          kon Kalle Niemitalo added a comment - - edited

          Same here, using atlassian-bitbucket-server-integration-plugin 2.0.0. "Scan Multibranch Pipeline Now" will delete the branch from Jenkins but that is not very convenient.

          DELETE events seem to be getting filtered out in BitbucketWebhookConsumer.eligibleRefs.

          In contrast, cloudbees-bitbucket-branch-source disables the branch in Jenkins immediately when the Bitbucket Server webhook notifies that the branch has been deleted. The branch then appears crossed out in the Jenkins user interface.

          I would like workspaces of deleted branches to be speedily deleted from Jenkins agents because of limited disk space. I don't want to delete the workspace after each build because that would cost time at the end of the build and at the start of the next build.

          kon Kalle Niemitalo added a comment - - edited Same here, using atlassian-bitbucket-server-integration-plugin 2.0.0. "Scan Multibranch Pipeline Now" will delete the branch from Jenkins but that is not very convenient. DELETE events seem to be getting filtered out in BitbucketWebhookConsumer.eligibleRefs . In contrast, cloudbees-bitbucket-branch-source disables the branch in Jenkins immediately when the Bitbucket Server webhook notifies that the branch has been deleted. The branch then appears crossed out in the Jenkins user interface. I would like workspaces of deleted branches to be speedily deleted from Jenkins agents because of limited disk space. I don't want to delete the workspace after each build because that would cost time at the end of the build and at the start of the next build.
          rasmuskvoss__ Rasmus Voss added a comment -

          Yeah currently my workaround is

          1. Delete branch,
          2. curl "Scan Multibranch Pipeline Now"
          3. Create branch

          This will trigger my build : )

          rasmuskvoss__ Rasmus Voss added a comment - Yeah currently my workaround is Delete branch, curl "Scan Multibranch Pipeline Now" Create branch This will trigger my build : )
          beatngu13 Daniel Kraus added a comment -

          Hmmm, I wonder why this is categorized as new feature / minor. Isn't this a relatively important issue when adopting the Atlassian Bitbucket server integration plugin? Without polling / other plugins, it becomes unusable since deleted branches aren't removed, which slowly fills up the Jenkins disk space.

          Our current workaround: In addition to "Bitbucket Server trigger scan after push", we use "Periodically if not otherwise run" (folders plugin) with an intervall of 8 hours. This is sufficient for us as our teams work within a single timezone, so over night there are no pushes and the periodic scan runs to clean up deleted branches.

          beatngu13 Daniel Kraus added a comment - Hmmm, I wonder why this is categorized as new feature / minor. Isn't this a relatively important issue when adopting the Atlassian Bitbucket server integration plugin? Without polling / other plugins, it becomes unusable since deleted branches aren't removed, which slowly fills up the Jenkins disk space. Our current workaround: In addition to "Bitbucket Server trigger scan after push", we use "Periodically if not otherwise run" ( folders plugin ) with an intervall of 8 hours. This is sufficient for us as our teams work within a single timezone, so over night there are no pushes and the periodic scan runs to clean up deleted branches.
          brendanh Brendan Holmes added a comment - - edited

          Issue still occurs on v2.1.3. Periodically polling as beatngu13 suggests every eight hours is slow to clean-up. Changing to much more frequently, eg every minute, won't scale to many MB jobs. This workaround of introducing a second trigger mechanism is also extra job configuration complexity.

          brendanh Brendan Holmes added a comment - - edited Issue still occurs on v2.1.3. Periodically polling as beatngu13 suggests every eight hours is slow to clean-up. Changing to much more frequently, eg every minute, won't scale to many MB jobs. This workaround of introducing a second trigger mechanism is also extra job configuration complexity.

          People

            mhenschke_atlassian Martin Henschke
            rasmuskvoss__ Rasmus Voss
            Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: