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

FanInReverseTrigger doesn't support appear to support pipeline jobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • job-fan-in-plugin
    • None

      We have a job that uses fan-in to package up a final artifact after a number of other jobs have finished.   It seems to work great, as long as the jobs involved are standard projects, not pipelines.   If one of the jobs (or its ancestor) is a pipeline job, i get an exception:

      00:00:41.665 FATAL: class org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to class hudson.model.AbstractProject (org.jenkinsci.plugins.workflow.job.WorkflowJob is in unnamed module of loader jenkins.util.URLClassLoader2 @46750bd7; hudson.model.AbstractProject is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @76f7d241)
      00:00:41.665 java.lang.ClassCastException: class org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to class hudson.model.AbstractProject (org.jenkinsci.plugins.workflow.job.WorkflowJob is in unnamed module of loader jenkins.util.URLClassLoader2 @46750bd7; hudson.model.AbstractProject is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @76f7d241)
      00:00:41.665 	at org.lonkar.jobfanin.FanInReverseBuildTrigger.thisAndUpstreamAreNotBuildingAndStable(FanInReverseBuildTrigger.java:205)
      00:00:41.665 	at org.lonkar.jobfanin.FanInReverseBuildTrigger.allUpsteamIsBuild(FanInReverseBuildTrigger.java:186)
      00:00:41.665 	at org.lonkar.jobfanin.FanInReverseBuildTrigger.access$300(FanInReverseBuildTrigger.java:62)
      00:00:41.665 	at org.lonkar.jobfanin.FanInReverseBuildTrigger$1.shouldTriggerBuild(FanInReverseBuildTrigger.java:249)
      00:00:41.665 	at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:291)
      00:00:41.665 	at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:728)
      00:00:41.665 	at hudson.model.Build$BuildExecution.cleanUp(Build.java:194)
      00:00:41.665 	at hudson.model.Run.execute(Run.java:1947)
      00:00:41.665 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
      00:00:41.665 	at hudson.model.ResourceController.execute(ResourceController.java:107)
      00:00:41.665 	at hudson.model.Executor.run(Executor.java:449)
       

      Worse, this seems to stop the trigger steps.  For example, if job A runs,  there may be 4 or 5 jobs that are watching "A".   If the 2nd of those is a job that uses fan-in, and it has an upstream job that is a pipeline,  jobs 3-5 don't get triggered.   

            lonkaryogeshr Yogesh Lonkar
            slipcon Scott Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: