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

Copy artifacts from upstream: Unable to find project for artifact copy

    XMLWordPrintable

Details

    Description

      I have a multi-branch pipeline that should be triggered by another multi-branch pipeline. The trigger is configured at the end of the Jenkinsfile as follows:
      {{  }}
      properties([
        pipelineTriggers([upstream({{upstreamProjects: "myproject/$

      {branchName}

      "}})]),
        disableConcurrentBuilds()
      ])

      update: the code above is being modified by this editor all the time... never mind those extra brackets etc. I didn't add them. See screenshot.

      branchname is defined at the top of the file, as follows:
      def branchName = "${BRANCH_NAME}".replace("/", "%2F")

      To copy the artifacts I use:
      step([$class: 'CopyArtifact', target: 'input/upstream', selector: [$class: 'TriggeredBuildSelector']])

      The pipeline is triggered, but the copy artifact step fails with this error:

      hudson.AbortException: Unable to find project for artifact copy: null This may be due to incorrect project name or permission settings; see help for project name in job configuration.

      I tried to add the permissions property in the upstream pipeline, as follows:
      properties([[$class: 'CopyArtifactPermissionProperty', projectNames: '*']])
       
      But I get the same error. The expected behavior is of course to copy the artifacts from the upstream pipeline... if I'm doing something wrong then please let me know what it is so I can fix my pipeline.Thank you.

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            Unassigned Unassigned
            pbro Paolo Brocco
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: