Skip to content

Commit 630db4b

Browse files
docs refactor ee (#2130)
* docs refactor ee * Update docs/ce/self-host/deploy-docker.mdx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update docs/ce/features/rbac.mdx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update docs/ce/features/opa-policies.mdx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix features --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 18271bb commit 630db4b

22 files changed

+91
-434
lines changed
File renamed without changes.
File renamed without changes.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Drift Detection"
3+
---
4+
5+
6+
# Drift alerts via Slack
7+
8+
## Create a separate workflow file for drift
9+
10+
To run digger in drift detection mode, pass `mode: drift-detection` in the workflow file and configure the relevant crontab to run it with the frequency you want:
11+
12+
```
13+
name: Digger Drift Detection
14+
15+
on:
16+
workflow_dispatch:
17+
schedule: ## 12am daily.
18+
- cron: '0 0 * * *'
19+
20+
jobs:
21+
detect-drift:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: digger drift detection
25+
uses: diggerhq/digger@vLatest
26+
with:
27+
mode: drift-detection
28+
setup-aws: true
29+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
30+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
31+
aws-region: us-east-1
32+
drift-detection-slack-notification-url: ${{ secrets.DRIFT_DETECTION_SLACK_NOTIFICATION }}
33+
env:
34+
GITHUB_CONTEXT: ${{ toJson(github) }}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
```
37+
38+
## Configure Slack notification URL
39+
40+
Note the `DRIFT_DETECTION_SLACK_NOTIFICATION` env var that the workflow above is using. This should be set to a Slack Incoming Webhook URL.
41+
42+
Follow the [official Slack guide](https://api.slack.com/messaging/webhooks) to get the Incoming Webhook URL; then add it as an Action secret named `DRIFT_DETECTION_SLACK_NOTIFICATION`
43+
44+
45+
# Drift alerts via Github Issues
46+
47+
Coming soon to CE, here is an example of how to configure it: https://github.com/diggerhq/demo-ee-features/edit/main/.github/workflows/drift.yml.
48+
Digger supports drift detection and automatic creation of issues in your ticketing system, e.g. GitHub Issues:
49+
50+
<img height="400" src="/images/drift-issues.png" />
51+
File renamed without changes.

docs/ee/gitlab.mdx renamed to docs/ce/features/gitlab.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,13 @@ Your Gitlab should also trigger and also perform a plan. If successful the job w
9696
![](/images/ee/gitlab-1.png)
9797

9898
![](/images/ee/gitlab-2.png)
99+
100+
101+
## Repo allowlist
102+
103+
You can set `DIGGER_REPO_ALLOW_LIST` env variable on the server to define a whitelist of repositories allowed to trigger Digger workflows in Gitlab. This is needed because unlike GitHub, there's no concept of "apps" in Gitlab to allow granular control of per-repo access.
104+
105+
```
106+
DIGGER_REPO_ALLOW_LIST=gitlab.com/diggerdev/digger-demo,gitlab.com/diggerdev/alsoallowed
107+
```
108+

docs/ee/multi-github.mdx renamed to docs/ce/features/multi-github.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Multi Tenant Github Connections"
33
---
44

55

6-
In CE version of digger during onboarding you can use a wizard to create [a github app](/ce/self-host/deploy-docker#create-github-app) and inject it using environment variables.
6+
In the main onboarding flow you can use a wizard to create [a github app](/ce/self-host/deploy-docker#create-github-app) and inject it using environment variables.
77
In larger orgs there could be a requirement that there are multiple orgs representing department. The github app created is installable on a single org only unless it is published.
88
For enterprise usecases publishing to github marketplace is not feasible. For this reason we introduced multi-tenant github app via connections. Not only does this allow multiple app
99
connections per org but it also makes it fully ui-based and there is no need to set environment variables. The way it works is as follows:
@@ -25,7 +25,7 @@ openssl rand -base64 24
2525

2626
In your backend you can visit /github/connections and it will show you a screen like below
2727

28-
![](images/ee/multi-tenant-github.png)
28+
![](/images/ee/multi-tenant-github.png)
2929

3030
Within this screen you can see your current connections and also create your connections to an org. Type in your github org in the
3131
text box and click on "set up github app" to follow the wizard for creation in your org. Ensure that the button on github side says "create in diggerhq"

docs/ce/features/opa-policies.mdx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,20 @@ This way you can implement custom logic, for example allowing to apply a PR that
2727

2828
In Digger there are 3 ways to use OPA policies:
2929

30-
- via Management Repo (EE)
31-
- via (unofficial) Orchestrator API (CE)
32-
- inline via Conftest (CE)
30+
- via Management Repo
31+
- via (unofficial) Orchestrator API
32+
- inline via Conftest
3333

34-
See [OPA policies](/ee/opa) for more detail
34+
35+
## Management repository
36+
37+
OPA policies can be stored in a dedicated repository ([example](https://github.com/diggerhq/mgmt-repo-one/tree/main/policies)) that is separate from repositories that it controls
38+
In this management repo, policies can be structured using 3 levels:
39+
40+
- organisation level (applies to all repos and projects)
41+
- repo level (applies to all project within a specific repo; overrides org-level)
42+
- project level (applies only to specific project; overrides repo-level and org-level)
43+
44+
## Inline policies via custom commands
45+
The most basic way to use OPA policies with Digger is via [custom commands](/ce/howto/using-opa-conftest) - you can have a script that downloads policies from your storage of choice, and then invoke Conftest CLI directly as a custom workflow step in Digger. This is also a free feature of Digger Community Edition.
46+
The most basic way use OPA policies with Digger is via [custom commands](/ce/howto/using-opa-conftest) - you can have a script that downloads policies from your storage of choice, and then invoke Conftest CLI directly as a custom workflow step in Digger. This is also a free feature of Digger Community Edition.

docs/ee/rbac.mdx renamed to docs/ce/features/rbac.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
title: "RBAC"
33
---
44

5-
Digger Enterprise supports granular Role-based Access Contros at 3 levels:
5+
For simple usecases you can rely on [CODEOWNERS](/ce/howto/codeowners) in order to control what is achievable in the PR. OPA can be used in advanced scenarios to get more control. Digger supports granular Role-based Access Controls at 3 levels:
66

77
- Organisation
88
- Repository
99
- Project
1010

11-
You can set up RBAC in Digger by configuring an Access Policy at the appropriate level of your Management Repo. See [OPA Policies](/ee/opa) for more detail.
11+
You can set up RBAC in Digger by configuring an Access Policy at the appropriate level of your Management Repo. See [OPA Policies](/ce/features/opa-policies) for more detail.
1212

1313
Every Access Policy is passed the following details about the attempted operation from GitHub:
1414

@@ -18,4 +18,3 @@ Every Access Policy is passed the following details about the attempted operatio
1818

1919
This way you can implement advanced workflows such as [policy overrides](https://github.com/diggerhq/demo-policy-overrides/pull/9) based on roles and granular permissions.
2020

21-
[Book a demo](https://calendly.com/diggerdev/diggerdemo)

docs/ee/remote-jobs.mdx renamed to docs/ce/features/remote-jobs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Running Remote Jobs"
33
---
44

55
With dgctl command line you can run jobs in a remote CI environment and have the logs streamed to your terminal.
6-
These tasks follow the same RBAC rules specified in your [opa policies](/ee/opa). For example this command:
6+
These tasks follow the same RBAC rules specified in your [opa policies](/ce/features/opa-policies). For example this command:
77

88
```
99
dgctl exec --project <project_name> --command "digger plan"

docs/ce/howto/using-opa-conftest.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "Inline policies (conftest)"
44

55
<Note>
66
This is the most basic way to use OPA policies with Digger. For more advanced
7-
use cases check out [OPA policies](/ee/opa)
7+
use cases check out [OPA policies](/ce/features/opa-policies)
88
</Note>
99

1010
You can configure Digger CLI to run Conftest ito check your Terraform plan output against Open Policy Agent policies.

0 commit comments

Comments
 (0)