Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions docusaurus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati

```bash
yarn
or npm install
```

## Local Development

```bash
yarn start
or npm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Expand All @@ -20,22 +22,11 @@ This command starts a local development server and opens up a browser window. Mo

```bash
yarn build
or npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

Using SSH:

```bash
USE_SSH=true yarn deploy
```

Not using SSH:

```bash
GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Handled by GitHub actions into Github Pages.
2 changes: 1 addition & 1 deletion docusaurus/docs/_includes/AdminAccessControlInfo.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:::note
Organization admins can [manage access to this feature](/organizations/roles-and-permissions-for-organizations#change-analysis-configuration)
Organization admins can [manage access to this feature](/organizations/roles-and-permissions-for-organizations.mdx#change-analysis-configuration)
:::
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:::caution
[Learn how to use pagination](/codacy-api/using-the-codacy-api#using-pagination) to ensure that you process all results returned by the API.
[Learn how to use pagination](/codacy-api/using-the-codacy-api.mdx#using-pagination) to ensure that you process all results returned by the API.
:::
2 changes: 1 addition & 1 deletion docusaurus/docs/_includes/ServiceAccountIntegration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ which may happen when a user leaves the team or the organization.

For more information and instructions on how to set up a dedicated
service account see
[Why did Codacy stop commenting on pull requests?](/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests#outdated-permissions)
[Why did Codacy stop commenting on pull requests?](/faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.mdx#outdated-permissions)
:::
4 changes: 2 additions & 2 deletions docusaurus/docs/account/emails.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To manage the email addresses associated with your account and your email notifi

![Email settings](images/emails-notifications.png)

## Updating your email addresses ||updating||
## Updating your email addresses \{#updating\}

Codacy automatically links to your Codacy account the email addresses from the Git provider associated with your current session. On the **Emails** page, you can verify which email addresses are linked to your Codacy account.

Expand All @@ -32,7 +32,7 @@ To update the email addresses associated with your Codacy account, do the follow
When developers commit **from GitHub or Bitbucket**, Codacy automatically associates all the commit email addresses from the same Git provider user with a single Codacy committer. For developers that never logged in to the Codacy app, this mechanism requires that they [set their Git email address](#git-config) and add all their email addresses to their [GitHub account](https://github.com/settings/emails) or [Bitbucket account](https://bitbucket.org/account/settings/email/).
:::

### Setting your Git email address ||git-config||
### Setting your Git email address \{#git-config\}

Unless you explicitly [configure your email address](https://git-scm.com/docs/git-config#Documentation/git-config.txt-useremail), Git automatically uses an email address based on the username and hostname of your workstation, and associates this email address with your commits.

Expand Down
4 changes: 2 additions & 2 deletions docusaurus/docs/account/managing-your-profile.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ To manage your profile information such as your name and avatar, click on your a
When you delete your account on Codacy:

- Your profile information and all data related to your personal repositories are completely removed from Codacy
- Codacy will [stop analyzing any repositories added to Codacy using your account](../faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests.md) {/*!--NOTE See https://github.com/codacy/docs/pull/1354#discussion_r950190842 for more context -->*/}
- Codacy will [stop analyzing any repositories added to Codacy using your account](../faq/troubleshooting/why-did-codacy-stop-commenting-on-pull-requests) {/*!--NOTE See https://github.com/codacy/docs/pull/1354#discussion_r950190842 for more context -->*/}

This operation doesn't make any changes on your Git provider.

To delete your account, click the button **Delete account** and confirm that you <span class="skip-vale">really</span> want to proceed.

:::note
If you're the last organization admin of any of your organizations, you must either add someone else as an owner or [delete those organizations](../organizations/what-are-organizations.md#deleting-an-organization) before you can delete your account.
If you're the last organization admin of any of your organizations, you must either add someone else as an owner or [delete those organizations](../organizations/what-are-organizations.mdx#deleting-an-organization) before you can delete your account.
55 changes: 55 additions & 0 deletions docusaurus/docs/chart/_order.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
export const chartOrder = [
'chart/index',
'chart/requirements',
{
type: 'category' as const,
label: 'Setting up Kubernetes',
items: [
'chart/infrastructure/eks-quickstart',
'chart/infrastructure/microk8s-quickstart'
],
},
{
type: 'category' as const,
label: 'Configuring Codacy',
items: [
{
type: 'category' as const,
label: 'Integrations',
items: [
'chart/configuration/integrations/github-cloud',
'chart/configuration/integrations/github-enterprise',
'chart/configuration/integrations/github-app-create',
'chart/configuration/integrations/gitlab-cloud',
'chart/configuration/integrations/gitlab-enterprise',
'chart/configuration/integrations/bitbucket-cloud',
'chart/configuration/integrations/bitbucket-server',
'chart/configuration/integrations/email'
]
},
'chart/configuration/caching',
'chart/configuration/monitoring',
'chart/configuration/logging'
],
},
{
type: 'category' as const,
label: 'Maintenance and operations',
items: [
'chart/maintenance/license',
'chart/maintenance/upgrade',
'chart/maintenance/uninstall',
'chart/maintenance/database'
],
},
{
type: 'category' as const,
label: 'Troubleshooting',
items: [
'chart/troubleshoot/troubleshoot',
'chart/troubleshoot/logs-collect',
'chart/troubleshoot/k8s-cheatsheet'
],
},
];

1 change: 1 addition & 0 deletions docusaurus/docs/chart/assets/images/codacy-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docusaurus/docs/chart/assets/includes/self-hosted-version.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:::tip
To see the version of your Codacy Self-hosted instance click your avatar on the top right-hand corner of any Codacy page:

![Obtaining the Codacy Self-hosted version](./images/self-hosted-version.png)
:::
28 changes: 28 additions & 0 deletions docusaurus/docs/chart/assets/javascripts/extra.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Uncomment to automatically expand all parents in the sidebar tree
// document.addEventListener("DOMContentLoaded", function() {
// load_navpane();
// });

function load_navpane() {
var width = window.innerWidth;
if (width <= 1200) {
return;
}

var nav = document.getElementsByClassName("md-nav");
for (var i = 0; i < nav.length; i++) {
if (typeof nav.item(i).style === "undefined") {
continue;
}

if (nav.item(i).getAttribute("data-md-level") && nav.item(i).getAttribute("data-md-component")) {
nav.item(i).style.display = "block";
nav.item(i).style.overflow = "visible";
}
}

var nav = document.getElementsByClassName("md-nav__toggle");
for (var i = 0; i < nav.length; i++) {
nav.item(i).checked = true;
}
}
24 changes: 24 additions & 0 deletions docusaurus/docs/chart/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.md-header {
background-color: #101e35 !important;
}

.md-header img {
border: 0 none;
width: 95px !important;
height: 27px !important;
}

@media only screen and (min-width: 76.25em) {

Check notice on line 11 in docusaurus/docs/chart/assets/stylesheets/extra.css

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docusaurus/docs/chart/assets/stylesheets/extra.css#L11

Expected "context" media feature range notation (media-feature-range-notation)
.md-main__inner {

Check notice on line 12 in docusaurus/docs/chart/assets/stylesheets/extra.css

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docusaurus/docs/chart/assets/stylesheets/extra.css#L12

(selector) => `Expected class selector "${selector}" to be kebab-case`
max-width: 80%;
}
.md-sidebar--primary {

Check notice on line 15 in docusaurus/docs/chart/assets/stylesheets/extra.css

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docusaurus/docs/chart/assets/stylesheets/extra.css#L15

(selector) => `Expected class selector "${selector}" to be kebab-case`

Check notice on line 15 in docusaurus/docs/chart/assets/stylesheets/extra.css

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docusaurus/docs/chart/assets/stylesheets/extra.css#L15

Expected empty line before rule (rule-empty-line-before)
left: 20px;
}
.md-sidebar--secondary {

Check notice on line 18 in docusaurus/docs/chart/assets/stylesheets/extra.css

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docusaurus/docs/chart/assets/stylesheets/extra.css#L18

(selector) => `Expected class selector "${selector}" to be kebab-case`

Check notice on line 18 in docusaurus/docs/chart/assets/stylesheets/extra.css

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docusaurus/docs/chart/assets/stylesheets/extra.css#L18

Expected empty line before rule (rule-empty-line-before)
right: 20px;
margin-left: 0;
-webkit-transform: none;

Check notice on line 21 in docusaurus/docs/chart/assets/stylesheets/extra.css

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docusaurus/docs/chart/assets/stylesheets/extra.css#L21

Unexpected vendor-prefixed property "-webkit-transform" (property-no-vendor-prefix)
transform: none;
}
}
54 changes: 54 additions & 0 deletions docusaurus/docs/chart/configuration/caching.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Caching
description: Configure Codacy Self-hosted to use an external NFS server to improve the performance of the cloned repository cache.
---


Codacy Self-hosted includes a built-in NFS server provisioner that deploys a shared volume to cache the cloned repository files while they're being analyzed by each tool. However, if you're dealing with big repositories or a high volume of analysis, using an NFS server external to the cluster will improve the performance of the cache.

To use your own external NFS server:

1. Edit the file `values-production.yaml` that you [used to install Codacy](../index.mdx#helm-upgrade).

1. Set `listener.nfsserverprovisioner.enabled: "false"` and define the remaining `listener.cache.*` values as described below:

```yaml
listener:
nfsserverprovisioner:
enabled: false
cache:
name: listener-cache
path: /data
nfs:
server: <NFS_SERVER_IP> # IP address of the external NFS server
path: /var/nfs/data/ # External NFS server directory or file system to be mounted
```

1. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../index.mdx#helm-upgrade):

!!! important
**If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`.

To do this, uncomment the last line before running the `helm upgrade` command below.

```bash
helm upgrade (...options used to install Codacy...) \
--version {{ extra.codacy_self_hosted_version }} \
--values values-production.yaml \
# --values values-microk8s.yaml
```

1. Validate that the `repository-listener` pod is now using the external NFS server:

```bash
$ kubectl describe pod -n codacy codacy-listener-<...>

[...]

Volumes:
listener-cache:
Type: NFS (an NFS mount that lasts the lifetime of a pod)
Server: <NFS_SERVER_IP>
Path: /var/nfs/data/
ReadOnly: false
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: Bitbucket Cloud
description: Instructions on how to set up the Codacy Self-hosted integration with Bitbucket Cloud.
---

Follow the instructions below to set up the Codacy Self-hosted integration with Bitbucket Cloud.

## Create an OAuth consumer \{#create-oauth\}

To integrate Codacy with Bitbucket Cloud, you must register an OAuth consumer for Codacy on Bitbucket.

You can create a consumer on any existing individual or team account. To create a consumer, do the following:

1. On Bitbucket, click on your avatar on the bottom left-hand corner and select **Bitbucket settings**.

2. Select **OAuth** on the left sidebar and click the button **Add consumer**.

3. Fill in the fields to create the OAuth consumer:

- **Name:** Name of the OAuth consumer. For example, `Codacy`.

- **Callback URL:** Copy the URL below, replacing the HTTP protocol and hostname with the correct values for your Codacy instance.

```
https://codacy.example.com/login/Bitbucket?codacy_skip_ga=1
```

- **This is a private consumer:** Enable the check box.

- Add the permissions:

- **Account:** Write
- **Team membership:** Read
- **Projects:** Read
- **Repositories:** Admin
- **Pull requests:** Write
- **Issues:** Write
- **Webhooks:** Read and write

![Bitbucket consumer configuration](images/bitbucket-consumer-configuration.png)

![Bitbucket consumer permissions](images/bitbucket-consumer-permissions.png)

4. Click Save, and then click the name of the new OAuth consumer to take note of the generated key and secret.

![Bitbucket consumer key and secret](images/bitbucket-consumer-key-and-secret.png)

## Configure Bitbucket Cloud on Codacy \{#configure\}

After creating the OAuth consumer on Bitbucket Cloud, you must configure it on Codacy:

1. Edit the file `values-production.yaml` that you [used to install Codacy](../../index.mdx#helm-upgrade).

2. Set `global.bitbucket.enabled: "true"` and define the remaining values as described below using the information obtained when you created the OAuth consumer:

```yaml
global:
bitbucket:
enabled: "true"
login: "true" # Show login button for Bitbucket Cloud
key: "" # OAuth consumer key
secret: "" # OAuth consumer secret
```

3. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../../index.mdx#helm-upgrade):

:::caution
**If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`.

To do this, uncomment the last line before running the `helm upgrade` command below.
:::

```bash
helm upgrade (...options used to install Codacy...) \
--version {{ extra.codacy_self_hosted_version }} \
--values values-production.yaml \
# --values values-microk8s.yaml
```

After this is done you will be able to use Bitbucket Cloud to authenticate to Codacy.
Loading