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

Creating a new Multibranch pipeline based on an existing pipeline gives confusing results.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • pipeline
    • None

      Using Jenkins 2.321

      To reproduce follows these steps:

      • Prerequisites:
        • A GitHub system account.
          • The credentials of the system user account as known in Jenkins.
        • Project 1:
          • Have a Git repo 1
          • Have a multibranch pipeline 1
          • Have a Jenkinsfile (1) to build the pipeline.
          • Have a system account for GitHub that is used in Jenkins to clone repositories.
          • The system account is assigned to GitHub repo 1.
        • Project 2:
          • Have a Git repo 2.
          • Have a Jenkinsfile (2) to build the pipeline.
          • The system account is not assigned to Git repo 2.
      • Create a {{New Item }}in the Jenkins dashboard:
        • Enter a item name for pipeline 2.
        • Choose the multibranch pipeline.
        • Type the name of pipeline 1 in the Copyfrom field.
      •  Configure pipeline 2
        • Enter the Display name
        • Change the {{Repository HTTPS URL from }}Git repo 1 to  Git repo 2.
        • Save the new configuration
      • Run pipeline 2
        • Pipeline 2 has run and seems ok.
        • When inspecting the run it turns out repo 1 was cloned and not repo 2
        • When returning to the configuration of the pipeline the name of Git repo 2 is shown.
        • When clicking the Validate button under the {{Repository HTTPS URL }}it shows that Git repo 2 cannot be found (as the system user account is not authorized for it)
      • Update the authorization in GitHub.
        • Assign the system account to Git repo 2.
        • Return to the configuration and press the Validate button again.
        • Now it shows the Git repo 2 can be accessed.
      • Run the pipeline:
        • Now the new Git repo is cloned and the new pipeline is built.

      Expected behavior:

      • Whenever a Git repo is shown in the configuration I expect the build to fail as the system user cannot clone that repo. Now it seems to fall back on the original value but that wasn't shown in the configuration anymore.

       

            Unassigned Unassigned
            jvdvelden Jan-Paul van der Velden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: