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

job-dsl triggers all jobs in organizationFolder on second seed job run

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • job-dsl-plugin
    • None
    • Jenkins ver. 2.204.1
      job-dsl-plugin 1.76

      On second run of seed job JobDSL recreates organizationFolders and triggers build for all jobs in it, with build cause 'Branch indexing'. SkipInitialBuildOnFirstBranchIndexing is configured in build strategies, and first run of seed job is indeed skipping builds, but second run seems to ignore that.

      Are there any ways to prevent this? My understanding is that for MultiBranchPipeline it's done by 'id' parameter, but what about all mutlibranch pipelines created by organizationFolder?

      Possible hack to diminish impact is to add when clause to all pipelines to skip stages on Branch Indexing, but that's way less then optimal:

      when {
       not {
         triggeredBy 'BranchIndexingCause'
       }
      }

       

       

            jamietanna Jamie Tanna
            aliusmiles Taras Bondarchuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: