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

Pipeline projects with wrong GIT Repository URL with Github Enterprise

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Labels:
      None
    • Environment:
      Jenkins v2.289.3
      configuration-as-code plugin v1.52
    • Similar Issues:

      Description

      I have the following pipeline configuration DSL:

       pipelineJob("SOMEJOB") {	
        definition {
          cpsScm {			
            scm {
             git {
                remote {
      	    github("https://github.myenterprise.ch/someorg/somerepo.git", "https")
      	  }
      	}
            }
           }
         }
      }
      

      And here the Github Enterprise configuration:

      unclassified:
          gitHubConfiguration:
            endpoints:
            - apiUri: "https://github.myenterprise.ch/api/v3"
              name: "My Github"
      

      After deploying the Jenkins CASC the project repository URL is
      https://github.com/https://github.myenterprise.ch/someorg/somerepo.git.git and the pipeline fails out of obvious reasons.

      Not sure if this is a bug or a misconfiguration, but any help would be appreciated.

      **********************
      Edit: The issue is solved by using 

      github("someorg/somerepo", "https", "github.myenterprise.ch")
      

        Attachments

          Issue Links

            Activity

            Hide
            kon Kalle Niemitalo added a comment -

            JENKINS-66515 has information about how to configure a GitHub branch source for a multibranch pipeline with Job DSL. I don't know how much of it applies to a non-multibranch pipeline.

            Show
            kon Kalle Niemitalo added a comment - JENKINS-66515 has information about how to configure a GitHub branch source for a multibranch pipeline with Job DSL. I don't know how much of it applies to a non-multibranch pipeline.
            Hide
            merrycoder Stefan added a comment -

            The issue is solved by using 

            github("someorg/somerepo", "https", "github.myenterprise.ch")
            
            Show
            merrycoder Stefan added a comment - The issue is solved by using  github( "someorg/somerepo" , "https" , "github.myenterprise.ch" )

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              merrycoder Stefan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: