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

Pipeline Jobs are triggered by upstream Build without having a trigger configured

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • pipeline
    • Jenkins ver. 2.204.1 on CentOS VM

      Pipeline Maven Integration Plugin 3.8.2
      Pipeline: Declarative 1.5.0

      We are running Jenkins on a CentOS VM and our Jobs are all declarative Pipelines. We have jobs that produce mvn SNAPSHOT artifacts and jobs that produce mvn releases. All of the maven commands are executed within the Pipeline withMaven step and are therefore added to the dependency graph. For the SNAPSHOT jobs we have "Build whenever a SNAPSHOT dependency is built" activated. The release jobs are only triggered manually.

      All this was working as expected when using our old Jenkins instance (2.138.3), but when moving to the new Jenkins this behaviour changed in some cases. What happens is that Jobs which have no trigger event configured at all are suddenly triggered with an upstream trigger cause. (see images) This is especially painful, because suddenly release jobs are triggered by snapshot jobs.

      I cannot really state a reason for this or "this only happens when...." because I could not identify such a thing. It does not happen with all the Jobs, it also does not happen every time. The only thing I could recognize is that jobs which are triggered falsly are always of the type pipeline and jobs that are the cause of the trigger are sometimes Pipelines or Multibranch Project Pipelines.

      As a workaround I added a step in the pipeline which checks the trigger cause and aborts the job, if it is not triggered manually, but this is very ugly and produces false results in our monitoring. 

       

      It would really appreciate some help with this topic, or at least some clue on how to debug this. Thanks in advance!

       

        1. build_trigger.JPG
          30 kB
          alex grosc
        2. image-2020-05-26-10-47-44-774.png
          30 kB
          alex grosc
        3. image-2020-05-26-10-48-00-357.png
          27 kB
          alex grosc
        4. trigger_cause.JPG
          27 kB
          alex grosc

            Unassigned Unassigned
            alexagrosc alex grosc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: