Skip to content
Snippets Groups Projects
Unverified Commit cfe77ce4 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Merge remote-tracking branch 'origin/master' into...

Merge remote-tracking branch 'origin/master' into camilstaps/gitlab-ce-new-66023-public-private-fork-counts
parents 934d4925 95d16dc0
No related branches found
No related tags found
No related merge requests found
Showing
with 131 additions and 56 deletions
Loading
Loading
@@ -342,7 +342,7 @@ production: &base
 
## Sidekiq
sidekiq:
log_format: default # (json is also supported)
log_format: json # (default is the original format)
 
## Auxiliary jobs
# Periodically executed jobs, to self-heal GitLab, do external synchronizations, etc.
Loading
Loading
Loading
Loading
@@ -60,7 +60,7 @@ Sidekiq.configure_server do |config|
# Sidekiq (e.g. in an initializer).
ActiveRecord::Base.clear_all_connections!
 
Gitlab::SidekiqMonitor.instance.start if enable_sidekiq_monitor
Gitlab::SidekiqDaemon::Monitor.instance.start if enable_sidekiq_monitor
end
 
if enable_reliable_fetch?
Loading
Loading
Loading
Loading
@@ -65,7 +65,7 @@ scope format: false do
resources :protected_tags, only: [:index, :show, :create, :update, :destroy]
end
 
scope constraints: { id: /.+/ } do
scope constraints: { id: /[^\0]+/ } do
scope controller: :blob do
get '/new/*id', action: :new, as: :new_blob
post '/create/*id', action: :create, as: :create_blob
Loading
Loading
Loading
Loading
@@ -116,3 +116,4 @@
- [incident_management, 2]
- [jira_connect, 1]
- [update_external_pull_requests, 3]
- [refresh_license_compliance_checks, 2]
Loading
Loading
@@ -88,9 +88,36 @@ def lint_commit(commit) # rubocop:disable Metrics/AbcSize
# We ignore revert commits as they are well structured by Git already
return false if commit.message.start_with?('Revert "')
 
is_squash = gitlab.mr_json['squash']
is_wip = gitlab.mr_json['work_in_progress']
is_fixup = commit.message.start_with?('fixup!', 'squash!')
if is_fixup
# The MR is set to squash - Danger adds an informative notice
# The MR is not set to squash - Danger fails. if also WIP warn only, not error
if is_squash
return false
end
if is_wip
warn_commit(
commit,
'Squash or Fixup commits must be squashed before merge, or enable squash merge option'
)
else
fail_commit(
commit,
'Squash or Fixup commits must be squashed before merge, or enable squash merge option'
)
end
# Makes no sense to process other rules for fixup commits, they trigger just more noise
return false
end
# Fail if a suggestion commit is used and squash is not enabled
if commit.message.start_with?('Apply suggestion to')
if gitlab.mr_json['squash']
if is_squash
return false
else
fail_commit(
Loading
Loading
# frozen_string_literal: true
 
class AddGroupColumnToEvents < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
 
def change
add_reference :events, :group, index: true, foreign_key: { to_table: :namespaces, on_delete: :cascade }
disable_ddl_transaction!
def up
add_column(:events, :group_id, :bigint) unless column_exists?(:events, :group_id)
add_concurrent_index(:events, :group_id)
add_concurrent_foreign_key(:events, :namespaces, column: :group_id, on_delete: :cascade)
end
def down
remove_column(:events, :group_id) if column_exists?(:events, :group_id)
end
end
Loading
Loading
@@ -3864,7 +3864,7 @@ ActiveRecord::Schema.define(version: 2019_09_05_223900) do
add_foreign_key "epics", "users", column: "assignee_id", name: "fk_dccd3f98fc", on_delete: :nullify
add_foreign_key "epics", "users", column: "author_id", name: "fk_3654b61b03", on_delete: :cascade
add_foreign_key "epics", "users", column: "closed_by_id", name: "fk_aa5798e761", on_delete: :nullify
add_foreign_key "events", "namespaces", column: "group_id", on_delete: :cascade
add_foreign_key "events", "namespaces", column: "group_id", name: "fk_61fbf6ca48", on_delete: :cascade
add_foreign_key "events", "projects", on_delete: :cascade
add_foreign_key "events", "users", column: "author_id", name: "fk_edfd187b6f", on_delete: :cascade
add_foreign_key "external_pull_requests", "projects", on_delete: :cascade
Loading
Loading
Loading
Loading
@@ -104,6 +104,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
 
## User settings and permissions
 
- [Creating users](../user/profile/account/create_accounts.md): Create users manually or through authentication integrations.
- [Libravatar](../customization/libravatar.md): Use Libravatar instead of Gravatar for user avatars.
- [Sign-up restrictions](../user/admin_area/settings/sign_up_restrictions.md): block email addresses of specific domains, or whitelist only specific domains.
- [Access restrictions](../user/admin_area/settings/visibility_and_access_controls.md#enabled-git-access-protocols): Define which Git access protocols can be used to talk to GitLab (SSH, HTTP, HTTPS).
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ that can be:
 
- Mounted to the local disk
- Exposed as an NFS shared volume
- Acessed via [gitaly] on its own machine.
- Accessed via [gitaly] on its own machine.
 
In GitLab, this is configured in `/etc/gitlab/gitlab.rb` by the `git_data_dirs({})`
configuration hash. The storage layouts discussed here will apply to any shard
Loading
Loading
Loading
Loading
@@ -11,29 +11,56 @@ S/MIME signs and/or encrypts the message itself
## Enable S/MIME signing
 
This setting must be explicitly enabled and a single pair of key and certificate
files must be provided in `gitlab.rb` or `gitlab.yml` if you are using Omnibus
GitLab or installed GitLab from source respectively:
```yaml
email_smime:
enabled: true
key_file: /etc/pki/smime/private/gitlab.key
cert_file: /etc/pki/smime/certs/gitlab.crt
```
files must be provided:
 
- Both files must be provided PEM-encoded.
- The key file must be unencrypted so that Gitlab can read it without user
- Both files must be PEM-encoded.
- The key file must be unencrypted so that GitLab can read it without user
intervention.
- Only RSA keys are supported.
 
NOTE: **Note:** Be mindful of the access levels for your private keys and visibility to
third parties.
 
**For Omnibus installations:**
1. Edit `/etc/gitlab/gitlab.rb` and adapt the file paths:
```ruby
gitlab_rails['gitlab_email_smime_enabled'] = true
gitlab_rails['gitlab_email_smime_key_file'] = '/etc/gitlab/ssl/gitlab_smime.key'
gitlab_rails['gitlab_email_smime_cert_file'] = '/etc/gitlab/ssl/gitlab_smime.crt'
```
1. Save the file and [reconfigure GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect.
NOTE: **Note:** The key needs to be readable by the GitLab system user (`git` by default).
**For installations from source:**
1. Edit `config/gitlab.yml`:
```yaml
email_smime:
# Uncomment and set to true if you need to enable email S/MIME signing (default: false)
enabled: true
# S/MIME private key file in PEM format, unencrypted
# Default is '.gitlab_smime_key' relative to Rails.root (i.e. root of the GitLab app).
key_file: /etc/pki/smime/private/gitlab.key
# S/MIME public certificate key in PEM format, will be attached to signed messages
# Default is '.gitlab_smime_cert' relative to Rails.root (i.e. root of the GitLab app).
cert_file: /etc/pki/smime/certs/gitlab.crt
```
1. Save the file and [restart GitLab](restart_gitlab.md#installations-from-source) for the changes to take effect.
NOTE: **Note:** The key needs to be readable by the GitLab system user (`git` by default).
### How to convert S/MIME PKCS#12 / PFX format to PEM encoding
 
Typically S/MIME certificates are handled in binary PKCS#12 format (`.pfx` or `.p12`
extensions), which contain the following in a single encrypted file:
 
- Server certificate
- Public certificate
- Intermediate certificates (if any)
- Private key
 
Loading
Loading
Loading
Loading
@@ -270,7 +270,7 @@ is interrupted mid-execution and it is not guaranteed
that proper rollback of transactions is implemented.
 
```ruby
Gitlab::SidekiqMonitor.cancel_job('job-id')
Gitlab::SidekiqDaemon::Monitor.cancel_job('job-id')
```
 
> This requires the Sidekiq to be run with `SIDEKIQ_MONITOR_WORKER=1`
Loading
Loading
Loading
Loading
@@ -929,7 +929,7 @@ POST /projects
| `ci_config_path` | string | no | The path to CI config file |
| `auto_devops_enabled` | boolean | no | Enable Auto DevOps for this project |
| `auto_devops_deploy_strategy` | string | no | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`) |
| `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins |
| `repository_storage` | string | no | **(STARTER ONLY)** Which storage shard the repository is on. Available only to admins |
| `approvals_before_merge` | integer | no | **(STARTER)** How many approvers should approve merge requests by default |
| `mirror` | boolean | no | **(STARTER)** Enables pull mirroring in a project |
| `mirror_trigger_builds` | boolean | no | **(STARTER)** Pull mirroring triggers builds |
Loading
Loading
@@ -986,7 +986,7 @@ POST /projects/user/:user_id
| `ci_config_path` | string | no | The path to CI config file |
| `auto_devops_enabled` | boolean | no | Enable Auto DevOps for this project |
| `auto_devops_deploy_strategy` | string | no | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`) |
| `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins |
| `repository_storage` | string | no | **(STARTER ONLY)** Which storage shard the repository is on. Available only to admins |
| `approvals_before_merge` | integer | no | **(STARTER)** How many approvers should approve merge requests by default |
| `external_authorization_classification_label` | string | no | **(PREMIUM)** The classification label for the project |
| `mirror` | boolean | no | **(STARTER)** Enables pull mirroring in a project |
Loading
Loading
@@ -1043,7 +1043,7 @@ PUT /projects/:id
| `ci_default_git_depth` | integer | no | Default number of revisions for [shallow cloning](../user/project/pipelines/settings.md#git-shallow-clone) |
| `auto_devops_enabled` | boolean | no | Enable Auto DevOps for this project |
| `auto_devops_deploy_strategy` | string | no | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`) |
| `repository_storage` | string | no | Which storage shard the repository is on. Available only to admins |
| `repository_storage` | string | no | **(STARTER ONLY)** Which storage shard the repository is on. Available only to admins |
| `approvals_before_merge` | integer | no | **(STARTER)** How many approvers should approve merge request by default |
| `external_authorization_classification_label` | string | no | **(PREMIUM)** The classification label for the project |
| `mirror` | boolean | no | **(STARTER)** Enables pull mirroring in a project |
Loading
Loading
Loading
Loading
@@ -46,7 +46,8 @@ Parameters:
},
"name": "v1.0.0",
"target": "2695effb5807a22ff3d138d593fd856244e155e7",
"message": null
"message": null,
"protected": true
}
]
```
Loading
Loading
@@ -94,7 +95,8 @@ Example Response:
"committer_email": "contact@arthurverschaeve.be",
"committed_date": "2015-02-01T21:56:31.000+01:00"
},
"release": null
"release": null,
"protected": false
}
```
 
Loading
Loading
@@ -138,7 +140,8 @@ Parameters:
},
"name": "v1.0.0",
"target": "2695effb5807a22ff3d138d593fd856244e155e7",
"message": null
"message": null,
"protected": false
}
```
 
Loading
Loading
Loading
Loading
@@ -100,6 +100,7 @@ future GitLab releases.**
| `CI_RUNNER_REVISION` | all | 10.6 | GitLab Runner revision that is executing the current job |
| `CI_RUNNER_TAGS` | 8.10 | 0.5 | The defined runner tags |
| `CI_RUNNER_VERSION` | all | 10.6 | GitLab Runner version that is executing the current job |
| `CI_RUNNER_SHORT_TOKEN` | all | 12.3 | First eight characters of GitLab Runner's token used to authenticate new job requests. Used as Runner's unique ID |
| `CI_SERVER` | all | all | Mark that job is executed in CI environment |
| `CI_SERVER_HOST` | 12.1 | all | Host component of the GitLab instance URL, without protocol and port (like gitlab.example.com) |
| `CI_SERVER_NAME` | all | all | The name of CI server that is used to coordinate jobs |
Loading
Loading
Loading
Loading
@@ -99,7 +99,7 @@ automatically.
Its simplest usage is to provide the value for `title`:
 
```text
$ bin/changelog 'Hey DZ, I added a feature to GitLab!'
bin/changelog 'Hey DZ, I added a feature to GitLab!'
```
 
At this point the script would ask you to select the category of the change (mapped to the `type` field in the entry):
Loading
Loading
Loading
Loading
@@ -72,7 +72,7 @@ from teams other than your own.
1. If your merge request includes adding a new UI/UX paradigm [^1], it must be
**approved by a [UX lead][team]**.
1. If your merge request includes a new dependency or a filesystem change, it must be
**approved by a [Distribution team member][team]**. See how to work with the [Distribution team](https://about.gitlab.com/handbook/engineering/dev-backend/distribution/) for more details.
**approved by a [Distribution team member][team]**. See how to work with the [Distribution team](https://about.gitlab.com/handbook/engineering/development/enablement/distribution/#how-to-work-with-distribution) for more details.
 
#### Security requirements
 
Loading
Loading
Loading
Loading
@@ -27,7 +27,7 @@ no overhead at all.
To enable `GITLAB_TRACING`, a valid _"configuration-string"_ value should be set, with a URL-like
form:
 
```console
```sh
GITLAB_TRACING=opentracing://<driver>?<param_name>=<param_value>&<param_name_2>=<param_value_2>
```
 
Loading
Loading
@@ -90,7 +90,7 @@ documentation](https://www.jaegertracing.io/docs/1.9/getting-started/).
If you have Docker available, the easier approach to running the Jaeger all-in-one is through
Docker, using the following command:
 
```console
```sh
$ docker run \
--rm \
-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
Loading
Loading
@@ -121,8 +121,8 @@ appropriate configuration string.
 
**TL;DR:** If you are running everything on the same host, use the following value:
 
```console
$ export GITLAB_TRACING="opentracing://jaeger?http_endpoint=http%3A%2F%2Flocalhost%3A14268%2Fapi%2Ftraces&sampler=const&sampler_param=1"
```sh
export GITLAB_TRACING="opentracing://jaeger?http_endpoint=http%3A%2F%2Flocalhost%3A14268%2Fapi%2Ftraces&sampler=const&sampler_param=1"
```
 
This configuration string uses the Jaeger driver `opentracing://jaeger` with the following options:
Loading
Loading
@@ -152,7 +152,7 @@ application.
 
When `GITLAB_TRACING` is configured properly, the application will log this on startup:
 
```console
```sh
13:41:53 gitlab-workhorse.1 | 2019/02/12 13:41:53 Tracing enabled
...
13:41:54 gitaly.1 | 2019/02/12 13:41:54 Tracing enabled
Loading
Loading
@@ -161,7 +161,7 @@ When `GITLAB_TRACING` is configured properly, the application will log this on s
 
If `GITLAB_TRACING` is not configured correctly, this will also be logged:
 
```console
```sh
13:43:45 gitaly.1 | 2019/02/12 13:43:45 skipping tracing configuration step: tracer: unable to load driver mytracer
```
 
Loading
Loading
Loading
Loading
@@ -262,7 +262,7 @@ table_display_block: true
## Punctuation
 
Check the general punctuation rules for the GitLab documentation on the table below.
Check specific punctuation rules for [list items](#list-items) below.
Check specific punctuation rules for [lists](#lists) below.
 
| Rule | Example |
| ---- | ------- |
Loading
Loading
@@ -274,37 +274,44 @@ Check specific punctuation rules for [list items](#list-items) below.
| Always add a space before and after dashes when using it in a sentence (for replacing a comma, for example). | _You should try this - or not._ |
| Always use lowercase after a colon. | _Related Issues: a way to create a relationship between issues._ |
 
## List items
## Lists
 
- Always start list items with a capital letter, unless they are parameters or commands
that are in backticks, or similar.
- Always leave a blank line before and after a list.
- Begin a line with spaces (not tabs) to denote a [nested subitem](#nesting-inside-a-list-item).
- Only use ordered lists when their items describe a sequence of steps to follow:
 
Do:
### Ordered vs. unordered lists
 
These are the steps to do something:
Only use ordered lists when their items describe a sequence of steps to follow.
 
1. First, do step 1
1. Then, do step 2
1. Finally, do step 3
Do:
```md
These are the steps to do something:
1. First, do the first step.
1. Then, do the next step.
1. Finally, do the last step.
```
 
Don't:
Don't:
 
This is a list of different features:
```md
This is a list of available features:
 
1. Feature 1
1. Feature 2
1. Feature 3
1. Feature 1
1. Feature 2
1. Feature 3
```
 
**Markup:**
### Markup
 
- Use dashes (`-`) for unordered lists instead of asterisks (`*`).
- Prefix `1.` to each item in an ordered list.
- Prefix `1.` to every item in an ordered list.
When rendered, the list items will appear with sequential numbering automatically.
 
**Punctuation:**
### Punctuation
 
- Do not add commas (`,`) or semicolons (`;`) to the end of list items.
- Only add periods to the end of a list item if the item consists of a complete sentence.
Loading
Loading
@@ -343,7 +350,7 @@ Do:
- Let's say this is also a complete sentence.
- Not a complete sentence.
 
Don't (third item should have a `.` to match the first and second items):
Don't (vary use of periods; majority rules):
 
- Let's say this is a complete sentence.
- Let's say this is also a complete sentence.
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ _Note:_ The action itself will not update the state, only a mutation should upda
 
## File structure
 
When using Vuex at GitLab, separate this concerns into different files to improve readability:
When using Vuex at GitLab, separate these concerns into different files to improve readability:
 
```
└── store
Loading
Loading
Loading
Loading
@@ -81,9 +81,7 @@ If you're using Pry you can use the `$` command to display the source code of a
method (along with its source location), this is easier than running the above
Ruby code. In case of the above snippet you'd run the following:
 
```
$ Banzai::Renderer.render
```
- `$ Banzai::Renderer.render`
 
This will print out something along the lines of:
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment