This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      We upgrade the plugin lately from 2.13 to 2.15 and noticed that build steps in our declarative where not triggered anymore. Then we figured out that all these build steps have in common that they use the triggeredBy 'UpstreamCause' condition which we guess is broken because of JENKINS-60995. Probably the new class implemented by this is not taken into consideration for evaluating the when condition or there is some non-compatibility between this and the original class. This unfortunately has a bigger impact for us as we are checking the trigger in our jobs if it was by a user or by a upstream job. An example of this would be

       

      pipeline {
          agent any    
          parameters {
              booleanParam(name: 'FORCE_RUN', defaultValue: false)
          }
          stages {
              stage("Job check") {
                  when {
                      not {
                          anyOf {
                              triggeredBy 'UpstreamCause'
                              expression { return  params.FORCE_RUN }
                          }
                      }
                  }
                  steps {
                      script {
                          currentBuild.result = 'NOT_BUILT'
                          error('Please use the FORCE_RUN parameter to start manually, or start the deployment from upstream')
                      }
                  }
              }
              stage('Initialization of the pipeline') {
                  steps {
                      echo "Job triggered successfully"
                  }
              }
          }
      }
      

       

            Assignee:
            Unassigned
            Reporter:
            Erik Müller
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: