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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • workflow-cps-plugin
    • 2.86

      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) * * *'
          }
      ...
      }
      

       

       

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

              Created:
              Updated:
              Resolved: