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

declarative pipeline upstream trigger syntax not compiling anymore

XMLWordPrintable

      Using an upstream trigger in a pipeline causes a compilation error

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: 4: Invalid parameter "upstreamProjects", did you mean "upstreamFilterStrategy"? @ line 4, column 18.
                 upstream(upstreamProjects: "my_test_1")
                          ^
      

      and you get an additional error line if you specify the threshold attribute.

      Example pipelines for reproducing:

      my_test_1

      pipeline {
          agent any
          stages {
              stage("foo") {
                  steps {
                      echo "hi"
                  }
              }
          }
      }
      

      my_test_2

      pipeline {
          agent any
          triggers {
              upstream(upstreamProjects: "my_test_1")
          }
          stages {
              stage("bar") {
                  steps {
                      echo "hello"
                  }
              }
          }
      }
      

      Advice for further debugging or working around this issues is highly appreciated. Currently all our upstream-trigger-dependent projects are broken, i.e., they're not only not triggered, but the entire pipeline cannot run.

            abayer Andrew Bayer
            tumbl3w33d Sir Tumbleweed
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: