@@ -16,7 +16,7 @@ Get a list of project dependencies. This API partially mirroring
This list can be generated only for [languages and package managers](../user/application_security/dependency_scanning/index.md#supported-languages-and-package-managers)
supported by Gemnasium.
```
```plaintext
GET /projects/:id/dependencies
GET /projects/:id/dependencies?package_manager=maven
GET /projects/:id/dependencies?package_manager=yarn,bundler
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable |
| `id` | integer/string | yes | The ID of a group or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable |
Creates a new project group. Available only for users who can create groups.
```
```plaintext
POST /groups
```
...
...
@@ -500,7 +500,7 @@ Parameters:
Transfer a project to the Group namespace. Available only to instance administrators, although an [alternative API endpoint](projects.md#transfer-a-project-to-a-new-namespace) is available which does not require instance administrator access. Transferring projects may fail when tagged packages exist in the project's repository.
Updates the project group. Only available to group owners and administrators.
```
```plaintext
PUT /groups/:id
```
...
...
@@ -548,7 +548,6 @@ PUT /groups/:id
```shell
curl --request PUT --header"PRIVATE-TOKEN: <your_access_token>""https://gitlab.example.com/api/v4/groups/5?name=Experimental"
```
This endpoint returns:
...
...
@@ -639,7 +638,7 @@ This endpoint either:
- Removes group, and queues a background job to delete all projects in the group as well.
- Since [GitLab 12.8](https://gitlab.com/gitlab-org/gitlab/issues/33257), on [Premium or Silver](https://about.gitlab.com/pricing/) or higher tiers, marks a group for deletion. The deletion will happen 7 days later by default, but this can be changed in the [instance settings](../user/admin_area/settings/visibility_and_access_controls.md#default-deletion-adjourned-period-premium-only).
```
```plaintext
DELETE /groups/:id
```
...
...
@@ -671,7 +670,7 @@ Parameters:
Get all groups that match your string in their name or path.
```
```plaintext
GET /groups?search=foobar
```
...
...
@@ -695,7 +694,7 @@ These are different from [System Hooks](system_hooks.md) that are system wide an
Get a list of group hooks
```
```plaintext
GET /groups/:id/hooks
```
...
...
@@ -712,7 +711,7 @@ Get a specific hook for a group.
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) |
| `hook_id` | integer | yes | The ID of a group hook |
```
```plaintext
GET /groups/:id/hooks/:hook_id
```
...
...
@@ -739,7 +738,7 @@ GET /groups/:id/hooks/:hook_id
Adds a hook to a specified group.
```
```plaintext
POST /groups/:id/hooks
```
...
...
@@ -763,7 +762,7 @@ POST /groups/:id/hooks
Edits a hook for a specified group.
```
```plaintext
PUT /groups/:id/hooks/:hook_id
```
...
...
@@ -789,7 +788,7 @@ PUT /groups/:id/hooks/:hook_id
Removes a hook from a group. This is an idempotent method and can be called multiple times.
Either the hook is available or not.
```
```plaintext
DELETE /groups/:id/hooks/:hook_id
```
...
...
@@ -806,7 +805,7 @@ Group audit events can be accessed via the [Group Audit Events API](audit_events
Syncs the group with its linked LDAP group. Only available to group owners and administrators.
```
```plaintext
POST /groups/:id/ldap_sync
```
...
...
@@ -826,7 +825,7 @@ List, add, and delete LDAP group links.
Lists LDAP group links.
```
```plaintext
GET /groups/:id/ldap_group_links
```
...
...
@@ -838,7 +837,7 @@ Parameters:
Adds an LDAP group link.
```
```plaintext
POST /groups/:id/ldap_group_links
```
...
...
@@ -853,7 +852,7 @@ Parameters:
Deletes an LDAP group link.
```
```plaintext
DELETE /groups/:id/ldap_group_links/:cn
```
...
...
@@ -864,7 +863,7 @@ Parameters:
Deletes a LDAP group link for a specific LDAP provider
```
```plaintext
DELETE /groups/:id/ldap_group_links/:provider/:cn
```
...
...
@@ -880,13 +879,13 @@ By default, groups only get 20 namespaces at a time because the API results are
To get more (up to 100), pass the following as an argument to the API call:
@@ -17,7 +17,7 @@ The access levels are defined in the `Gitlab::Access` module. Currently, these l
Gets a list of group or project members viewable by the authenticated user.
Returns only direct members and not inherited members through ancestors groups.
```
```plaintext
GET /groups/:id/members
GET /projects/:id/members
```
...
...
@@ -72,7 +72,7 @@ Gets a list of group or project members viewable by the authenticated user, incl
When a user is a member of the project/group and of one or more ancestor groups the user is returned only once with the project `access_level` (if exists)
or the `access_level` for the user in the first group which they belong to in the project groups ancestors chain.
```
```plaintext
GET /groups/:id/members/all
GET /projects/:id/members/all
```
...
...
@@ -136,7 +136,7 @@ Example response:
Gets a member of a group or project. Returns only direct members and not inherited members through ancestor groups.
```
```plaintext
GET /groups/:id/members/:user_id
GET /projects/:id/members/:user_id
```
...
...
@@ -173,7 +173,7 @@ Example response:
Gets a member of a group or project, including members inherited through ancestor groups. See the corresponding [endpoint to list all inherited members](#list-all-members-of-a-group-or-project-including-inherited-members) for details.
On password update, user will be forced to change it upon next login.
Note, at the moment this method does only return a `404` error,
even in cases where a `409` (Conflict) would be more appropriate,
e.g. when renaming the email address to some existing one.
even in cases where a `409` (Conflict) would be more appropriate.
For example, when renaming the email address to some existing one.
## Delete authentication identity from user
...
...
@@ -1389,7 +1389,7 @@ The activities that update the timestamp are:
- Git HTTP/SSH activities (such as clone, push)
- User logging in into GitLab
- User visiting pages related to Dashboards, Projects, Issues and Merge Requests ([introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/54947) in GitLab 11.8)
- User visiting pages related to Dashboards, Projects, Issues, and Merge Requests ([introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/54947) in GitLab 11.8)
- User using the API
By default, it shows the activity for all users in the last 6 months, but this can be
...
...
@@ -1403,7 +1403,7 @@ Parameters:
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `from` | string | no | Date string in the format YEAR-MONTH-DAY, e.g.`2016-03-11`. Defaults to 6 months ago. |
| `from` | string | no | Date string in the format YEAR-MONTH-DAY. For example,`2016-03-11`. Defaults to 6 months ago. |
@@ -44,7 +44,7 @@ All these operations will put all files into a `build` folder, which is ready to
## How to transfer files to a live server
You have multiple options: rsync, scp, sftp and so on. For now, we will use scp.
You have multiple options: rsync, scp, sftp, and so on. For now, we will use scp.
To make this work, you need to add a GitLab CI/CD Variable (accessible on `gitlab.example/your-project-name/variables`). That variable will be called `STAGING_PRIVATE_KEY` and it's the **private** SSH key of your server.
Laravel is a high quality web framework written in PHP.
It has a great community with a [fantastic documentation](https://laravel.com/docs).
Aside from the usual routing, controllers, requests, responses, views, and (blade) templates, out of the box Laravel provides plenty of additional services such as cache, events, localization, authentication and many others.
Aside from the usual routing, controllers, requests, responses, views, and (blade) templates, out of the box Laravel provides plenty of additional services such as cache, events, localization, authentication, and many others.
We will use [Envoy](https://laravel.com/docs/master/envoy) as an SSH task runner based on PHP.
It uses a clean, minimal [Blade syntax](https://laravel.com/docs/master/blade) to set up tasks that can run on remote servers, such as, cloning your project from the repository, installing the Composer dependencies, and running [Artisan commands](https://laravel.com/docs/master/artisan).
...
...
@@ -82,7 +82,7 @@ git push -u origin master
## Configure the production server
Before we begin setting up Envoy and GitLab CI/CD, let's quickly make sure the production server is ready for deployment.
We have installed LEMP stack which stands for Linux, NGINX, MySQL and PHP on our Ubuntu 16.04.
We have installed LEMP stack which stands for Linux, NGINX, MySQL, and PHP on our Ubuntu 16.04.
### Create a new user
...
...
@@ -194,7 +194,7 @@ To start, we create an `Envoy.blade.php` in the root of our app with a simple ta
@endtask
```
As you may expect, we have an array within `@servers` directive at the top of the file, which contains a key named `web` with a value of the server's address (e.g.`deployer@192.168.1.1`).
As you may expect, we have an array within `@servers` directive at the top of the file, which contains a key named `web` with a value of the server's address (for example,`deployer@192.168.1.1`).
Then within our `@task` directive we define the bash commands that should be run on the server when the task is executed.
On the local machine use the `run` command to run Envoy tasks.
![Pipeline mini graph sorting](img/pipelines_mini_graph_sorting.png)
### How pipeline duration is calculated
Total running time for a given pipeline excludes retries and pending
(queued) time.
Each job is represented as a `Period`, which consists of:
-`Period#first` (when the job started).
-`Period#last` (when the job finished).
A simple example is:
- A (1, 3)
- B (2, 4)
- C (6, 7)
In the example:
- A begins at 1 and ends at 3.
- B begins at 2 and ends at 4.
- C begins at 6 and ends at 7.
Visually, it can be viewed as:
```text
0 1 2 3 4 5 6 7
AAAAAAA
BBBBBBB
CCCC
```
The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time is:
```text
(4 - 1) + (7 - 6) => 4
```
### How pipeline quotas are used
Each user has a personal pipeline quota that tracks the usage of shared runners in all personal projects.
Each group has a [usage quota](../subscriptions/index.md#ci-pipeline-minutes) that tracks the usage of shared runners for all projects created within the group.
When a pipeline is triggered, regardless of who triggered it, the pipeline quota for the project owner's [namespace](../user/group/index.md#namespaces) is used. In this case, the namespace can be the user or group that owns the project.
### Expanding and collapsing job log sections
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/14664) in GitLab
...
...
@@ -203,6 +159,65 @@ this line should be hidden when collapsed
section_end:1560896353:my_first_section\r\e[0K
```
### Pipeline success and duration charts
> - Introduced in GitLab 3.1.1 as Commit Stats, and later renamed to Pipeline Charts.
> - [Renamed](https://gitlab.com/gitlab-org/gitlab/issues/38318) to CI / CD Analytics in GitLab 12.8.
GitLab tracks the history of your pipeline successes and failures, as well as how long each pipeline ran. To view this information, go to **Analytics > CI / CD Analytics**.
Each user has a personal pipeline quota that tracks the usage of shared runners in all personal projects.
Each group has a [usage quota](../subscriptions/index.md#ci-pipeline-minutes) that tracks the usage of shared runners for all projects created within the group.
When a pipeline is triggered, regardless of who triggered it, the pipeline quota for the project owner's [namespace](../user/group/index.md#namespaces) is used. In this case, the namespace can be the user or group that owns the project.
### How pipeline duration is calculated
Total running time for a given pipeline excludes retries and pending
(queued) time.
Each job is represented as a `Period`, which consists of:
-`Period#first` (when the job started).
-`Period#last` (when the job finished).
A simple example is:
- A (1, 3)
- B (2, 4)
- C (6, 7)
In the example:
- A begins at 1 and ends at 3.
- B begins at 2 and ends at 4.
- C begins at 6 and ends at 7.
Visually, it can be viewed as:
```text
0 1 2 3 4 5 6 7
AAAAAAA
BBBBBBB
CCCC
```
The union of A, B, and C is (1, 4) and (6, 7). Therefore, the total running time is:
```text
(4 - 1) + (7 - 6) => 4
```
## Configuring pipelines
Pipelines, and their component jobs and stages, are defined in the [`.gitlab-ci.yml`](yaml/README.md) file for each project.
# is deployed and GITLAB_WORKHORSE_VERSION is updated accordingly.
requires:file,types: [::API::Validations::Types::WorkhorseFile,File],desc: 'The project export file to be imported'# rubocop:disable Scalability/FileUploads
optional:name,type: String,desc: 'The name of the project to be imported. Defaults to the path of the project if not provided.'
optional:namespace,type: String,desc: "The ID or name of the namespace that the project will be imported into. Defaults to the current user's namespace."
optional:overwrite,type: Boolean,default: false,desc: 'If there is a project in the same namespace and with the same name overwrite it'
...
...
@@ -38,12 +59,24 @@ module API
desc: 'New project params to override values in the export'do
use:optional_project_params
end
optional'file.path',type: String,desc: 'Path to locally stored body (generated by Workhorse)'
optional'file.name',type: String,desc: 'Real filename as send in Content-Disposition (generated by Workhorse)'
optional'file.type',type: String,desc: 'Real content type as send in Content-Type (generated by Workhorse)'
optional'file.size',type: Integer,desc: 'Real size of file (generated by Workhorse)'
optional'file.md5',type: String,desc: 'MD5 checksum of the file (generated by Workhorse)'
optional'file.sha1',type: String,desc: 'SHA1 checksum of the file (generated by Workhorse)'
optional'file.sha256',type: String,desc: 'SHA256 checksum of the file (generated by Workhorse)'
optional'file.etag',type: String,desc: 'Etag of the file (generated by Workhorse)'
optional'file.remote_id',type: String,desc: 'Remote_id of the file (generated by Workhorse)'
optional'file.remote_url',type: String,desc: 'Remote_url of the file (generated by Workhorse)'
end
desc'Create a new project import'do
detail'This feature was introduced in GitLab 10.6.'