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

Problem with jcasc compatibility plugin and job priority in Jenkins

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi, 
      I am trying to use configuration as code Jenkins plugin and I have problems with custom plugins.
       
      I am trying to import these two configs:

      <?xml version='1.1' encoding='UTF-8'?>
      <jenkins.advancedqueue.PriorityConfiguration plugin="PrioritySorter@3.6.0">
        <jobGroups class="linked-list">
          <jenkins.advancedqueue.JobGroup>
            <id>0</id>
            <priority>-1</priority>
            <jobGroupStrategy class="jenkins.advancedqueue.jobinclusion.strategy.ViewBasedJobInclusionStrategy">
              <viewName>All</viewName>
              <useJobFilter>false</useJobFilter>
              <jobPattern>.*</jobPattern>
            </jobGroupStrategy>
            <description></description>
            <runExclusive>false</runExclusive>
            <useJobFilter>false</useJobFilter>
            <jobPattern>.*</jobPattern>
            <usePriorityStrategies>true</usePriorityStrategies>
            <priorityStrategies>
              <jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder>
                <id>0</id>
                <priorityStrategy class="jenkins.advancedqueue.priority.strategy.BuildParameterStrategy">
                  <parameterName>PRIORITY</parameterName>
                </priorityStrategy>
              </jenkins.advancedqueue.JobGroup_-PriorityStrategyHolder>
            </priorityStrategies>
          </jenkins.advancedqueue.JobGroup>
        </jobGroups>
      </jenkins.advancedqueue.PriorityConfiguration> 

      and

      <?xml version='1.1' encoding='UTF-8'?>
      <jenkins.advancedqueue.PrioritySorterConfiguration plugin="PrioritySorter@3.6.0">
        <allowPriorityOnJobs>true</allowPriorityOnJobs>
        <onlyAdminsMayEditPriorityConfiguration>true</onlyAdminsMayEditPriorityConfiguration>
        <strategy class="jenkins.advancedqueue.sorter.strategy.AbsoluteStrategy">
          <numberOfPriorities>5</numberOfPriorities>
          <defaultPriority>3</defaultPriority>
        </strategy>
      </jenkins.advancedqueue.PrioritySorterConfiguration> 

       
      but I am keep getting these kind of errors: 

       Caused by: io.jenkins.plugins.casc.ConfiguratorException: Invalid configuration elements for type class jenkins.advancedqueue.PrioritySorterConfiguration : allowpriorityonjobs.

       
      I am trying to import this: 

      unclassified:
        prioritysorterconfiguration:
          allowpriorityonjobs: true 

       
      I have no clues how to write custom configurator, how to make current one to work and does that makes sense since this does not work out of the box and error does not tell which properties are supported. I am assuming that I might need to change to source code. 
       
      Any hints are more than welcome. Thank you in advance. 
       
      Best,
      Ljubisa. 

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              ljubisap Ljubisa Punosevac
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: