Via Github, Gitlab, or Bitbucket
A service provider is the product you use to host your source code. Codecov integrates with GitHub, Github Enterprise, Bitbucket, Bitbucket Server (formally Stash), GitLab and GitLab Enterprise. Please choose one or more provider to link with your Codecov Enterprise.
? Do not indent your service provider configuration
A common configuration error is to indent the service provider configuration under the setup block in your codecov.yml. This will result in errors when running codecov enterprise.
When adding service providers, be sure to add them to the codecov.yml as follows:
setup: # various setup configs github_enterprise: # provider config
GitHub.com
Below is the guide to link Github.com to your Codecov Enterprise.
Step 1 - Create a new application
-
Create a new application at
https://github.com/settings/applications/new
-
Fill in an Application Name, ex
Codecov Enterprise
-
(optional) Upload Codecov avatar
-
Specify Homepage URL to your CE endpoint
https://codecov-enterprise-hostname.com
-
Specify the Authorization Callback URL
https://codecov-enterprise-hostname.com/login/github
-
Click Register Application
-
Store the Client ID and Client Secret for use in the configuration below
-
Step 2 - Configuration
Append the information collected in step 1 in your enterprise codecov.yml
.
YAML
1github: 2 client_id: "Client ID" 3 client_secret: "Client Secret" 4
Step 3 - Restart
Restart your Codecov Enterprise to complete the integration.
GitHub Enterprise
Your Github Enterprise (GHE) is a self-hosted instance of Github. It likely located behind your firewall. Codecov Enterprise (CE) will need to communicate with your GHE to function properly. Please follow these configuration steps to setup your instance properly.
Please replace https://enterprise-hostname.com
with the root url of your GHE.
Step 1 - Create a new application
-
Create a new application at
https://enterprise-hostname.com/settings/applications/new
-
Fill in an Application Name, ex
Codecov Enterprise
-
(optional) Upload Codecov avatar
-
Specify Homepage URL to your CE endpoint
https://codecov-enterprise-hostname.com
-
Specify the Authorization Callback URL
https://codecov-enterprise-hostname.com/login/ghe
-
Click Register Application
-
Store the Client ID and Client Secret for use in the configuration below
-
Step 2 - Configuration
Append the information collected in step 1 in your enterprise codecov.yml
.
YAML
1github_enterprise: 2 url: "https://enterprise-hostname.com" 3 api_url: "https://enterprise-hostname.com/api/v3" 4 client_id: "Client ID" 5 client_secret: "Client Secret" 6
Step 3 - Restart
Restart your Codecov Enterprise to complete the integration.
Bitbucket.org
Below is the guide to link Bitbucket.org to your Codecov Enterprise.
Step 1 - Add OAuth consumer
-
Create a new OAuth consumer
-
Goto
https://bitbucket.org/account/user/USERNAME/oauth-consumers/new
-
Replace
USERNAME
with your username or team name above -
You may review Bitbucket's guide too
-
-
Fill in an Application Name, ex
Codecov Enterprise
-
Fill in an Callback URL to
http://codecov.domain.com/login/bitbucket
-
Fill in an URL to
http://codecov.domain.com/bb
-
Toggle the permissions as seen in the image below.
-
Click Save
-
In your list of OAuth Consumers click on your new entry.
-
Copy the Key and Secret for your codecov.yml
-