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

Triggering Pipeline job from a multibranch pipeline fails

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      triggering a pipeline job from the multibranch pipeline doesnt work , it fails with the following error
      Sucessfully[Pipeline] build[Pipeline] }[Pipeline] // scriptError when executing success post condition:
      hudson.AbortException: No item named Data-Deploy-Dev found
      at org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerStepExecution.start(BuildTriggerStepExecution.java:75)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286)
      at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
      at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
      at sun.reflect.GeneratedMethodAccessor1473.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
      here is the code in the Multibranch pipeline

      post {
      always

      { echo 'Test run completed' }

      success {
      script {
      if (env.BRANCH_NAME == 'master') {
      echo 'Sucessfully'
      build job: 'Data-Deploy-Dev', parameters: [
      string(name: 'DOCKER_APP_IMAGE_TAG', value: "${env.DOCKER_APP_IMAGE_TAG}"),
      string(name: 'DOCKER_WEB_IMAGE_TAG', value: "${env.DOCKER_WEB_IMAGE_TAG}")
      ], wait: false
      }

      else

      { echo 'Sucessfully!' }

      }
      }
      failure

      { echo 'Failed!' }

      unstable

      { echo 'This will run only if the run was marked as unstable' }

      changed

      { echo 'This will run only if the state of the Pipeline has changed' echo 'For example, if the Pipeline was previously failing but is now successful' }

      }

       

      the pipeline job Data-Deploy-Dev is present, but still it errors as not found

        Attachments

          Activity

            People

            Assignee:
            mjdetullio Matthew DeTullio
            Reporter:
            naziamahimi nazia mahimi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: