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
4 changes: 4 additions & 0 deletions content/documentation/admin/actions/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Actions
weight: 30
---
4 changes: 4 additions & 0 deletions content/documentation/admin/actions/codescoring/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: CodeScoring
weight: 100
---
2 changes: 0 additions & 2 deletions content/documentation/admin/actions/codescoring/_index.ru.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: CodeScoring
weight: 100
params:
no_list: true
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: CreateCodeScoringProject
weight: 10
---

CreateCodeScoringProject — creates a new project in CodeScoring.
The action uses the CodeScoring API to register a project with the specified parameters:
- project name,
- repository URL,
- VCS ID,
- an option to automatically run SCA analysis after cloning the repository.

### Request example

```yaml
name: example-project
repository: https://gitlab.example.com/group/project.git
vcs_id: 2
run_sca_after_clone: true
```

### Request specification

| Name | Required | Description |
| -------------------- | -------- | ---------------------------------------------------------------------------- |
| name | Yes | Project name in CodeScoring |
| repository | Yes | Repository URL (e.g., <https://gitlab.example.com/group/project.git>) |
| vcs_id | Yes | VCS ID in CodeScoring (must be greater than 0) |
| run_sca_after_clone | No | Automatically run SCA analysis after cloning the repository |

### Response

The response contains the created project object with the following information: project identifier (pk), name, project type, description, repository information, project status, access permissions, license, number of dependencies and vulnerabilities, project languages, scan schedule status, and the dates of the first and last SCA scans.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: DeleteCodeScoringProject
weight: 20
---

DeleteCodeScoringProject — deletes a project in CodeScoring by its ID.

### Request example

```yaml
id: 1
```

### Request specification

| Name | Required | Description |
| ---------- | -------- | --------------------------- |
| id | Yes | Project ID in CodeScoring |
4 changes: 4 additions & 0 deletions content/documentation/admin/actions/debug/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Debug
weight: 110
---
2 changes: 0 additions & 2 deletions content/documentation/admin/actions/debug/_index.ru.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: Debug
weight: 110
params:
no_list: true
---
23 changes: 23 additions & 0 deletions content/documentation/admin/actions/debug/debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Debug
weight: 10
---

Debug runs a debugging action. It performs a specified number of wait cycles, writes arbitrary data to the log, and returns that data in the action response.

### Request example

```yaml
sleep_time: 1
sleep_count: 3
extra:
example_key: example_value
```

### Request specification

| Name | Required | Description | Default value |
| --------------- | -------- | ---------------------------------------------------------------------------------------------------- | ----------------------- |
| sleep_time | No | Duration of one wait cycle, in seconds | `1` |
| sleep_count | No | Number of wait cycles | `1` |
| extra | No | An arbitrary set of key-value pairs that is written to the log and returned in the action's response | - |
18 changes: 18 additions & 0 deletions content/documentation/admin/actions/debug/fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Fail
weight: 20
---

Fail simulates an action execution error. It is intended for use as a debugging step in processes.

### Request example

```yaml
fail: true
```

### Request specification

| Name | Required | Description | Default value |
| ---------- | -------- | -------------------------------------------------------------------------------------- | ----------------------- |
| fail | No | If `true`, the action completes with an error; if `false`, the action completes successfully | `true` |
4 changes: 4 additions & 0 deletions content/documentation/admin/actions/defectdojo/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: DefectDojo
weight: 90
---
2 changes: 0 additions & 2 deletions content/documentation/admin/actions/defectdojo/_index.ru.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: DefectDojo
weight: 90
params:
no_list: true
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: CreateDefectdojoEngagement
weight: 30
---


{{< alert level="info" >}}
This action requires an API v2 key for the user on whose behalf it will run.
{{< /alert >}}

CreateDefectdojoEngagement — creates a new engagement in DefectDojo. The action uses the DefectDojo API v2.

### Request example

```yaml
name: example engagement
product: '1'
target_start: '2024-06-01'
target_end: '2024-06-30'
lead: '1'
```

### Request specification

The fields correspond to the official DefectDojo API endpoint `/api/v2/engagements`. For details, see the [DefectDojo documentation](https://demo.defectdojo.org/api/v2/oa3/swagger-ui/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: CreateDefectdojoProduct
weight: 10
---


{{< alert level="info" >}}
This action requires an API v2 key for the user on whose behalf it will run.
{{< /alert >}}

CreateDefectdojoProduct — creates a new product in DefectDojo. The action uses the DefectDojo API v2.

### Request example

```yaml
name: example
description: example description
prod_type: 1
```

### Request specification

The fields correspond to the official DefectDojo API endpoint `/api/v2/products`. For details, see the [DefectDojo documentation](https://demo.defectdojo.org/api/v2/oa3/swagger-ui/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: DeleteDefectdojoProduct
weight: 20
---


{{< alert level="info" >}}
This action requires an API v2 key for the user on whose behalf it will run.
{{< /alert >}}

DeleteDefectdojoProduct — deletes a product from DefectDojo. The action uses the DefectDojo API v2.

### Request example

```yaml
id: 1
```

### Request specification

| Name | Required | Description | Default value |
| ------------- | -------- | ------------------------------------------------ | ------------------------ |
| id | Yes | Identifier of the product to delete | - |
4 changes: 4 additions & 0 deletions content/documentation/admin/actions/gitlab/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: GitLab
weight: 20
---
2 changes: 0 additions & 2 deletions content/documentation/admin/actions/gitlab/_index.ru.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: Gitlab
weight: 20
params:
no_list: true
---
32 changes: 32 additions & 0 deletions content/documentation/admin/actions/gitlab/creategitlabbranches.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: CreateGitlabBranches
weight: 40
---

{{< alert level="info" >}}
This action requires a token for the user on whose behalf it will run.
{{< /alert >}}

CreateGitlabBranches — creates new branches in the target repository.

### Request example

```yaml
project_id: '0'
branches:
- branch: new-branch
ref: main
```

### Request specification

| Name | Required | Description |
| ----------------- | -------- | -------------------------------------------------------------------------------- |
| project_id | Yes | Identifier of the project in which to create the branches |
| branches | Yes | List of branches to create |
| branches.branch | Yes | Name of the new branch |
| branches.ref | Yes | Name of an existing branch or a commit SHA |

### Note

The action performs a POST request to the URL: `/api/v4/projects/:id/repository/branches`. Upon successful creation, GitLab returns information about the created branches.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: CreateGitlabGroupVariables
weight: 80
---

{{< alert level="info" >}}
This action requires a token for the user on whose behalf it will run.
{{< /alert >}}

CreateGitlabGroupVariables — creates group-level variables in GitLab.

### Request example

```yaml
group_id: '0'
variables:
- key: EXAMPLE_VARIABLE
value: value
```

### Request specification

| Name | Required | Description |
| ----------------- | -------- | ---------------------------------------------------------------------------------- |
| group_id | Yes | Identifier of the group in which to create the variables |
| variables | Yes | List of variables to create |

The fields for each variable correspond to the official GitLab group-level variables API, `/groups/:id/variables`. For details, see the [GitLab documentation](https://docs.gitlab.com/api/group_level_variables/#create-variable).

### Note

The action performs a POST request to the URL: `/api/v4/groups/:id/variables`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: CreateGitlabMergeRequest
weight: 70
---

{{< alert level="info" >}}
Running this action requires credentials:

- `password` — the password (token) for the user on whose behalf the action will run.
- `username` — the username of the user on whose behalf the action will run.
{{< /alert >}}

CreateGitlabMergeRequest — creates a new Merge Request (MR) in the target repository. Files stored in the source repository are added to the Merge Request. Files may contain variables whose values will be substituted at the time the MR is created.

### Request example

```yaml
source_project_id: '0'
source_project_branch: example
source_project_tag: v1.0.0
target_project_id: '0'
merge_request_spec:
source_branch: example
target_branch: '1'
title: example
additionalIgnoreFiles:
- .ignore
- .example
values:
key1: value1
nested:
enabled: true
subkey: 123
```

### Request specification

| Name | Required | Description | Default value |
| ------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| source_project_id | Yes | Identifier of the project that serves as the source for the Merge Request | - |
| target_project_id | Yes | Identifier of the target project in which the Merge Request will be created | - |
| merge_request_spec | Yes | Specification matching the [GitLab Merge Requests API](https://docs.gitlab.com/ee/api/merge_requests.html#create-mr) | - |
| source_project_tag | No | Tag in the source project from which the Merge Request will be created. If not specified, the source project's branch is used | - |
| source_project_branch | No | Branch in the source project from which the Merge Request will be created | main |
| additionalIgnoreFiles | No | List of files containing paths to exclude from the MR. Populated similarly to [.templateignore](createrepositoryfromtemplate/#templateignore) | - |
| values | No | Variables used during templating, in `key: value` format | - |

### How it works

The platform:

1. Clones the template repository used to generate the MR, based on its identifier (`source_project_id`). For more information, see [Implementation details](createrepositoryfromtemplate/#implementation-details).
1. Reads the `values.yaml` file stored at the root of the repository and determines the default templating variables.
1. Reads the variables passed when the action is launched and merges them with the variables from `values.yaml`. Variables passed at launch take priority.
1. Reads the `.templateignore` file and determines the directories and files excluded from templating.
1. Renders the files from the templates, taking into account `values.yaml` and the variables passed to the action.
1. Changes the repository remote to the target repository identified by `target_project_id`, then runs `git push` to the branch in the source project (`source_project_branch`) or to the `main` branch.
1. Creates an MR according to the specified settings by sending a POST request to the GitLab API.

### Note

The action performs a POST request to the URL: `/api/v4/projects/:id/merge_requests`.
36 changes: 36 additions & 0 deletions content/documentation/admin/actions/gitlab/creategitlabproject.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: CreateGitlabProject
weight: 20
---

{{< alert level="info" >}}
This action requires a token for the user on whose behalf it will run.
{{< /alert >}}

CreateGitlabProject — creates a new project in GitLab through the GitLab API, using the specified name, project path, description, and other settings. Authentication uses a GitLab token provided in the credentials.

### Request example

```yaml
name: example
path: example
description: example
default_branch: main
initialize_with_readme: false
namespace_id: '0'
```

### Request specification

| Name | Required | Description | Default value |
| ------------------------ | -------- | ---------------------------------------------------------------------------------------- | ----------------------- |
| name | Yes | Name of the project to be created in GitLab | - |
| path | Yes | URL-friendly project path. Usually matches the name, but may differ | - |
| default_branch | Yes | Name of the branch to be used by default, e.g. "main" | - |
| namespace_id | Yes | Identifier of the GitLab namespace in which the project will be created | - |
| initialize_with_readme | No | Flag indicating whether the project should be initialized with a README file | false |
| description | No | Project description visible to users | - |

### Note

The action performs a POST request to the URL: `/api/v4/projects`, sending the request parameters in JSON format. Upon successful creation, GitLab returns data about the newly created project.
Loading
Loading