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

Priority Strategy Job Triggered by a Upstream Build not Working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • prioritysorter-plugin
    • None
    • Windows 10, Jenkins 2.253, Priority Sorter 4.0.0

      I am facing the same problem as JENKINS-42584, though I am using a new version of Priority Sorter.

      Priority sorter global configuration:

      • Strategy: Absolute
      • Number of priorities: 5
      • Default priority: 3

      Job priorities: A single job group:

      • Jobs to include: All
      • Priority: Default
      • Use additional rules when assigning a priority to a Job: checked
        The additional strategies from top to bottom are "Job Triggered by a Upstream Build" and "Use Priority from Build Parameter Build Parameter Name". The parameter is called BuildPriority.

      Jobs:
      I have a pipeline called "priority test trigger" which has the parameter BuildPriority and will call another pipeline "priority test" by groovy script

      build(job:"first folder/prioity test",wait:true)
      

      When I run "priority test trigger" with BuildPriority 1, here is my logs with Logger: PrioritySorter.Queue.Items and FINER level.

      May 11, 2021 5:10:07 PM FINER PrioritySorter.Queue.Items
      New Item: Id: 1224, JobName: prioity test trigger, jobGroupId: 0, reason: Use Priority from Build Parameter, priority: 1, weight: 1.0, status: WAITING
      Evaluating JobGroup [0] ...
      Evaluating strategies ...
      Evaluating strategy [Job Triggered by a Upstream Build] ...
      Evaluating strategy [Use Priority from Build Parameter] ...
      Strategy is applicable

      May 11, 2021 5:10:07 PM FINE PrioritySorter.Queue.Items
      Starting: Id: 1224, JobName: prioity test trigger, jobGroupId: 0, reason: Use Priority from Build Parameter, priority: 1, weight: 1.0, status: WAITING
      May 11, 2021 5:10:07 PM FINER PrioritySorter.Queue.Items
      New Item: Id: 1225, JobName: prioity test, jobGroupId: 0, reason: Job Triggered by a Upstream Build, priority: 3, weight: 3.0, status: WAITING
      Evaluating JobGroup [0] ...
      Evaluating strategies ...
      Evaluating strategy [Job Triggered by a Upstream Build] ...
      Strategy is applicable

      May 11, 2021 5:10:16 PM FINE PrioritySorter.Queue.Items
      Starting: Id: 1225, JobName: prioity test, jobGroupId: 0, reason: Job Triggered by a Upstream Build, priority: 3, weight: 3.0, status: WAITING
      May 11, 2021 5:10:17 PM FINER PrioritySorter.Queue.Items
      New Item: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: <none>, priority: 3, weight: 3.0, status: WAITING

      May 11, 2021 5:10:17 PM FINE PrioritySorter.Queue.Items
      Buildable: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: <none>, priority: 3, weight: 3.0, status: BUILDABLE
      May 11, 2021 5:10:17 PM FINE PrioritySorter.Queue.Items
      Starting: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: <none>, priority: 3, weight: 3.0, status: BUILDABLE

            atul7107 Atul Yadav
            pzhy13 Cloud
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: