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

GerritTrigger.setTriggerOnEvents() expects class PluginGerritEvent but received class workflow.cps.DSL$NamedArgsAndClosure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: workflow-cps-plugin
    • Environment:
    • Similar Issues:
    • Released As:
      2.86

      Description

      After upgrading to version 2.85, all my pipeline Jobs started to fail complaining on the Gerrit event step. I had to rollback to 2.84 and everything start to work again.

       

      My job uses a shared lib:

      Job:

      blahPipeline(
        project_id: 'bleh.blah',                  
        project_path: 'bleh/blah',                  
        project_branch: 'master',                  
        slave: 'blah'
      )
      

       

      And the shared lib that it's calling:

      def call(Map stageParams) {
        def PROJECT_ID = stageParams.project_id  
        def PROJECT_PATH = stageParams.project_path  
        def PROJECT_BRANCH = stageParams.project_branch  
        def SLAVE = stageParams.slave  
          
        pipeline {    
          triggers {      
            gerrit(        
              serverName: 'Gerrit',
              gerritProjects: [[pattern: "${PROJECT_PATH}",
                                compareType: "PLAIN",
                                branches: [[compareType: "REG_EXP", 
                                            pattern: ".*"]],
                                disableStrictForbiddenFileVerification: false]],
              triggerOnEvents: [patchsetCreated(excludeDrafts: true,
                                                excludeNoCodeChange: true),
                                draftPublished(),
                                changeMerged()]
            )
            cron 'H H(0-7) * * *'
          }
      ...
      }
      

       

       

        Attachments

          Issue Links

            Activity

            Hide
            ckullabosch Christoph Kulla added a comment - - edited

            Same issue here, probably caused by the change in JENKINS-63254

            Show
            ckullabosch Christoph Kulla added a comment - - edited Same issue here, probably caused by the change in JENKINS-63254
            Hide
            foot Renato Costallat added a comment -

            Carroll Chiou tested it here and it's working (workflow-cps-2.86-rc2569.b828472cff3a.hpi)!

             

            Tks!!

            Show
            foot Renato Costallat added a comment - Carroll Chiou tested it here and it's working ( workflow-cps-2.86-rc2569.b828472cff3a.hpi )!   Tks!!

              People

              Assignee:
              carroll Carroll Chiou
              Reporter:
              foot Renato Costallat
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: