Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-10-15 00:08:42 +00:00
parent 5c635722c6
commit 6a0085290e
197 changed files with 620 additions and 391 deletions

View File

@ -335,7 +335,7 @@ Gitlab/Union:
- 'spec/**/*'
- 'ee/spec/**/*'
API/GrapeAPIInstance:
API/Base:
Enabled: true
Include:
- 'lib/**/api/**/*.rb'

View File

@ -19,7 +19,7 @@ gem 'default_value_for', '~> 3.3.0'
gem 'pg', '~> 1.1'
gem 'rugged', '~> 0.28'
gem 'grape-path-helpers', '~> 1.3'
gem 'grape-path-helpers', '~> 1.4'
gem 'faraday', '~> 1.0'
gem 'marginalia', '~> 1.9.0'

View File

@ -495,7 +495,7 @@ GEM
grape-entity (0.7.1)
activesupport (>= 4.0)
multi_json (>= 1.3.2)
grape-path-helpers (1.3.0)
grape-path-helpers (1.4.0)
activesupport
grape (~> 1.3)
rake (~> 12)
@ -1348,7 +1348,7 @@ DEPENDENCIES
gpgme (~> 2.0.19)
grape (= 1.4.0)
grape-entity (~> 0.7.1)
grape-path-helpers (~> 1.3)
grape-path-helpers (~> 1.4)
grape_logging (~> 1.7)
graphiql-rails (~> 1.4.10)
graphql (~> 1.11.4)

View File

@ -11,12 +11,17 @@
#
# if the feature flag is enabled by default you should use
# track_redis_hll_event :index, :show, name: 'i_analytics_dev_ops_score', feature: :my_feature, feature_default_enabled: true
#
# You can also pass custom conditions using `if:`, using the same format as with Rails callbacks.
module RedisTracking
extend ActiveSupport::Concern
class_methods do
def track_redis_hll_event(*controller_actions, name:, feature:, feature_default_enabled: false)
after_action only: controller_actions, if: -> { request.format.html? && request.headers['DNT'] != '1' } do
def track_redis_hll_event(*controller_actions, name:, feature:, feature_default_enabled: false, if: nil)
custom_conditions = Array.wrap(binding.local_variable_get('if'))
conditions = [:trackable_request?, *custom_conditions]
after_action only: controller_actions, if: conditions do
track_unique_redis_hll_event(name, feature, feature_default_enabled)
end
end
@ -31,6 +36,10 @@ module RedisTracking
Gitlab::UsageDataCounters::HLLRedisCounter.track_event(visitor_id, event_name)
end
def trackable_request?
request.format.html? && request.headers['DNT'] != '1'
end
def metric_feature_enabled?(feature, default_enabled)
Feature.enabled?(feature, default_enabled: default_enabled)
end

View File

@ -5,6 +5,7 @@ module WikiActions
include PreviewMarkdown
include SendsBlob
include Gitlab::Utils::StrongMemoize
include RedisTracking
extend ActiveSupport::Concern
included do
@ -31,6 +32,11 @@ module WikiActions
end
end
# NOTE: We want to include wiki page views in the same counter as the other
# Event-based wiki actions tracked through TrackUniqueEvents, so we use the same event name.
track_redis_hll_event :show, name: Gitlab::UsageDataCounters::TrackUniqueEvents::WIKI_ACTION.to_s,
feature: :track_unique_wiki_page_views, feature_default_enabled: true
helper_method :view_file_button, :diff_file_html_data
end

View File

@ -14,7 +14,13 @@ module Registrations
if current_user.save
hide_advanced_issues
redirect_to group_path(params[:namespace_path])
record_experiment_user(:default_to_issues_board)
if experiment_enabled?(:default_to_issues_board) && learn_gitlab.available?
redirect_to namespace_project_board_path(params[:namespace_path], learn_gitlab.project, learn_gitlab.board)
else
redirect_to group_path(params[:namespace_path])
end
else
render :show
end

View File

@ -65,14 +65,14 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
if can?(current_user, :download_code, project)
user_view
elsif user_view == "activity"
"activity"
elsif can?(current_user, :read_wiki, project)
"wiki"
elsif feature_available?(:issues, current_user)
"projects/issues/issues"
elsif user_view == 'activity'
'activity'
elsif project.wiki_repository_exists? && can?(current_user, :read_wiki, project)
'wiki'
elsif can?(current_user, :read_issue, project)
'projects/issues/issues'
else
"customize_workflow"
'activity'
end
end
@ -407,6 +407,10 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
def anonymous_project_view
if !project.empty_repo? && can?(current_user, :download_code, project)
'files'
elsif project.wiki_repository_exists? && can?(current_user, :read_wiki, project)
'wiki'
elsif can?(current_user, :read_issue, project)
'projects/issues/issues'
else
'activity'
end

View File

@ -0,0 +1,5 @@
---
title: Track unique wiki page views in Usage Ping
merge_request: 44622
author:
type: changed

View File

@ -0,0 +1,5 @@
---
title: Copy project homepage default view for anonymous users
merge_request: 44606
author: George Tsiolis
type: changed

View File

@ -0,0 +1,7 @@
---
name: track_unique_wiki_page_views
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44622
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/267162
type: development
group: group::knowledge
default_enabled: true

View File

@ -128,7 +128,7 @@ production:
disconnect_timeout: 120
```
Here the `discover:` section specifies the configuration details to use for
Here, the `discover:` section specifies the configuration details to use for
service discovery.
### Configuration
@ -139,7 +139,7 @@ The following options can be set:
|----------------------|---------------------------------------------------------------------------------------------------|-----------|
| `nameserver` | The nameserver to use for looking up the DNS record. | localhost |
| `record` | The record to look up. This option is required for service discovery to work. | |
| `record_type` | Optional record type to look up, this can be either A or SRV (since GitLab 12.3) | A |
| `record_type` | Optional record type to look up, this can be either A or SRV (GitLab 12.3 and later) | A |
| `port` | The port of the nameserver. | 8600 |
| `interval` | The minimum time in seconds between checking the DNS record. | 60 |
| `disconnect_timeout` | The time in seconds after which an old connection is closed, after the list of hosts was updated. | 120 |

View File

@ -67,7 +67,7 @@ Keep in mind that:
- **Secondary** nodes talk to the **primary** node to:
- Get user data for logins (API).
- Replicate repositories, LFS Objects, and Attachments (HTTPS + JWT).
- Since GitLab Premium 10.0, the **primary** node no longer talks to **secondary** nodes to notify for changes (API).
- In GitLab Premium 10.0 and later, the **primary** node no longer talks to **secondary** nodes to notify for changes (API).
- Pushing directly to a **secondary** node (for both HTTP and SSH, including Git LFS) was [introduced](https://about.gitlab.com/releases/2018/09/22/gitlab-11-3-released/) in [GitLab Premium](https://about.gitlab.com/pricing/#self-managed) 11.3.
- There are [limitations](#limitations) when using Geo.
@ -282,7 +282,7 @@ For answers to common questions, see the [Geo FAQ](replication/faq.md).
## Log files
Since GitLab 9.5, Geo stores structured log messages in a `geo.log` file. For Omnibus installations, this file is at `/var/log/gitlab/gitlab-rails/geo.log`.
In GitLab 9.5 and later, Geo stores structured log messages in a `geo.log` file. For Omnibus installations, this file is at `/var/log/gitlab/gitlab-rails/geo.log`.
This file contains information about when Geo attempts to sync repositories and files. Each line in the file contains a separate JSON entry that can be ingested into. For example, Elasticsearch or Splunk.

View File

@ -397,7 +397,7 @@ existing repositories was added in GitLab 10.1.
## Updating to GitLab 10.0
Since GitLab 10.0, we require all **Geo** systems to [use SSH key lookups via
In GitLab 10.0 and later, we require all **Geo** systems to [use SSH key lookups via
the database](../../operations/fast_ssh_key_lookup.md) to avoid having to maintain consistency of the
`authorized_keys` file for SSH access. Failing to do this will prevent users
from being able to clone via SSH.
@ -611,9 +611,9 @@ is prepended with the relevant node for better clarity:
### Update tracking database on **secondary** node
After updating a **secondary** node, you might need to run migrations on
the tracking database. The tracking database was added in GitLab 9.1,
and it is required since 10.0.
After updating a **secondary** node, you might need to run migrations on the
tracking database. The tracking database was added in GitLab 9.1, and is
required in GitLab 10.0 and later.
1. Run database migrations on tracking database:

View File

@ -93,7 +93,7 @@ When running Gitaly on its own server, note the following regarding GitLab versi
NFS. To use Elasticsearch in these versions, the
[repository indexer](../../integration/elasticsearch.md#elasticsearch-repository-indexer)
must be enabled in your GitLab configuration.
- [Since GitLab 12.3](https://gitlab.com/gitlab-org/gitlab/-/issues/6481), the new indexer is
- [In GitLab 12.3 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/6481), the new indexer is
the default and no configuration is required.
### Network architecture

View File

@ -8,7 +8,7 @@ MemoryKiller applies the same approach to the Sidekiq processes used by GitLab
to process background jobs.
Unlike puma-worker-killer, which is enabled by default for all GitLab
installations since GitLab 13.0, the Sidekiq MemoryKiller is enabled by default
installations of GitLab 13.0 and later, the Sidekiq MemoryKiller is enabled by default
_only_ for Omnibus packages. The reason for this is that the MemoryKiller
relies on runit to restart Sidekiq after a memory-induced shutdown and GitLab
installations from source do not all use runit or an equivalent.

View File

@ -1,6 +1,6 @@
# Uploads sanitize Rake tasks **(CORE ONLY)**
Since GitLab 11.9, EXIF data is automatically stripped from JPG or TIFF image uploads.
In GitLab 11.9 and later, EXIF data is automatically stripped from JPG or TIFF image uploads.
EXIF data may contain sensitive information (for example, GPS location), so you
can remove EXIF data from existing images that were uploaded to an earlier version of GitLab.

View File

@ -1,3 +1,9 @@
---
stage: Configure
group: Configure
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
---
# Terraform state administration (alpha)
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/2673) in GitLab 12.10.

View File

@ -3,7 +3,7 @@
We recommend using log aggregation and search tools like Kibana and Splunk whenever possible,
but if they are not available you can still quickly parse
[GitLab logs](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26311) in JSON format
(the default since GitLab 12.0) using [`jq`](https://stedolan.github.io/jq/).
(the default in GitLab 12.0 and later) using [`jq`](https://stedolan.github.io/jq/).
## What is JQ?

View File

@ -4,7 +4,7 @@ type: reference
# Finding relevant log entries with a correlation ID
Since GitLab 11.6, a unique request tracking ID, known as the "correlation ID" has been
In GitLab 11.6 and later, a unique request tracking ID, known as the "correlation ID" has been
logged by the GitLab instance for most requests. Each individual request to GitLab gets
its own correlation ID, which then gets logged in each GitLab component's logs for that
request. This makes it easier to trace behavior in a

View File

@ -614,7 +614,7 @@ Example response:
## Commit status
Since GitLab 8.1, this is the new commit status API.
In GitLab 8.1 and later, this is the new commit status API.
### List the statuses of a commit

View File

@ -272,7 +272,7 @@ action doesn't delete blobs. To delete them and recycle disk space,
[run the garbage collection](https://docs.gitlab.com/omnibus/maintenance/README.html#removing-unused-layers-not-referenced-by-manifests).
NOTE: **Note:**
Since GitLab 12.4, individual tags are deleted.
In GitLab 12.4 and later, individual tags are deleted.
For more details, see the [discussion](https://gitlab.com/gitlab-org/gitlab/-/issues/15737).
Examples:

View File

@ -70,7 +70,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
Create a new instance-level variable.
[Since GitLab 13.1](https://gitlab.com/gitlab-org/gitlab/-/issues/216097), the maximum number of allowed instance-level variables can be changed.
[In GitLab 13.1 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/216097), the maximum number of allowed instance-level variables can be changed.
```plaintext
POST /admin/ci/variables
@ -79,7 +79,7 @@ POST /admin/ci/variables
| Attribute | Type | required | Description |
|-----------------|---------|----------|-----------------------|
| `key` | string | yes | The `key` of a variable. Max 255 characters, only `A-Z`, `a-z`, `0-9`, and `_` are allowed. |
| `value` | string | yes | The `value` of a variable. 10,000 characters allowed. [Since GitLab 13.3](https://gitlab.com/gitlab-org/gitlab/-/issues/220028) |
| `value` | string | yes | The `value` of a variable. 10,000 characters allowed ([GitLab 13.3 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/220028)). |
| `variable_type` | string | no | The type of a variable. Available types are: `env_var` (default) and `file`. |
| `protected` | boolean | no | Whether the variable is protected. |
| `masked` | boolean | no | Whether the variable is masked. |
@ -109,7 +109,7 @@ PUT /admin/ci/variables/:key
| Attribute | Type | required | Description |
|-----------------|---------|----------|-------------------------|
| `key` | string | yes | The `key` of a variable. |
| `value` | string | yes | The `value` of a variable. [Since GitLab 13.3](https://gitlab.com/gitlab-org/gitlab/-/issues/220028), around 10,000 characters allowed. Previously 700 characters. |
| `value` | string | yes | The `value` of a variable. 10,000 characters allowed ([GitLab 13.3 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/220028)). |
| `variable_type` | string | no | The type of a variable. Available types are: `env_var` (default) and `file`. |
| `protected` | boolean | no | Whether the variable is protected. |
| `masked` | boolean | no | Whether the variable is masked. |

View File

@ -1,6 +1,6 @@
# API V3 to API V4
Since GitLab 9.0, API V4 is the preferred version to be used.
In GitLab 9.0 and later, API V4 is the preferred version to be used.
API V3 was unsupported from GitLab 9.5, released on August
22, 2017. API v3 was removed in [GitLab 11.0](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/36819).

View File

@ -21,7 +21,6 @@ cannot be used to authenticate with GitHub as an external CI/CD repository.
## Connect with Personal Access Token
NOTE: **Note:**
Personal access tokens can only be used to connect GitHub.com
repositories to GitLab, and the GitHub user must have the [owner role](https://docs.github.com/en/github/getting-started-with-github/access-permissions-on-github).
@ -53,7 +52,6 @@ GitLab will:
## Connect manually
NOTE: **Note:**
To use **GitHub Enterprise** with **GitLab.com**, use this method.
To manually enable GitLab CI/CD for your repository:

View File

@ -74,7 +74,6 @@ If changes are pushed to the branch referenced by the Pull Request and the
Pull Request is still open, a pipeline for the external pull request is
created.
NOTE: **Note:**
GitLab CI/CD will create 2 pipelines in this case. One for the
branch push and one for the external pull request.

View File

@ -892,7 +892,7 @@ you can monitor the behavior of your app running in each environment. For the mo
dashboard to appear, you need to Configure Prometheus to collect at least one
[supported metric](../../user/project/integrations/prometheus_library/index.md).
Since GitLab 9.2, all deployments to an environment are shown directly on the monitoring dashboard.
In GitLab 9.2 and later, all deployments to an environment are shown directly on the monitoring dashboard.
Once configured, GitLab will attempt to retrieve [supported performance metrics](../../user/project/integrations/prometheus_library/index.md)
for any environment that has had a successful deployment. If monitoring data was
@ -956,7 +956,7 @@ session and even a multiplexer like `screen` or `tmux`.
### Check out deployments locally
Since GitLab 8.13, a reference in the Git repository is saved for each deployment, so
In GitLab 8.13 and later, a reference in the Git repository is saved for each deployment, so
knowing the state of your current environments is only a `git fetch` away.
In your Git configuration, append the `[remote "<your-remote>"]` block with an extra

View File

@ -143,7 +143,6 @@ Now, let's clone our repository on the server just to make sure the `deployer` u
git clone git@gitlab.example.com:<USERNAME>/laravel-sample.git
```
NOTE: **Note:**
Answer **yes** if asked `Are you sure you want to continue connecting (yes/no)?`.
It adds GitLab.com to the known hosts.
@ -167,7 +166,6 @@ server {
}
```
NOTE: **Note:**
You may replace the app's name in `/var/www/app/current/public` with the folder name of your application.
## Setting up Envoy
@ -441,7 +439,9 @@ On your GitLab project repository navigate to the **Registry** tab.
You may need to enable the Container Registry for your project to see this tab. You'll find it under your project's **Settings > General > Visibility, project features, permissions**.
To start using Container Registry on our machine, we first need to sign in to the GitLab registry using our GitLab username and password:
To start using Container Registry on our machine, we first need to sign in to the GitLab registry using our GitLab username and password.
Make sure you have [Docker](https://docs.docker.com/engine/installation/) installed on our machine,
then run the following commands:
```shell
docker login registry.gitlab.com
@ -455,14 +455,10 @@ docker build -t registry.gitlab.com/<USERNAME>/laravel-sample .
docker push registry.gitlab.com/<USERNAME>/laravel-sample
```
NOTE: **Note:**
To run the above commands, we first need to have [Docker](https://docs.docker.com/engine/installation/) installed on our machine.
Congratulations! You just pushed the first Docker image to the GitLab Registry, and if you refresh the page you should be able to see it:
![container registry page with image](img/container_registry_page_with_image.jpg)
NOTE: **Note:**
You can also [use GitLab CI/CD](https://about.gitlab.com/blog/2016/05/23/gitlab-container-registry/#use-with-gitlab-ci) to build and push your Docker images, rather than doing that on your machine.
We'll use this image further down in the `.gitlab-ci.yml` configuration file to handle the process of testing and deploying our app.
@ -542,7 +538,6 @@ services:
...
```
NOTE: **Note:**
If you wish to test your app with different PHP versions and [database management systems](../../services/README.md), you can define different `image` and `services` keywords for each test job.
#### Variables

View File

@ -117,7 +117,6 @@ Generated hello_gitlab_ci app
The database for HelloGitlabCi.Repo has been created
```
NOTE: **Note:**
Phoenix assumes that our PostgreSQL database will have a `postgres` user account with the correct
permissions and a password of `postgres`. If it's not your case, check
[Ecto's instructions](https://hexdocs.pm/ecto/Ecto.html#module-repositories).
@ -205,7 +204,6 @@ when running our Phoenix in our `localhost`.
Without `.gitkeep`, Git will not upload this empty directory and we'll got an error when running our
test on GitLab.
NOTE: **Note:**
If we add a folder via the GitLab UI, GitLab itself will add the `.gitkeep` to that new dir.
Now, let's run a local test and see if everything we did didn't break anything.

View File

@ -24,7 +24,6 @@ can run a pipeline for merge requests.
![Merge request page](img/merge_request.png)
NOTE: **Note:**
If you use this feature with [merge when pipeline succeeds](../../user/project/merge_requests/merge_when_pipeline_succeeds.md),
pipelines for merge requests take precedence over the other regular pipelines.

View File

@ -37,7 +37,6 @@ run.
To add a merge request to a merge train, you need [permissions](../../../../user/permissions.md) to push to the target branch.
NOTE: **Note:**
Each merge train can run a maximum of **twenty** pipelines in parallel.
If more than twenty merge requests are added to the merge train, the merge requests
will be queued until a slot in the merge train is free. There is no limit to the

View File

@ -10,7 +10,7 @@ type: reference
> Introduced in GitLab 8.8.
NOTE: **Tip:**
TIP: **Tip:**
Watch the
["Mastering continuous software development"](https://about.gitlab.com/webcast/mastering-ci-cd/)
webcast to see a comprehensive demo of a GitLab CI/CD pipeline.
@ -101,8 +101,8 @@ you can filter the pipeline list by:
- Trigger author
- Branch name
- Status ([since GitLab 13.1](https://gitlab.com/gitlab-org/gitlab/-/issues/217617))
- Tag ([since GitLab 13.1](https://gitlab.com/gitlab-org/gitlab/-/issues/217617))
- Status ([GitLab 13.1 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/217617))
- Tag ([GitLab 13.1 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/217617))
### Run a pipeline manually
@ -114,7 +114,7 @@ operation of the pipeline.
To execute a pipeline manually:
1. Navigate to your project's **CI/CD > Pipelines**.
1. Click on the **Run Pipeline** button.
1. Select the **Run Pipeline** button.
1. On the **Run Pipeline** page:
1. Select the branch to run the pipeline for in the **Create for** field.
1. Enter any [environment variables](../variables/README.md) required for the pipeline run.
@ -495,7 +495,6 @@ and their statuses.
Pipeline graphs can be displayed in two different ways, depending on the page you
access the graph from.
NOTE: **Note:**
GitLab capitalizes the stages' names in the pipeline graphs.
### Regular pipeline graphs

View File

@ -61,12 +61,10 @@ The `artifacts:reports` keyword is used for collecting test reports, code qualit
reports, and security reports from jobs. It also exposes these reports in GitLab's
UI (merge requests, pipeline views, and security dashboards).
NOTE: **Note:**
The test reports are collected regardless of the job results (success or failure).
You can use [`artifacts:expire_in`](../yaml/README.md#artifactsexpire_in) to set up an expiration
date for their artifacts.
NOTE: **Note:**
If you also want the ability to browse the report output files, include the
[`artifacts:paths`](../yaml/README.md#artifactspaths) keyword.
@ -96,7 +94,6 @@ rspec:
The collected Unit test reports upload to GitLab as an artifact and display in merge requests.
NOTE: **Note:**
If the JUnit tool you use exports to multiple XML files, specify
multiple test report paths within a single job to
concatenate them into a single file. Use a filename pattern (`junit: rspec-*.xml`),

View File

@ -11,9 +11,6 @@ type: reference, howto
> - Introduced in GitLab 9.1 as [Trigger Schedule](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10533).
> - [Renamed to Pipeline Schedule](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/10853) in GitLab 9.2.
NOTE: **Note:**
Cron notation is parsed by [Fugit](https://github.com/floraison/fugit).
Pipelines are normally run based on certain conditions being met. For example, when a branch is pushed to repository.
Pipeline schedules can be used to also run [pipelines](index.md) at specific intervals. For example:
@ -24,6 +21,8 @@ Pipeline schedules can be used to also run [pipelines](index.md) at specific int
In addition to using the GitLab UI, pipeline schedules can be maintained using the
[Pipeline schedules API](../../api/pipeline_schedules.md).
Schedule timing is configured with cron notation, parsed by [Fugit](https://github.com/floraison/fugit).
## Prerequisites
In order for a scheduled pipeline to be created successfully:

View File

@ -36,13 +36,11 @@ in `.gitlab-ci.yml`.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/28919) in GitLab 12.0.
NOTE: **Note:**
As of GitLab 12.0, newly created projects automatically have a default
`git depth` value of `50`.
It is possible to limit the number of changes that GitLab CI/CD fetches when cloning
a repository. Setting a limit to `git depth` can speed up Pipelines execution. Maximum
allowed value is `1000`.
a repository. Setting a limit to `git depth` can speed up Pipelines execution.
In GitLab 12.0 and later, newly created projects automatically have a default
`git depth` value of `50`. The maximum allowed value is `1000`.
To disable shallow clone and make GitLab CI/CD fetch all branches and tags each time,
keep the value empty or set to `0`.
@ -180,8 +178,7 @@ This also determines the visibility of these related features:
- Job artifacts
- The [pipeline security dashboard](../../user/application_security/security_dashboard/index.md#pipeline-security) **(ULTIMATE)**
NOTE: **Note:**
Currently, job logs and artifacts are [not yet visible for guest users and non-project members](https://gitlab.com/gitlab-org/gitlab/-/issues/25649).
Job logs and artifacts are [not visible for guest users and non-project members](https://gitlab.com/gitlab-org/gitlab/-/issues/25649).
If **Public pipelines** is enabled (default):

View File

@ -243,7 +243,7 @@ Some variables are listed in the UI so you can choose them more quickly.
| `AWS_DEFAULT_REGION` | Any | 12.10 |
| `AWS_SECRET_ACCESS_KEY` | Any | 12.10 |
NOTE: **Note:**
CAUTION: **Caution:**
When you store credentials, there are security implications. If you are using AWS keys,
for example, follow their [best practices](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html).
@ -371,9 +371,6 @@ export GITLAB_USER_ID="42"
## `.gitlab-ci.yml` defined variables
NOTE: **Note:**
This feature requires GitLab Runner 0.5.0 or higher and GitLab 7.14 or higher.
You can add variables that are set in the build environment to `.gitlab-ci.yml`.
These variables are saved in the repository, and they
are meant to store non-sensitive project configuration, like `RAILS_ENV` or
@ -437,8 +434,7 @@ Once you set them, they are available for all subsequent pipelines. Any group-le
Instance variables are useful for no longer needing to manually enter the same credentials repeatedly for all your projects. Instance-level variables are available to all projects and groups on the instance.
NOTE: **Note:**
The maximum number of instance-level variables is [planned to be 25](https://gitlab.com/gitlab-org/gitlab/-/issues/216097).
In GitLab 13.1 and later, the [maximum number of instance-level variables is 25](https://gitlab.com/gitlab-org/gitlab/-/issues/216097).
You can define instance-level variables via the UI or [API](../../api/instance_level_ci_variables.md).
@ -448,7 +444,7 @@ To add an instance-level variable:
1. Click the **Add variable** button, and fill in the details:
- **Key**: Must be one line, using only letters, numbers, or `_` (underscore), with no spaces.
- **Value**: [Since GitLab 13.3](https://gitlab.com/gitlab-org/gitlab/-/issues/220028), 10,000 characters allowed. This is also bounded by the limits of the selected runner operating system. In GitLab 13.0 to 13.2, 700 characters allowed.
- **Value**: [In GitLab 13.3 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/220028), 10,000 characters allowed. This is also bounded by the limits of the selected runner operating system. In GitLab 13.0 to 13.2, 700 characters allowed.
- **Type**: `File` or `Variable`.
- **Protect variable** (Optional): If selected, the variable is only available in pipelines that run on protected branches or tags.
- **Mask variable** (Optional): If selected, the variable's **Value** is not shown in job logs. The variable is not saved if the value does not meet the [masking requirements](#masked-variable-requirements).

View File

@ -16,7 +16,6 @@ To follow conventions of naming across GitLab, and to further move away from the
`build` term and toward `job`, some [CI/CD environment variables](README.md#predefined-environment-variables) were renamed for GitLab 9.0
release.
NOTE: **Note:**
Starting with GitLab 9.0, we have deprecated the `$CI_BUILD_*` variables. **You are
strongly advised to use the new variables as we will remove the old ones in
future GitLab releases.**

View File

@ -38,15 +38,14 @@ There are two places defined variables can be used. On the:
### `config.toml` file
NOTE: **Note:**
You can read more about `config.toml` in the [GitLab Runner docs](https://docs.gitlab.com/runner/configuration/advanced-configuration.html).
| Definition | Can be expanded? | Description |
|:-------------------------------------|:-----------------|:---------------------------------------------------------------------------------------------------------------------------------------------|
| `runners.environment` | yes | The variable expansion is made by GitLab Runner's [internal variable expansion mechanism](#gitlab-runner-internal-variable-expansion-mechanism) |
| `runners.kubernetes.pod_labels` | yes | The Variable expansion is made by GitLab Runner's [internal variable expansion mechanism](#gitlab-runner-internal-variable-expansion-mechanism) |
| `runners.kubernetes.pod_annotations` | yes | The Variable expansion is made by GitLab Runner's [internal variable expansion mechanism](#gitlab-runner-internal-variable-expansion-mechanism) |
You can read more about `config.toml` in the [GitLab Runner docs](https://docs.gitlab.com/runner/configuration/advanced-configuration.html).
## Expansion mechanisms
There are three expansion mechanisms:
@ -104,10 +103,6 @@ These restrictions are because `after_script` scripts are executed in a
## Persisted variables
NOTE: **Note:**
Some of the persisted variables contain tokens and cannot be used by some definitions
due to security reasons.
The following variables are known as "persisted":
- `CI_PIPELINE_ID`
@ -130,6 +125,9 @@ They are:
- For definitions where the ["Expansion place"](#gitlab-ciyml-file) is GitLab.
- In the `only` and `except` [variables expressions](README.md#environment-variables-expressions).
Some of the persisted variables contain tokens and cannot be used by some definitions
due to security reasons.
## Variables with an environment scope
Variables defined with an environment scope are supported. Given that

View File

@ -388,7 +388,7 @@ include:
### `include`
> - Introduced in [GitLab Premium](https://about.gitlab.com/pricing/) 10.5.
> - Available for Starter, Premium and Ultimate since 10.6.
> - Available for Starter, Premium, and Ultimate in GitLab 10.6 and later.
> - [Moved](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/42861) to GitLab Core in 11.4.
Using the `include` keyword allows the inclusion of external YAML files. This helps
@ -541,7 +541,7 @@ Nested includes allow you to compose a set of includes.
A total of 100 includes is allowed, but duplicate includes are considered a configuration error.
Since [GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/-/issues/28212), the time limit
In [GitLab 12.4](https://gitlab.com/gitlab-org/gitlab/-/issues/28212) and later, the time limit
for resolving all files is 30 seconds.
#### Additional `includes` examples
@ -1487,9 +1487,8 @@ job:
- spec/**.rb
```
NOTE: **Note:**
For performance reasons, using `exists` with patterns is limited to 10000
checks. After the 10000th check, rules with patterned globs always match.
For performance reasons, using `exists` with patterns is limited to 10,000
checks. After the 10,000th check, rules with patterned globs always match.
#### `rules:allow_failure`
@ -2093,7 +2092,7 @@ To disable directed acyclic graphs (DAG), set the limit to `0`.
When using `needs`, artifact downloads are controlled with `artifacts: true` (default) or `artifacts: false`.
Since GitLab 12.6, you can't combine the [`dependencies`](#dependencies) keyword
In GitLab 12.6 and later, you can't combine the [`dependencies`](#dependencies) keyword
with `needs` to control artifact downloads in jobs. `dependencies` is still valid
in jobs that do not use `needs`.
@ -3627,7 +3626,7 @@ You can use this keyword to create two different types of downstream pipelines:
- [Multi-project pipelines](../multi_project_pipelines.md#creating-multi-project-pipelines-from-gitlab-ciyml)
- [Child pipelines](../parent_child_pipelines.md)
[In GitLab 13.2 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/197140/), you can
[In GitLab 13.2](https://gitlab.com/gitlab-org/gitlab/-/issues/197140/) and later, you can
view which job triggered a downstream pipeline. In the [pipeline graph](../pipelines/index.md#visualize-pipelines),
hover over the downstream pipeline job.
@ -4378,7 +4377,7 @@ the following stages:
| Variable | Description |
|-----------------------------------|--------------------------------------------------------|
| **ARTIFACT_DOWNLOAD_ATTEMPTS** | Number of attempts to download artifacts running a job |
| **EXECUTOR_JOB_SECTION_ATTEMPTS** | [Since GitLab 12.10](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4450), the number of attempts to run a section in a job after a [`No Such Container`](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4450) error ([Docker executor](https://docs.gitlab.com/runner/executors/docker.html) only). |
| **EXECUTOR_JOB_SECTION_ATTEMPTS** | [In GitLab 12.10](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4450) and later, the number of attempts to run a section in a job after a [`No Such Container`](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4450) error ([Docker executor](https://docs.gitlab.com/runner/executors/docker.html) only). |
| **GET_SOURCES_ATTEMPTS** | Number of attempts to fetch sources running a job |
| **RESTORE_CACHE_ATTEMPTS** | Number of attempts to restore the cache running a job |

View File

@ -39,7 +39,7 @@ end
## Add a `NOT NULL` column to an existing table
With PostgreSQL 11 being the minimum version since GitLab 13.0, adding columns with `NULL` and/or
With PostgreSQL 11 being the minimum version in GitLab 13.0 and later, adding columns with `NULL` and/or
default values has become much easier and the standard `add_column` helper should be used in all cases.
For example, consider a migration that adds a new `NOT NULL` column `active` to table `db_guides`,

View File

@ -426,7 +426,7 @@ We switch and filter from each event by the `event_name` field.
### Geo Log Cursor (GitLab 10.0 and up)
Since GitLab 10.0, [System Webhooks](#system-hooks-gitlab-87-to-95) are no longer
In GitLab 10.0 and later, [System Webhooks](#system-hooks-gitlab-87-to-95) are no longer
used and Geo Log Cursor is used instead. The Log Cursor traverses the
`Geo::EventLog` rows to see if there are changes since the last time
the log was checked and will handle repository updates, deletes,

View File

@ -138,7 +138,7 @@ security status and license compatibility.
### Modules
Since Go 1.11, a standard dependency system is available behind the name [Go
In Go 1.11 and later, a standard dependency system is available behind the name [Go
Modules](https://github.com/golang/go/wiki/Modules). It provides a way to
define and lock dependencies for reproducible builds. It should be used
whenever possible.
@ -472,7 +472,7 @@ In case we want to drop support for `go 1.11` in GitLab `12.10`, we need to veri
We will not consider the active milestone, `12.10`, because a backport for `12.7` will be required in case of a critical security release.
1. If both [Omnibus and CNG](#updating-go-version) were using Go `1.12` since GitLab `12.7`, then we safely drop support for `1.11`.
1. If both [Omnibus and CNG](#updating-go-version) were using Go `1.12` in GitLab `12.7` and later, then we safely drop support for `1.11`.
1. If Omnibus or CNG were using `1.11` in GitLab `12.7`, then we still need to keep support for Go `1.11` for easier backporting of security fixes.
## Secure Team standards and style guidelines

View File

@ -5,7 +5,7 @@ might encounter or should avoid during development of GitLab CE and EE.
## Do not read files from app/assets directory
Since GitLab 10.8, Omnibus has [dropped the `app/assets` directory](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/2456),
In GitLab 10.8 and later, Omnibus has [dropped the `app/assets` directory](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/2456),
after asset compilation. The `ee/app/assets`, `vendor/assets` directories are dropped as well.
This means that reading files from that directory will fail in Omnibus-installed GitLab instances:

View File

@ -602,7 +602,7 @@ See the style guide on [`NOT NULL` constraints](database/not_null_constraints.md
## Adding Columns With Default Values
With PostgreSQL 11 being the minimum version since GitLab 13.0, adding columns with default values has become much easier and
With PostgreSQL 11 being the minimum version in GitLab 13.0 and later, adding columns with default values has become much easier and
the standard `add_column` helper should be used in all cases.
Before PostgreSQL 11, adding a column with a default was problematic as it would

View File

@ -466,7 +466,7 @@ Connect to your GitLab instance via **Bastion Host A** using [SSH Agent Forwardi
#### Disable Let's Encrypt
Since we're adding our SSL certificate at the load balancer, we do not need GitLab's built-in support for Let's Encrypt. Let's Encrypt [is enabled by default](https://docs.gitlab.com/omnibus/settings/ssl.html#lets-encrypt-integration) when using an `https` domain since GitLab 10.7, so we need to explicitly disable it:
Since we're adding our SSL certificate at the load balancer, we do not need GitLab's built-in support for Let's Encrypt. Let's Encrypt [is enabled by default](https://docs.gitlab.com/omnibus/settings/ssl.html#lets-encrypt-integration) when using an `https` domain in GitLab 10.7 and later, so we need to explicitly disable it:
1. Open `/etc/gitlab/gitlab.rb` and disable it:

View File

@ -260,7 +260,7 @@ sudo gem install bundler --no-document --version '< 2'
## 3. Go
Since GitLab 8.0, GitLab has several daemons written in Go. To install
In GitLab 8.0 and later, GitLab has several daemons written in Go. To install
GitLab we need a Go compiler. The instructions below assume you use 64-bit
Linux. You can find downloads for other platforms at the [Go download
page](https://golang.org/dl).
@ -278,7 +278,7 @@ rm go1.13.5.linux-amd64.tar.gz
## 4. Node
Since GitLab 8.17, GitLab requires the use of Node to compile JavaScript
In GitLab 8.17 and later, GitLab requires the use of Node to compile JavaScript
assets, and Yarn to manage JavaScript dependencies. The current minimum
requirements for these are:
@ -313,7 +313,7 @@ sudo adduser --disabled-login --gecos 'GitLab' git
## 6. Database
NOTE: **Note:**
Starting from GitLab 12.1, only PostgreSQL is supported. Since GitLab 13.0, we [require PostgreSQL 11+](requirements.md#postgresql-requirements).
In GitLab 12.1 and later, only PostgreSQL is supported. In GitLab 13.0 and later, we [require PostgreSQL 11+](requirements.md#postgresql-requirements).
1. Install the database packages:

View File

@ -127,7 +127,7 @@ Bare repositories are **not** importable by GitLab 10.4 to GitLab 11.6, if all t
- It was not renamed, transferred, or migrated to [hashed storage](../administration/repository_storage_types.md#hashed-storage) in GitLab 10.4 to GitLab 11.6.
- Its ancestor namespaces were not renamed or transferred in GitLab 10.4 to GitLab 11.6.
[Since GitLab 11.6](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/41776), all
[In GitLab 11.6](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/41776) and later, all
bare repositories are importable.
To manually migrate repositories yourself (for GitLab 10.4 to GitLab 11.6), you can use the

View File

@ -247,7 +247,7 @@ Helm, which you can [customize](customize.md#custom-helm-chart). The application
into the [Kubernetes namespace](../../user/project/clusters/index.md#deployment-variables)
for the environment.
Since GitLab 11.4, [local Tiller](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22036) is
In GitLab 11.4 and later, [local Tiller](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22036) is
used. Previous versions of GitLab had a Tiller installed in the project
namespace.
@ -365,7 +365,7 @@ chart to deploy the application into the
[Kubernetes namespace](../../user/project/clusters/index.md#deployment-variables)
for the environment.
Since GitLab 11.4, a
In GitLab 11.4 and later, a
[local Tiller](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22036) is
used. Previous versions of GitLab had a Tiller installed in the project
namespace.

View File

@ -63,7 +63,7 @@ supported by GitLab before installing any of the applications.
> - Introduced in GitLab 10.2 for project-level clusters.
> - Introduced in GitLab 11.6 for group-level clusters.
> - [Uses a local Tiller](https://gitlab.com/gitlab-org/gitlab/-/issues/209736) since GitLab 13.2.
> - [Uses a local Tiller](https://gitlab.com/gitlab-org/gitlab/-/issues/209736) in GitLab 13.2 and later.
[Helm](https://helm.sh/docs/) is a package manager for Kubernetes and is
used to install the GitLab-managed apps. GitLab runs each `helm` command

View File

@ -371,7 +371,7 @@ To create group links via filter:
### Overriding user permissions **(STARTER ONLY)**
Since GitLab [v8.15](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/822) LDAP user permissions can now be manually overridden by an admin user. To override a user's permissions:
In GitLab [8.15](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/822) and later, LDAP user permissions can now be manually overridden by an admin user. To override a user's permissions:
1. Go to your group's **Members** page.
1. Select the pencil icon in the row for the user you are editing.

View File

@ -438,7 +438,7 @@ instance and project. In addition, all admins can use the admin interface under
1. Only if the job was:
- Triggered by the user
- [Since GitLab 13.0](https://gitlab.com/gitlab-org/gitlab/-/issues/35069), not run for a protected branch
- [In GitLab 13.0](https://gitlab.com/gitlab-org/gitlab/-/issues/35069) and later, not run for a protected branch
### Job permissions
@ -485,7 +485,7 @@ for details about the pipelines security model.
## LDAP users permissions
Since GitLab 8.15, LDAP user permissions can now be manually overridden by an admin user.
In GitLab 8.15 and later, LDAP user permissions can now be manually overridden by an admin user.
Read through the documentation on [LDAP users permissions](group/index.md#manage-group-memberships-via-ldap) to learn more.
## Project aliases

View File

@ -6,20 +6,52 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Service templates
Using a service template, GitLab administrators can provide default values for configuring integrations at the project level.
Using a service template, GitLab administrators can:
When you enable a service template, the defaults are applied to **all** projects that do not
already have the integration enabled or do not otherwise have custom values saved.
The values are pre-filled on each project's configuration page for the applicable integration.
- Provide default values for configuring integrations when creating new projects.
- Bulk configure all existing projects in one step.
If you disable the template, these values no longer appear as defaults, while
any values already saved for an integration remain unchanged.
When you enable a service template:
- The defaults are applied to **all** existing projects that either:
- Don't already have the integration enabled.
- Don't have custom values stored for already enabled integrations.
- Values are populated on each project's configuration page for the applicable
integration.
- Settings are stored at the project level.
If you disable the template:
- GitLab default values again become the default values for integrations on
new projects.
- Projects previously configured using the template will continue to use
those settings.
If you change the template, the revised values are applied to new projects. This feature
does not provide central administration of integration settings.
## Central administration of project integrations
A new set of features is being introduced in GitLab to provide more control over
how integrations are configured at the instance, group, and project level.
[Read more about setting up project integration management](../../admin_area/settings/project_integration_management.md)
(introduced in GitLab 13.3) and [our plans for managing integrations](https://gitlab.com/groups/gitlab-org/-/epics/2137).
## Enable a service template
Navigate to the **Admin Area > Service Templates** and choose the service
template you wish to create.
Recommendation:
- Test the settings on some projects individually before enabling a template.
- Copy the working settings from a project to the template.
There is no "Test settings" option when enabling templates. If the settings do not work,
these incorrect settings will be applied to all existing projects that do not already have
the integration configured. Fixing the integration then needs to be done project-by-project.
## Service for external issue trackers
The following image shows an example service template for Redmine.

View File

@ -191,7 +191,7 @@ The plain text title and description of the issue fill the top center of the iss
The description fully supports [GitLab Flavored Markdown](../../markdown.md#gitlab-flavored-markdown-gfm),
allowing many formatting options.
> [Since GitLab 12.6](https://gitlab.com/gitlab-org/gitlab/-/issues/10103), changes to an issue's description are listed in the [issue history](#issue-history).**(STARTER)**
> [In GitLab 12.6](https://gitlab.com/gitlab-org/gitlab/-/issues/10103) and later, changes to an issue's description are listed in the [issue history](#issue-history).**(STARTER)**
### Mentions

View File

@ -14,7 +14,7 @@ by clicking the **Revert** button in merge requests and commit details.
NOTE: **Note:**
The **Revert** button will only be available for merge requests
created since GitLab 8.5. However, you can still revert a merge request
created in GitLab 8.5 and later. However, you can still revert a merge request
by reverting the merge commit from the list of Commits page.
NOTE: **Note:**

View File

@ -48,7 +48,7 @@ that the `master` branch is protected by default.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/5081) in GitLab 8.11.
Since GitLab 8.11, we added another layer of branch protection which provides
In GitLab 8.11 and later, we added another layer of branch protection which provides
more granular management of protected branches. The "Developers can push"
option was replaced by an "Allowed to push" setting which can be set to
allow/prohibit Maintainers and/or Developers to push to a protected branch.

View File

@ -51,7 +51,7 @@ A to do item appears on your To-Do List when:
- You're the author.
- You're the user that set the merge request to automatically merge after a
pipeline succeeds.
- [Since GitLab 13.2](https://gitlab.com/gitlab-org/gitlab/-/issues/12136), a
- [In GitLab 13.2](https://gitlab.com/gitlab-org/gitlab/-/issues/12136) and later, a
merge request is removed from a
[merge train](../ci/merge_request_pipelines/pipelines_for_merged_results/merge_trains/index.md),
and you're the user that added it. **(PREMIUM)**

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class AccessRequests < Grape::API::Instance
class AccessRequests < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -3,7 +3,7 @@
module API
module Admin
module Ci
class Variables < Grape::API::Instance
class Variables < ::API::Base
include PaginationParams
before { authenticated_as_admin! }

View File

@ -2,7 +2,7 @@
module API
module Admin
class InstanceClusters < Grape::API::Instance
class InstanceClusters < ::API::Base
include PaginationParams
before do

View File

@ -2,7 +2,7 @@
module API
module Admin
class Sidekiq < Grape::API::Instance
class Sidekiq < ::API::Base
before { authenticated_as_admin! }
namespace 'admin' do

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class API < Grape::API::Instance
class API < ::API::Base
include APIGuard
LOG_FILENAME = Rails.root.join("log", "api_json.log")

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class Appearance < Grape::API::Instance
class Appearance < ::API::Base
before { authenticated_as_admin! }
helpers do

View File

@ -2,7 +2,7 @@
module API
# External applications API
class Applications < Grape::API::Instance
class Applications < ::API::Base
before { authenticated_as_admin! }
resource :applications do

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class Avatar < Grape::API::Instance
class Avatar < ::API::Base
resource :avatar do
desc 'Return avatar url for a user' do
success Entities::Avatar

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class AwardEmoji < Grape::API::Instance
class AwardEmoji < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class Badges < Grape::API::Instance
class Badges < ::API::Base
include PaginationParams
before { authenticate_non_get! }

6
lib/api/base.rb Normal file
View File

@ -0,0 +1,6 @@
# frozen_string_literal: true
module API
class Base < Grape::API::Instance # rubocop:disable API/Base
end
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class Boards < Grape::API::Instance
class Boards < ::API::Base
include BoardsResponses
include PaginationParams

View File

@ -3,7 +3,7 @@
require 'mime/types'
module API
class Branches < Grape::API::Instance
class Branches < ::API::Base
include PaginationParams
BRANCH_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(branch: API::NO_SLASH_URL_PART_REGEX)

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class BroadcastMessages < Grape::API::Instance
class BroadcastMessages < ::API::Base
include PaginationParams
resource :broadcast_messages do

View File

@ -2,7 +2,7 @@
module API
module Ci
class PipelineSchedules < Grape::API::Instance
class PipelineSchedules < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -2,7 +2,7 @@
module API
module Ci
class Pipelines < Grape::API::Instance
class Pipelines < ::API::Base
include PaginationParams
before { authenticate_non_get! }

View File

@ -2,7 +2,7 @@
module API
module Ci
class Runner < Grape::API::Instance
class Runner < ::API::Base
helpers ::API::Helpers::Runner
resource :runners do

View File

@ -2,7 +2,7 @@
module API
module Ci
class Runners < Grape::API::Instance
class Runners < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -3,7 +3,7 @@
require 'mime/types'
module API
class CommitStatuses < Grape::API::Instance
class CommitStatuses < ::API::Base
params do
requires :id, type: String, desc: 'The ID of a project'
end

View File

@ -3,7 +3,7 @@
require 'mime/types'
module API
class Commits < Grape::API::Instance
class Commits < ::API::Base
include PaginationParams
before do

View File

@ -2,7 +2,7 @@
# PHP composer support (https://getcomposer.org/)
module API
class ComposerPackages < Grape::API::Instance
class ComposerPackages < ::API::Base
helpers ::API::Helpers::PackagesManagerClientsHelpers
helpers ::API::Helpers::RelatedResourcesHelpers
helpers ::API::Helpers::Packages::BasicAuthHelpers

View File

@ -2,7 +2,7 @@
# Conan Instance-Level Package Manager Client API
module API
class ConanInstancePackages < Grape::API::Instance
class ConanInstancePackages < ::API::Base
namespace 'packages/conan/v1' do
include ConanPackageEndpoints
end

View File

@ -2,7 +2,7 @@
# Conan Project-Level Package Manager Client API
module API
class ConanProjectPackages < Grape::API::Instance
class ConanProjectPackages < ::API::Base
params do
requires :id, type: Integer, desc: 'The ID of a project', regexp: %r{\A[1-9]\d*\z}
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class ContainerRegistryEvent < Grape::API::Instance
class ContainerRegistryEvent < ::API::Base
DOCKER_DISTRIBUTION_EVENTS_V1_JSON = 'application/vnd.docker.distribution.events.v1+json'
before { authenticate_registry_notification! }

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class DebianGroupPackages < Grape::API::Instance
class DebianGroupPackages < ::API::Base
params do
requires :id, type: String, desc: 'The ID of a group'
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class DebianProjectPackages < Grape::API::Instance
class DebianProjectPackages < ::API::Base
params do
requires :id, type: String, desc: 'The ID of a project'
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class DeployKeys < Grape::API::Instance
class DeployKeys < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class DeployTokens < Grape::API::Instance
class DeployTokens < ::API::Base
include PaginationParams
helpers do

View File

@ -2,7 +2,7 @@
module API
# Deployments RESTful API endpoints
class Deployments < Grape::API::Instance
class Deployments < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class Discussions < Grape::API::Instance
class Discussions < ::API::Base
include PaginationParams
helpers ::API::Helpers::NotesHelpers
helpers ::RendersNotes

View File

@ -2,7 +2,7 @@
module API
# Environments RESTfull API endpoints
class Environments < Grape::API::Instance
class Environments < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class ErrorTracking < Grape::API::Instance
class ErrorTracking < ::API::Base
before { authenticate! }
params do

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class Events < Grape::API::Instance
class Events < ::API::Base
include PaginationParams
include APIGuard
helpers ::API::Helpers::EventsHelpers

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class FeatureFlagScopes < Grape::API::Instance
class FeatureFlagScopes < ::API::Base
include PaginationParams
ENVIRONMENT_SCOPE_ENDPOINT_REQUIREMENTS = FeatureFlags::FEATURE_FLAG_ENDPOINT_REQUIREMENTS

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class FeatureFlags < Grape::API::Instance
class FeatureFlags < ::API::Base
include PaginationParams
FEATURE_FLAG_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class FeatureFlagsUserLists < Grape::API::Instance
class FeatureFlagsUserLists < ::API::Base
include PaginationParams
error_formatter :json, -> (message, _backtrace, _options, _env, _original_exception) {

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class Features < Grape::API::Instance
class Features < ::API::Base
before { authenticated_as_admin! }
helpers do

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class Files < Grape::API::Instance
class Files < ::API::Base
include APIGuard
FILE_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(file_path: API::NO_SLASH_URL_PART_REGEX)

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class FreezePeriods < Grape::API::Instance
class FreezePeriods < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class GenericPackages < Grape::API::Instance
class GenericPackages < ::API::Base
GENERIC_PACKAGES_REQUIREMENTS = {
package_name: API::NO_SLASH_URL_PART_REGEX,
file_name: API::NO_SLASH_URL_PART_REGEX

View File

@ -1,6 +1,6 @@
# frozen_string_literal: true
module API
class GoProxy < Grape::API::Instance
class GoProxy < ::API::Base
helpers Gitlab::Golang
helpers ::API::Helpers::PackagesHelpers

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class GroupBoards < Grape::API::Instance
class GroupBoards < ::API::Base
include BoardsResponses
include PaginationParams

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class GroupClusters < Grape::API::Instance
class GroupClusters < ::API::Base
include PaginationParams
before { authenticate! }

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class GroupContainerRepositories < Grape::API::Instance
class GroupContainerRepositories < ::API::Base
include PaginationParams
helpers ::API::Helpers::PackagesHelpers

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module API
class GroupExport < Grape::API::Instance
class GroupExport < ::API::Base
helpers Helpers::RateLimiter
before do

Some files were not shown because too many files have changed in this diff Show More