9

I have a repository in a [company hosted] GitHub enterprise site that I need to integrate within a CI/CD pipeline in AWS using the CodePipeline service. The CodePipeline service then will connect with a Jenkins Service running in an EC2 instance. I am following this AWS documentation to do this.

Note that this is an enterprise GitHub repo and not hosted on GitHub.com.

I am unable to connect to the GitHub Enterprise site in the "Create a pipeline" wizard. Selecting GitHub as a source only lets me connect to GitHub.com, and not to my organization's enterprise site.

How do I connect to the enterprise GitHub site so that I can add the repo as a source for my codepipeline?

4
  • where is your GitHub enterprise hosted? Commented Nov 17, 2018 at 13:12
  • Its hosted within my organization, on my organization's own hardware. Commented Nov 17, 2018 at 13:14
  • 1
    Looks like there is indeed no support for GitHub enterprise in Pipeline although there is one for CodeBuild. You could potentially use Code Build to bridge the gap. In the appspec.yaml you can write AWS or other commands to achieve this. Commented Nov 17, 2018 at 13:32
  • 2
    Finally there's an official integration: aws.amazon.com/about-aws/whats-new/2020/09/… Commented Oct 2, 2020 at 5:09

4 Answers 4

4

UPDATE: An integration was finally released for github enterprise to work with AWS Codepipeline. Please see this answer by Pedreiro


As Sid Malani said in the comments, there's no straightforward or direct way to use a privately hosted GitHub Enterprise Repository in AWS CodePipeline.

One way would be to use CodeBuild, which allows to add custom github repositories which can then be used in CodePipeline. This, however, should only be considered as a stop-gap solution.

Thank you Sid Malani for the alternative strategy

Sign up to request clarification or add additional context in comments.

Comments

2

I doubt AWS will ship this feature anytime soon (hopefully I eat my words) since the workaround is well-documented and works fine. The gist of it can be found here, which I'll summarize as follows:

  1. Create a CodeBuild project (which can take GitHub Enterprise as a source) which essentially just listens to a push event (webhook) of your development or master branch and outputs a .zip file of the source-code into an S3 bucket.
  2. Use the S3 bucket as the source of your CodePipeline.

Comments

1

The official integration was finally released.

https://aws.amazon.com/about-aws/whats-new/2020/09/aws-codepipeline-supports-github-enterprise-server

Here is the documentation:

https://docs.aws.amazon.com/codepipeline/latest/userguide/connections-ghes.html

Comments

0

There is a way to integrate 3rd party Git repos with AWS CodePipeline. AWS suggested the following process. It used S3 buckets and API Gateways and Lambdas to connected Github enterprise repos to CodePipeline. It's not ideal but it can work.

Unofficial: I've heard CodePipeline support for Github Enterprise will be out second half of 2019.

5 Comments

201...2019? l hope :-)
@STW Thanks for the typo. I hope too :)
@mbunch I still don't see Github Enterprise as an option for Source step in CodePipeline ?
@ShanikaEdiriweera I may have jumped the gun a bit there, I also do not see it under 'Source', but I do see it under 'Pipeline' > 'Pipelines' (sorry for the confusion)
@mbunch GitHub Enterprise is not the same as GitHub. GHE is essentially privately hosted versions of GitHub. CodePIpeline does not (as of this writing) support GHE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.