Commit 9fdfbd55 authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-10-31

# Conflicts:
#	app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
#	app/models/blob.rb
#	locale/gitlab.pot
#	spec/javascripts/vue_mr_widget/mock_data.js

[ci skip]
parents c52b1d48 418de3fc
import $ from 'jquery';
import { slugifyWithHyphens } from './lib/utils/text_utility';
export default class Group {
constructor() {
......@@ -7,17 +8,18 @@ export default class Group {
this.updateHandler = this.update.bind(this);
this.resetHandler = this.reset.bind(this);
if (this.groupName.val() === '') {
this.groupPath.on('keyup', this.updateHandler);
this.groupName.on('keydown', this.resetHandler);
this.groupName.on('keyup', this.updateHandler);
this.groupPath.on('keydown', this.resetHandler);
}
}
update() {
this.groupName.val(this.groupPath.val());
const slug = slugifyWithHyphens(this.groupName.val());
this.groupPath.val(slug);
}
reset() {
this.groupPath.off('keyup', this.updateHandler);
this.groupName.off('keydown', this.resetHandler);
this.groupName.off('keyup', this.updateHandler);
this.groupPath.off('keydown', this.resetHandler);
}
}
<script>
import { s__, sprintf } from '~/locale';
import eventHub from '../event_hub';
import icon from '../../vue_shared/components/icon.vue';
import Icon from '../../vue_shared/components/icon.vue';
import tooltip from '../../vue_shared/directives/tooltip';
import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
......@@ -10,7 +10,7 @@ export default {
tooltip,
},
components: {
icon,
Icon,
GlCountdown,
},
props: {
......
<script>
import tooltip from '../../vue_shared/directives/tooltip';
import icon from '../../vue_shared/components/icon.vue';
import Icon from '../../vue_shared/components/icon.vue';
export default {
directives: {
tooltip,
},
components: {
icon,
Icon,
},
props: {
artifacts: {
......
......@@ -88,25 +88,25 @@ export default {
class="table-section section-10 js-pipeline-status pipeline-status"
role="rowheader"
>
Status
{{ s__('Pipeline|Status') }}
</div>
<div
class="table-section section-15 js-pipeline-info pipeline-info"
role="rowheader"
>
Pipeline
{{ s__('Pipeline|Pipeline') }}
</div>
<div
class="table-section section-20 js-pipeline-commit pipeline-commit"
role="rowheader"
>
Commit
{{ s__('Pipeline|Commit') }}
</div>
<div
class="table-section section-20 js-pipeline-stages pipeline-stages"
role="rowheader"
>
Stages
{{ s__('Pipeline|Stages') }}
</div>
</div>
<pipelines-table-row-component
......
......@@ -261,7 +261,7 @@ export default {
class="table-mobile-header"
role="rowheader"
>
Status
{{ s__('Pipeline|Status') }}
</div>
<div class="table-mobile-content">
<ci-badge
......@@ -279,8 +279,9 @@ export default {
<div class="table-section section-20">
<div
class="table-mobile-header"
role="rowheader">
Commit
role="rowheader"
>
{{ s__('Pipeline|Commit') }}
</div>
<div class="table-mobile-content">
<commit-component
......@@ -298,8 +299,9 @@ export default {
<div class="table-section section-wrap section-20 stage-cell">
<div
class="table-mobile-header"
role="rowheader">
Stages
role="rowheader"
>
{{ s__('Pipeline|Stages') }}
</div>
<div class="table-mobile-content">
<template v-if="pipeline.details.stages.length > 0">
......
......@@ -60,7 +60,7 @@ export default {
class="table-mobile-header"
role="rowheader"
>
Duration
{{ s__('Pipeline|Duration') }}
</div>
<div class="table-mobile-content">
<p
......@@ -87,7 +87,8 @@ export default {
v-tooltip
:title="tooltipTitle(finishedTime)"
data-placement="top"
data-container="body">
data-container="body"
>
{{ timeFormated(finishedTime) }}
</time>
</p>
......
......@@ -226,7 +226,7 @@ export class SearchAutocomplete {
icon,
text: term,
template: s__('SearchAutocomplete|in all GitLab'),
url: `/search?search=${term}`,
url: `${gon.relative_url_root}/search?search=${term}`,
});
if (template) {
......@@ -234,7 +234,7 @@ export class SearchAutocomplete {
icon,
text: term,
template,
url: `/search?search=${term}&project_id=${this.projectInputEl.val()}&group_id=${this.groupInputEl.val()}`,
url: `${gon.relative_url_root}/search?search=${term}&project_id=${this.projectInputEl.val()}&group_id=${this.groupInputEl.val()}`,
});
}
}
......
......@@ -72,6 +72,7 @@ export default {
linkEnd: '</a>',
});
},
<<<<<<< HEAD
/* We typically set defaults ([]) in the store or prop declarations, but because triggered
* and triggeredBy are appended to `pipeline`, we can't set defaults in the store, and we
* need to check their length here to prevent initializing linked-pipeline-mini-lists
......@@ -83,6 +84,8 @@ export default {
const response = this.pipeline.triggered_by;
return response ? [response] : [];
},
=======
>>>>>>> upstream/master
},
};
</script>
......
......@@ -2,7 +2,10 @@
# Blob is a Rails-specific wrapper around Gitlab::Git::Blob, SnippetBlob and Ci::ArtifactBlob
class Blob < SimpleDelegator
<<<<<<< HEAD
prepend EE::Blob
=======
>>>>>>> upstream/master
include Presentable
include BlobLanguageFromGitAttributes
......
- @hide_breadcrumbs = true
- @hide_top_links = true
- page_title 'New Group'
- header_title "Groups", dashboard_groups_path
- page_title _('New Group')
- header_title _("Groups"), dashboard_groups_path
.page-title-holder
%h1.page-title= _('New group')
.row.prepend-top-default
.col-lg-3.profile-settings-sidebar
%h4.prepend-top-0
= _('New group')
%p
- group_docs_path = help_page_path('user/group/index')
- group_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_docs_path }
......@@ -15,25 +15,30 @@
- subgroup_docs_path = help_page_path('user/group/subgroups/index')
- subgroup_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: subgroup_docs_path }
= s_('Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}.').html_safe % { subgroup_docs_link_start: subgroup_docs_link_start, subgroup_docs_link_end: '</a>'.html_safe }
%p
= _('Projects that belong to a group are prefixed with the group namespace. Existing projects may be moved into a group.')
.col-lg-9
= form_for @group, html: { class: 'group-form gl-show-field-errors' } do |f|
= form_errors(@group)
= render 'shared/group_form', f: f, autofocus: true
.form-group.row.group-description-holder
= f.label :avatar, "Group avatar", class: 'col-form-label col-sm-2'
.col-sm-10
.row
.form-group.group-description-holder.col-sm-12
= f.label :avatar, _("Group avatar"), class: 'label-bold'
%div
= render 'shared/choose_group_avatar_button', f: f
= render 'shared/old_visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group, with_label: false
.form-group.col-sm-12
%label.label-bold
= _('Visibility level')
%p
= _('Who will be able to see this group?')
= link_to _('View the documentation'), help_page_path("public_access/public_access"), target: '_blank'
= render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group, with_label: false
= render 'create_chat_team', f: f if Gitlab.config.mattermost.enabled
.form-group.row
.offset-sm-2.col-sm-10
= render 'shared/group_tips'
.form-actions
= f.submit 'Create group', class: "btn btn-success"
= link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel'
......@@ -46,7 +46,7 @@
Layout width
= f.select :layout, layout_choices, {}, class: 'form-control'
.form-text.text-muted
Choose between fixed (max. 1200px) and fluid (100%) application layout.
Choose between fixed (max. 1280px) and fluid (100%) application layout.
.form-group
= f.label :dashboard, class: 'label-bold' do
Default dashboard
......@@ -56,6 +56,6 @@
Project overview content
= f.select :project_view, project_view_choices, {}, class: 'form-control'
.form-text.text-muted
Choose what content you want to see on a project’s overview page
Choose what content you want to see on a project’s overview page.
.form-group
= f.submit 'Save changes', class: 'btn btn-success'
......@@ -2,10 +2,19 @@
- group_path = root_url
- group_path << parent.full_path + '/' if parent
.form-group.row
= f.label :path, class: 'col-form-label col-sm-2' do
Group path
.col-sm-10
.row
.form-group.group-name-holder.col-sm-12
= f.label :name, class: 'label-bold' do
= _("Group name")
= f.text_field :name, placeholder: 'My Awesome Group', class: 'form-control input-lg',
required: true,
title: _('Please fill in a descriptive name for your group.'),
autofocus: true
.row
.form-group.col-xs-12.col-sm-8
= f.label :path, class: 'label-bold' do
= _("Group URL")
.input-group.gl-field-error-anchor
.group-root-path.input-group-prepend.has-tooltip{ title: group_path, :'data-placement' => 'bottom' }
.input-group-text
......@@ -13,10 +22,10 @@
- if parent
%strong= parent.full_path + '/'
= f.hidden_field :parent_id
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
= f.text_field :path, placeholder: 'my-awesome-group', class: 'form-control',
autofocus: local_assigns[:autofocus] || false, required: true,
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
title: 'Please choose a group path with no special characters.',
title: _('Please choose a group URL with no special characters.'),
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
- if @group.persisted?
......@@ -25,23 +34,17 @@
= succeed '.' do
= link_to 'Learn more', help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank'
.form-group.row.group-name-holder
= f.label :name, class: 'col-form-label col-sm-2' do
Group name
.col-sm-10
= f.text_field :name, class: 'form-control',
required: true,
title: 'You can choose a descriptive name different from the path.'
- if @group.persisted?
.form-group.row.group-name-holder
= f.label :id, class: 'col-form-label col-sm-2' do
.row
.form-group.group-name-holder.col-sm-8
= f.label :id, class: 'label-bold' do
= _("Group ID")
.col-sm-10
= f.text_field :id, class: 'form-control', readonly: true
.form-group.row.group-description-holder
= f.label :description, class: 'col-form-label col-sm-2'
.col-sm-10
.row
.form-group.group-description-holder.col-sm-8
= f.label :description, class: 'label-bold' do
= _("Group description")
%span (optional)
= f.text_area :description, maxlength: 250,
class: 'form-control js-gfm-input', rows: 4
---
title: 'Create new group: Rename form fields and update UI'
merge_request:
author:
type: other
---
title: Fix incompatibility with IE11 due to non-transpiled gitlab-ui components
merge_request: 22695
author:
type: fixed
---
title: Adds missing i18n to pipelines table
merge_request:
author:
type: other
---
title: Enable frozen string for lib/gitlab/ci
merge_request:
author: gfyoung
type: performance
---
title: Fix search "all in GitLab" not working with relative URLs
merge_request: 22644
author:
type: fixed
......@@ -8,6 +8,8 @@ en:
issue_link:
source: Source issue
target: Target issue
group:
path: Group URL
errors:
messages:
label_already_exists_at_group_level: "already exists at group level for %{group}. Please choose another one."
......
......@@ -152,14 +152,31 @@ in RC1, followed by the feature flag being removed in RC2. This in turn means
the feature will be stable by the time we publish a stable package around the
22nd of the month.
## Undefined feature flags default to "on"
## Implicit feature flags
By default, the [`Project#feature_available?`][project-fa],
The [`Project#feature_available?`][project-fa],
[`Namespace#feature_available?`][namespace-fa] (EE), and
[`License.feature_available?`][license-fa] (EE) methods will check if the
specified feature is behind a feature flag. Unless the feature is explicitly
disabled or limited to a percentage of users, the feature flag check will
default to `true`.
[`License.feature_available?`][license-fa] (EE) methods all implicitly check for
a feature flag by the same name as the provided argument.
For example if a feature is license-gated, there's no need to add an additional
explicit feature flag check since the flag will be checked as part of the
`License.feature_available?` call. Similarly, there's no need to "clean up" a
feature flag once the feature has reached general availability.
You'd still want to use an explicit `Feature.enabled?` check if your new feature
isn't gated by a License or Plan.
[project-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/app/models/project_feature.rb#L63-68
[namespace-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/ee/app/models/ee/namespace.rb#L71-85
[license-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/ee/app/models/license.rb#L293-300
### Undefined feature flags default to "on"
An important side-effect of the [implicit feature
flags][#implicit-feature-flags] mentioned above is that unless the feature is
explicitly disabled or limited to a percentage of users, the feature flag check
will default to `true`.
As an example, if you were to ship the backend half of a feature behind a flag,
you'd want to explicitly disable that flag until the frontend half is also ready
......@@ -171,7 +188,3 @@ to be shipped. You can do this via ChatOps:
Note that you can do this at any time, even before the merge request using the
flag has been merged!
[project-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/app/models/project_feature.rb#L63-68
[namespace-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/ee/app/models/ee/namespace.rb#L71-85
[license-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/ee/app/models/license.rb#L293-300
......@@ -9,37 +9,39 @@ You can only restore a backup to **exactly the same version and type (CE/EE)**
of GitLab on which it was created. The best way to migrate your repositories
from one server to another is through backup restore.
## Backup
## Requirements
GitLab provides a simple command line interface to backup your whole installation,
and is flexible enough to fit your needs.
In order to be able to backup and restore, you need two essential tools
installed on your system.
### Requirements
### Rsync
* rsync
If you installed GitLab:
If you're using GitLab with the Omnibus package, you're all set. If you
installed GitLab from source, make sure you have rsync installed.
- Using the Omnibus package, you're all set.
- From source, make sure `rsync` is installed:
If you're using Ubuntu, you could run:
```sh
# Debian/Ubuntu
sudo apt-get install rsync
```
sudo apt-get install -y rsync
```
# RHEL/CentOS
sudo yum install rsync
```
* tar
### Tar
Backup and restore tasks use `tar` under the hood to create and extract
archives. Ensure you have version 1.30 or above of `tar` available in your
system. To check the version, run:
```
```sh
tar --version
```
### Backup timestamp
## Backup timestamp
>**Note:**
NOTE: **Note:**
In GitLab 9.2 the timestamp format was changed from `EPOCH_YYYY_MM_DD` to
`EPOCH_YYYY_MM_DD_GitLab_version`, for example `1493107454_2018_04_25`
would become `1493107454_2018_04_25_10.6.4-ce`.
......@@ -54,30 +56,46 @@ available.
For example, if the backup name is `1493107454_2018_04_25_10.6.4-ce_gitlab_backup.tar`,
then the timestamp is `1493107454_2018_04_25_10.6.4-ce`.
### Creating a backup of the GitLab system
## Creating a backup of the GitLab system
GitLab provides a simple command line interface to backup your whole instance.
It backs up your:
- Database
- Attachments
- Git repositories data
- CI/CD job output logs
- CI/CD job artifacts
- LFS objects
- Container Registry images
- GitLab Pages content
CAUTION: **Warning:**
GitLab does not back up any configuration files, SSL certificates, or system files.
You are highly advised to [read about storing configuration files](#storing-configuration-files).
Use this command if you've installed GitLab with the Omnibus package:
```
```sh
sudo gitlab-rake gitlab:backup:create
```
Use this if you've installed GitLab from source:
```
```sh
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
If you are running GitLab within a Docker container, you can run the backup from the host:
```
```sh
docker exec -t <container name> gitlab-rake gitlab:backup:create
```
If you are using the gitlab-omnibus helm chart on a Kubernetes cluster, you can
run the backup task on the gitlab application pod using kubectl
run the backup task on the gitlab application pod using kubectl:
```
```sh
kubectl exec -it <gitlab-gitlab pod> gitlab-rake gitlab:backup:create
```
......@@ -110,9 +128,50 @@ Deleting tmp directories...[DONE]
Deleting old backups... [SKIPPING]
```
## Storing configuration files
A backup performed by the [raketask GitLab provides](#creating-a-backup-of-the-gitlab-system)
does **not** store your configuration files. The primary reason for this is that your
database contains encrypted information for two-factor authentication, the CI/CD
'secure variables', etc. Storing encrypted information along with its key in the
same place defeats the purpose of using encryption in the first place.
CAUTION: **Warning:**
The secrets file is essential to preserve your database encryption key.
At the very **minimum**, you must backup:
For Omnibus:
- `/etc/gitlab/gitlab-secrets.json`
- `/etc/gitlab/gitlab.rb`
For installation from source:
- `/home/git/gitlab/config/secrets.yml`
- `/home/git/gitlab/config/gitlab.yml`
For [Docker installations](https://docs.gitlab.com/omnibus/docker/), you must
back up the volume where the configuration files are stored. If you have created
the GitLab container according to the documentation, it should be under
`/srv/gitlab/config`.
You may also want to back up any TLS keys and certificates, and your
[SSH host keys](https://superuser.com/questions/532040/copy-ssh-keys-from-one-server-to-another-server/532079#532079).
If you use Omnibus GitLab, see some additional information
[to backup your configuration](https://docs.gitlab.com/omnibus/settings/backups.html).
In the unlikely event that the secrets file is lost, see the
[troubleshooting section](#when-the-secrets-file-is-lost).
## Backup options
The command line tool GitLab provides to backup your instance can take more options.
### Backup strategy option
> **Note:** Introduced as an option in GitLab 8.17.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8728) in GitLab 8.17.
The default backup strategy is to essentially stream data from the respective
data locations to the backup using the Linux command `tar` and `gzip`. This works
......@@ -129,8 +188,11 @@ so the problem doesn't compound, but it could be a considerable change for large
installations. This is why the `copy` strategy is not the default in 8.17.
To use the `copy` strategy instead of the default streaming strategy, specify
`STRATEGY=copy` in the Rake task command. For example,
`sudo gitlab-rake gitlab:backup:create STRATEGY=copy`.
`STRATEGY=copy` in the Rake task command. For example:
```sh
sudo gitlab-rake gitlab:backup:create STRATEGY=copy
```
### Excluding specific directories from the backup
......@@ -151,11 +213,15 @@ Use a comma to specify several options at the same time:
All wikis will be backed up as part of the `repositories` group. Non-existent wikis
will be skipped during a backup.
```
# use this command if you've installed GitLab with the Omnibus package
For Omnibus GitLab packages:
```sh
sudo gitlab-rake gitlab:backup:create SKIP=db,uploads
```
For installations from source:
# if you've installed GitLab from source
```sh
sudo -u git -H bundle exec rake gitlab:backup:create SKIP=db,uploads RAILS_ENV=production
```
......@@ -208,7 +274,7 @@ This example can be used for a bucket in Amsterdam (AMS3).
1. [Reconfigure GitLab] for the changes to take effect
CAUTION: **Warning:**
NOTE: **Note:**
If you see `400 Bad Request` by using Digital Ocean Spaces, the cause may be the
usage of backup encryption. Remove or comment the line that
contains `gitlab_rails['backup_encryption']` since Digital Ocean Spaces
......@@ -370,24 +436,32 @@ backups will be copied to, and will be created if it does not exist. If the
directory that you want to copy the tarballs to is the root of your mounted
directory, just use `.` instead.
For omnibus packages:
```ruby
gitlab_rails['backup_upload_connection'] = {
For Omnibus GitLab packages:
1. Edit `/etc/gitlab/gitlab.rb`:
```ruby
gitlab_rails['backup_upload_connection'] = {
:provider => 'Local',
:local_root => '/mnt/backups'
}
}
# The directory inside the mounted folder to copy backups to
# Use '.' to store them in the root directory
gitlab_rails['backup_upload_remote_directory'] = 'gitlab_backups'
```
# The directory inside the mounted folder to copy backups to
# Use '.' to store them in the root directory
gitlab_rails['backup_upload_remote_directory'] = 'gitlab_backups'
```
1. [Reconfigure GitLab] for the changes to take effect.
---
For installations from source:
```yaml
1. Edit `home/git/gitlab/config/gitlab.yml`:
```yaml
backup:
# snip
upload:
# Fog storage connection settings, see http://fog.io/storage/ .
connection:
......@@ -396,7 +470,9 @@ For installations from source:
# The directory inside the mounted folder to copy backups to
# Use '.' to store them in the root directory
remote_directory: 'gitlab_backups'
```
```
1. [Restart GitLab] for the changes to take effect.
### Backup archive permissions
......@@ -405,45 +481,56 @@ will have owner/group git:git and 0600 permissions by default.
This is meant to avoid other system users reading GitLab's data.
If you need the backup archives to have different permissions you can use the 'archive_permissions' setting.
```
# In /etc/gitlab/gitlab.rb, for omnibus packages
gitlab_rails['backup_archive_permissions'] = 0644 # Makes the backup archives world-readable
```
For Omnibus GitLab packages:
```
# In gitlab.yml, for installations from source:
backup:
archive_permissions: 0644 # Makes the backup archives world-readable
```
1. Edit `/etc/gitlab/gitlab.rb`:
### Storing configuration files
```ruby
gitlab_rails['backup_archive_permissions'] = 0644 # Makes the backup archives world-readable
```
Please be informed that a backup does not store your configuration
files. One reason for this is that your database contains encrypted
information for two-factor authentication. Storing encrypted
information along with its key in the same place defeats the purpose
of using encryption in the first place!
1. [Reconfigure GitLab] for the changes to take effect.
If you use an Omnibus package please see the [instructions in the readme to backup your configuration](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#backup-and-restore-omnibus-gitlab-configuration).
If you have a cookbook installation there should be a copy of your configuration in Chef.
If you installed from source, please consider backing up your `config/secrets.yml` file, `gitlab.yml` file, any SSL keys and certificates, and your [SSH host keys](https://superuser.com/questions/532040/copy-ssh-keys-from-one-server-to-another-server/532079#532079).
---
At the very **minimum** you should backup `/etc/gitlab/gitlab.rb` and
`/etc/gitlab/gitlab-secrets.json` (Omnibus), or
`/home/git/gitlab/config/secrets.yml` (source) to preserve your database
encryption key.
For installations from source:
1. Edit `/home/git/gitlab/config/gitlab.yml`:
```yaml
backup:
archive_permissions: 0644 # Makes the backup archives world-readable
```
1. [Restart GitLab] for the changes to take effect.
### Configuring cron to make daily backups
>**Note:**
NOTE: **Note:**
The following cron jobs do not [backup your GitLab configuration files](#storing-configuration-files)
or [SSH host keys](https://superuser.com/questions/532040/copy-ssh-keys-from-one-server-to-another-server/532079#532079).
**For Omnibus installations**
For Omnibus GitLab packages:
1. Edit `/etc/gitlab/gitlab.rb`:
```ruby
## Limit backup lifetime to 7 days - 604800 seconds
gitlab_rails['backup_keep_time'] = 604800
```
1. [Reconfigure GitLab] for the changes to take effect.
Note that the `backup_keep_time` configuration option only manages local
files. GitLab does not automatically prune old files stored in a third-party
object storage (e.g., AWS S3) because the user may not have permission to list
and delete files. We recommend that you configure the appropriate retention
policy for your object storage. For example, you can configure [the S3 backup
policy as described here](http://stackoverflow.com/questions/37553070/gitlab-omnibus-delete-backup-from-amazon-s3).
To schedule a cron job that backs up your repositories and GitLab metadata, use the root user:
```
```sh
sudo su -
crontab -e
```
......@@ -455,26 +542,24 @@ There, add the following line to schedule the backup for everyday at 2 AM:
```
You may also want to set a limited lifetime for backups to prevent regular
backups using all your disk space. To do this add the following lines to
`/etc/gitlab/gitlab.rb` and reconfigure:
backups using all your disk space.
```
# limit backup lifetime to 7 days - 604800 seconds
gitlab_rails['backup_keep_time'] = 604800
```
---
Note that the `backup_keep_time` configuration option only manages local
files. GitLab does not automatically prune old files stored in a third-party
object storage (e.g., AWS S3) because the user may not have permission to list
and delete files. We recommend that you configure the appropriate retention
policy for your object storage. For example, you can configure [the S3 backup
policy as described here](http://stackoverflow.com/questions/37553070/gitlab-omnibus-delete-backup-from-amazon-s3).
For installations from source:
**For installation from source**
1. Edit `home/git/gitlab/config/gitlab.yml`:
```
cd /home/git/gitlab
sudo -u git -H editor config/gitlab.yml # Enable keep_time in the backup section to automatically delete old backups
```yaml
backup:
## Limit backup lifetime to 7 days - 604800 seconds
keep_time: 604800
```
1. [Restart GitLab] for the changes to take effect.
```sh
sudo -u git crontab -e # Edit the crontab for the git user
```
......@@ -711,5 +796,53 @@ Those objects have no influence on the database backup/restore but they give thi
For more information see similar questions on postgresql issue tracker[here](http://www.postgresql.org/message-id/201110220712.30886.adrian.klaver@gmail.com) and [here](http://www.postgresql.org/message-id/2039.1177339749@sss.pgh.pa.us) as well as [stack overflow](http://stackoverflow.com/questions/4368789/error-must-be-owner-of-language-plpgsql).
### When the secrets file is lost
If you have failed to [back up the secrets file](#storing-configuration-files),
then users with 2FA enabled will not be able to log into GitLab. In that case,
you need to [disable 2FA for everyone](../security/two_factor_authentication.md#disabling-2fa-for-everyone).
In the case of CI/CD, if your project has secure variables set, you might experience
some weird behavior, like stuck jobs or 500 errors. In that case, you can try
deleting the `ci_variables` table from the database.
CAUTION: **Warning:**
Use the following commands at your own risk, and make sure you've taken a
backup beforehand.
1. Enter the Rails console:
For Omnibus GitLab packages:
```sh
sudo gitlab-rails dbconsole
```
For installations from source:
```sh
sudo -u git -H bundle exec rails dbconsole RAILS_ENV=production
```
1. Check the `ci_variables` table:
```sql
SELECT * FROM public."ci_variables";
```
Those are the variables that you need to delete.
1. Drop the table:
```sql
DELETE FROM ci_variables;
```
1. You may need to reconfigure or restart GitLab for the changes to take
effect.
You should now be able to visit your project, and the jobs will start
running again.
[reconfigure GitLab]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
[restart GitLab]: ../administration/restart_gitlab.md#installations-from-source
......@@ -42,7 +42,11 @@ not send any project names, usernames, or any other specific data. The
information from the usage ping is not anonymous, it is linked to the hostname
of the instance.
You can view the exact JSON payload in the administration panel.
You can view the exact JSON payload in the administration panel. To view the payload:
1. Go to the **Admin area** (spanner symbol on the top bar).
1. Expand **Settings** in the left sidebar and click on **Metrics and profiling**.
1. Expand **Usage statistics** and click on the **Preview payload** button.
### Deactivate the usage ping
......
......@@ -114,6 +114,14 @@ To add an existing Kubernetes cluster to your project:
After a couple of minutes, your cluster will be ready to go. You can now proceed
to install some [pre-defined applications](#installing-applications).
To determine the:
- API URL, run `kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}'`.
- Token:
1. List the secrets by running: `kubectl get secrets`. Note the name of the secret you need the token for.
1. Get the token for the appropriate secret by running: `kubectl get secret <SECRET_NAME> -o jsonpath="{['data']['token']}" | base64 -D`.
- CA certificate, run `kubectl get secret <secret name> -o jsonpath="{['data']['ca\.crt']}" | base64 -D`.
## Security implications
CAUTION: **Important:**
......
......@@ -10,31 +10,32 @@ You can find notification settings under the user profile.
Notification settings are divided into three groups:
* Global Settings
* Group Settings
* Project Settings
- Global settings
- Group settings
- Project settings
Each of these settings have levels of notification:
* Disabled - turns off notifications
* Participating - receive notifications from related resources
* Watch - receive notifications from projects or groups user is a member of
* Global - notifications as set at the global settings
* Custom - user will receive notifications when mentioned, is participant and custom selected events.
- Watch: Receive notifications for any activity.
- On Mention: Receive notifications when `@mentioned` in comments.
- Participate: Receive notifications for threads you have participated in.
- Disabled: Turns off notifications.
- Custom: Receive notifications for custom selected events.
- Global: For groups and projects, notifications as per global settings.
#### Global Settings
### Global Settings
Global Settings are at the bottom of the hierarchy.
Global settings are at the bottom of the hierarchy.
Any setting set here will be overridden by a setting at the group or a project level.
Group or Project settings can use `global` notification setting which will then use
anything that is set at Global Settings.
#### Group Settings
### Group Settings
![notification settings](img/notification_group_settings.png)
Group Settings are taking precedence over Global Settings but are on a level below Project or Subgroup Settings:
Group settings are taking precedence over Global Settings but are on a level below Project or Subgroup settings:
```
Group < Subgroup < Project
......@@ -46,11 +47,11 @@ Organization like this is suitable for users that belong to different groups but
same need for being notified for every group they are member of.
These settings can be configured on group page under the name of the group. It will be the dropdown with the bell icon. They can also be configured on the user profile notifications dropdown.
#### Project Settings
### Project Settings
![notification settings](img/notification_project_settings.png)
Project Settings are at the top level and any setting placed at this level will take precedence of any
Project settings are at the top level and any setting placed at this level will take precedence of any
other setting.
This is suitable for users that have different needs for notifications per project basis.
These settings can be configured on project page under the name of the project. It will be the dropdown with the bell icon. They can also be configured on the user profile notifications dropdown.
......@@ -73,6 +74,7 @@ Below is the table of events users can be notified of:
### Issue / Merge request events
In most of the below cases, the notification will be sent to:
- Participants:
- the author and assignee of the issue/merge request
- authors of comments on the issue/merge request
......@@ -130,9 +132,11 @@ Notification emails include headers that provide extra content about the notific
| X-GitLab-NotificationReason | The reason for being notified. "mentioned", "assigned", etc |
#### X-GitLab-NotificationReason
This header holds the reason for the notification to have been sent out,
where reason can be `mentioned`, `assigned`, `own_activity`, etc.
Only one reason is sent out according to its priority:
- `own_activity`
- `assigned`
- `mentioned`
......@@ -141,5 +145,6 @@ The reason in this header will also be shown in the footer of the notification e
reason `assigned` will have this sentence in the footer:
`"You are receiving this email because you have been assigned an item on {configured GitLab hostname}"`
**Note: Only reasons listed above have been implemented so far**
Further implementation is [being discussed here](https://gitlab.com/gitlab-org/gitlab-ce/issues/42062)
NOTE: **Note:**
Only reasons listed above have been implemented so far.
Further implementation is [being discussed](https://gitlab.com/gitlab-org/gitlab-ce/issues/42062).
# frozen_string_literal: true
# ANSI color library
#
# Implementation per http://en.wikipedia.org/wiki/ANSI_escape_code
......@@ -265,7 +267,7 @@ module Gitlab
def reset_state
@offset = 0
@n_open_tags = 0
@out = ''
@out = +''
reset
end
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
require 'zlib'
require 'json'
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Build
......
# frozen_string_literal: true
module Gitlab
module Ci
module Charts
......
# frozen_string_literal: true
module Gitlab
module Ci
#
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class Config
......
# frozen_string_literal: true
module Gitlab
module Ci
class CronParser
......
# frozen_string_literal: true
module Gitlab
module Ci::MaskSecret
class << self
def mask!(value, token)
return value unless value.present? && token.present?
# We assume 'value' must be mutable, given
# that frozen string is enabled.
value.gsub!(token, 'x' * token.length)
value
end
......
# frozen_string_literal: true
module Gitlab
module Ci
module Model
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
module Gitlab # rubocop:disable Naming/FileName
# rubocop:disable Naming/FileName
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
module Chain
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Pipeline
......
# frozen_string_literal: true
module Gitlab
module Ci
module Reports
......
# frozen_string_literal: true
module Gitlab
module Ci
module Reports
......
# frozen_string_literal: true
module Gitlab
module Ci
module Reports
......
# frozen_string_literal: true
module Gitlab
module Ci
module Reports
......
# frozen_string_literal: true
module Gitlab
module Ci
module Reports
......
# frozen_string_literal: true
module Gitlab
module Ci
class Trace
......
# frozen_string_literal: true
module Gitlab
module Ci
class YamlProcessor
......
......@@ -5,6 +5,7 @@ module Gitlab
class Blob
include Gitlab::BlobHelper
include Gitlab::EncodingHelper
extend Gitlab::Git::WrapsGitalyErrors
# This number is the maximum amount of data that we want to display to
# the user. We load as much as we can for encoding detection and LFS
......@@ -75,7 +76,7 @@ module Gitlab
# Returns array of Gitlab::Git::Blob
# Does not guarantee blob data will be set
def batch_lfs_pointers(repository, blob_ids)
repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
repository.gitaly_blob_client.batch_lfs_pointers(blob_ids.to_a)
end
end
......
......@@ -3,6 +3,7 @@ module Gitlab
module Git
class Commit
include Gitlab::EncodingHelper
extend Gitlab::Git::WrapsGitalyErrors
attr_accessor :raw_commit, :head
......@@ -59,7 +60,7 @@ module Gitlab
# This saves us an RPC round trip.
return nil if commit_id.include?(':')
commit = repo.wrapped_gitaly_errors do
commit = wrapped_gitaly_errors do
repo.gitaly_commit_client.find_commit(commit_id)
end
......@@ -100,7 +101,7 @@ module Gitlab
# Commit.between(repo, '29eda46b', 'master')
#
def between(repo, base, head)
repo.wrapped_gitaly_errors do
wrapped_gitaly_errors do
repo.gitaly_commit_client.between(base, head)
end
end
......@@ -125,7 +126,7 @@ module Gitlab
# are documented here:
# http://www.rubydoc.info/github/libgit2/rugged/Rugged#SORT_NONE-constant)
def find_all(repo, options = {})
repo.wrapped_gitaly_errors do
wrapped_gitaly_errors do
Gitlab::GitalyClient::CommitService.new(repo).find_all_commits(options)
end
end
......@@ -142,7 +143,7 @@ module Gitlab
# relation to each other. The last 10 commits for a branch for example,
# should go through .where
def batch_by_oid(repo, oids)
repo.wrapped_gitaly_errors do
wrapped_gitaly_errors do
repo.gitaly_commit_client.list_commits_by_oid(oids)
end
end
......
......@@ -3,6 +3,8 @@
module Gitlab
module Git
class CommitStats
include Gitlab::Git::WrapsGitalyErrors
attr_reader :id, :additions, :deletions, :total
# Instantiate a CommitStats object
......@@ -14,7 +16,7 @@ module Gitlab
@deletions = 0
@total = 0
repo.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_stats(repo, commit)
end
end
......
......@@ -2,6 +2,8 @@ module Gitlab
module Git
module Conflict
class Resolver
include Gitlab::Git::WrapsGitalyErrors
ConflictSideMissing = Class.new(StandardError)
ResolutionError = Class.new(StandardError)
......@@ -12,7 +14,7 @@ module Gitlab
end
def conflicts
@conflicts ||= @target_repository.wrapped_gitaly_errors do
@conflicts ||= wrapped_gitaly_errors do
gitaly_conflicts_client(@target_repository).list_conflict_files.to_a
end
rescue GRPC::FailedPrecondition => e
......@@ -22,7 +24,7 @@ module Gitlab
end
def resolve_conflicts(source_repository, resolution, source_branch:, target_branch:)
source_repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_conflicts_client(source_repository).resolve_conflicts(@target_repository, resolution, source_branch, target_branch)
end
end
......
module Gitlab
module Git
class RemoteMirror
include Gitlab::Git::WrapsGitalyErrors
def initialize(repository, ref_name)
@repository = repository
@ref_name = ref_name
end
def update(only_branches_matching: [])
@repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
@repository.gitaly_remote_client.update_remote_mirror(@ref_name, only_branches_matching)
end
end
......
......@@ -6,6 +6,7 @@ module Gitlab
module Git
class Repository
include Gitlab::Git::RepositoryMirroring
include Gitlab::Git::WrapsGitalyErrors
include Gitlab::EncodingHelper
include Gitlab::Utils::StrongMemoize
......@@ -845,23 +846,9 @@ module Gitlab
end
def gitaly_migrate(method, status: Gitlab::GitalyClient::MigrationStatus::OPT_IN, &block)
wrapped_gitaly_errors do
Gitlab::GitalyClient.migrate(method, status: status, &block)
rescue GRPC::NotFound => e
raise NoRepository.new(e)
rescue GRPC::InvalidArgument => e
raise ArgumentError.new(e)
rescue GRPC::BadStatus => e
raise CommandError.new(e)
end
def wrapped_gitaly_errors(&block)
yield block
rescue GRPC::NotFound => e
raise NoRepository.new(e)
rescue GRPC::InvalidArgument => e
raise ArgumentError.new(e)
rescue GRPC::BadStatus => e
raise CommandError.new(e)
end
def clean_stale_repository_files
......
......@@ -2,6 +2,7 @@ module Gitlab
module Git
class Tree
include Gitlab::EncodingHelper
extend Gitlab::Git::WrapsGitalyErrors
attr_accessor :id, :root_id, :name, :path, :flat_path, :type,
:mode, :commit_id, :submodule_url
......@@ -15,7 +16,7 @@ module Gitlab
def where(repository, sha, path = nil, recursive = false)
path = nil if path == '' || path == '/'
repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
repository.gitaly_commit_client.tree_entries(repository, sha, path, recursive)
end
end
......
module Gitlab
module Git
class Wiki
include Gitlab::Git::WrapsGitalyErrors
DuplicatePageError = Class.new(StandardError)
OperationError = Class.new(StandardError)
......@@ -65,37 +67,37 @@ module Gitlab
end
def write_page(name, format, content, commit_details)
@repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_write_page(name, format, content, commit_details)
end
end
def delete_page(page_path, commit_details)
@repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_delete_page(page_path, commit_details)
end
end
def update_page(page_path, title, format, content, commit_details)
@repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_update_page(page_path, title, format, content, commit_details)
end
end
def pages(limit: 0)
@repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_get_all_pages(limit: limit)
end
end
def page(title:, version: nil, dir: nil)
@repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_find_page(title: title, version: version, dir: dir)
end
end
def file(name, version)
@repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_find_file(name, version)
end
end
......@@ -105,7 +107,7 @@ module Gitlab
# :per_page - The number of items per page.
# :limit - Total number of items to return.
def page_versions(page_path, options = {})
versions = @repository.wrapped_gitaly_errors do
versions = wrapped_gitaly_errors do
gitaly_wiki_client.page_versions(page_path, options)
end
......@@ -127,7 +129,7 @@ module Gitlab
def page_formatted_data(title:, dir: nil, version: nil)
version = version&.id
@repository.wrapped_gitaly_errors do
wrapped_gitaly_errors do
gitaly_wiki_client.get_formatted_data(title: title, dir: dir, version: version)
end
end
......
module Gitlab
module Git
module WrapsGitalyErrors
def wrapped_gitaly_errors(&block)
yield block
rescue GRPC::NotFound => e
raise Gitlab::Git::Repository::NoRepository.new(e)
rescue GRPC::InvalidArgument => e
raise ArgumentError.new(e)
rescue GRPC::BadStatus => e
raise Gitlab::Git::CommandError.new(e)
end
end
end
end
......@@ -3921,12 +3921,19 @@ msgstr ""
msgid "Group Runners"
msgstr ""
<<<<<<< HEAD
msgid "Group SAML must be enabled to test"
=======
msgid "Group URL"
>>>>>>> upstream/master
msgstr ""
msgid "Group avatar"
msgstr ""
msgid "Group description"
msgstr ""
msgid "Group description (optional)"
msgstr ""
......@@ -5778,15 +5785,24 @@ msgstr ""
msgid "Pipelines|This project is not currently set up to run pipelines."
msgstr ""
msgid "Pipeline|Commit"
msgstr ""
msgid "Pipeline|Create for"
msgstr ""
msgid "Pipeline|Create pipeline"
msgstr ""
msgid "Pipeline|Duration"
msgstr ""
msgid "Pipeline|Existing branch name or tag"
msgstr ""
msgid "Pipeline|Pipeline"
msgstr ""
msgid "Pipeline|Run Pipeline"
msgstr ""
......@@ -5796,6 +5812,12 @@ msgstr ""
msgid "Pipeline|Specify variable values to be used in this run. The values specified in %{settings_link} will be used by default."
msgstr ""
msgid "Pipeline|Stages"
msgstr ""
msgid "Pipeline|Status"
msgstr ""
msgid "Pipeline|Stop pipeline"
msgstr ""
......@@ -5832,12 +5854,18 @@ msgstr ""
msgid "Please accept the Terms of Service before continuing."
msgstr ""
msgid "Please choose a group URL with no special characters."
msgstr ""
msgid "Please convert them to %{link_to_git}, and go through the %{link_to_import_flow} again."
msgstr ""
msgid "Please convert them to Git on Google Code, and go through the %{link_to_import_flow} again."
msgstr ""
msgid "Please fill in a descriptive name for your group."
msgstr ""
msgid "Please note that this application is not provided by GitLab and you should verify its authenticity before allowing access."
msgstr ""
......@@ -6237,6 +6265,9 @@ msgstr ""
msgid "Projects shared with %{group_name}"
msgstr ""
msgid "Projects that belong to a group are prefixed with the group namespace. Existing projects may be moved into a group."
msgstr ""
msgid "ProjectsDropdown|Frequently visited"
msgstr ""
......@@ -8598,6 +8629,9 @@ msgstr ""
msgid "View replaced file @ "
msgstr ""
msgid "View the documentation"
msgstr ""
msgid "Visibility and access controls"
msgstr ""
......@@ -8664,6 +8698,9 @@ msgstr ""
msgid "Who can see this group?"
msgstr ""
msgid "Who will be able to see this group?"
msgstr ""
msgid "Wiki"
msgstr ""
......
......@@ -53,13 +53,33 @@ describe 'Admin Groups' do
expect_selected_visibility(internal)
end
it 'when entered in group path, it auto filled the group name', :js do
it 'when entered in group name, it auto filled the group path', :js do
visit admin_groups_path
click_link "New group"
group_path = 'gitlab'
group_name = 'gitlab'
fill_in 'group_name', with: group_name
path_field = find('input#group_path')
expect(path_field.value).to eq group_name
end
it 'auto populates the group path with the group name', :js do
visit admin_groups_path
click_link "New group"
group_name = 'my gitlab project'
fill_in 'group_name', with: group_name
path_field = find('input#group_path')
expect(path_field.value).to eq 'my-gitlab-project'
end
it 'when entering in group path, group name does not change anymore', :js do
visit admin_groups_path
click_link "New group"
group_path = 'my-gitlab-project'
group_name = 'My modified gitlab project'
fill_in 'group_path', with: group_path
name_field = find('input#group_name')
expect(name_field.value).to eq group_path
fill_in 'group_name', with: group_name
path_field = find('input#group_path')
expect(path_field.value).to eq 'my-gitlab-project'
end
end
......
......@@ -14,15 +14,15 @@ RSpec.describe 'Dashboard Group' do
it 'creates new group', :js do
visit dashboard_groups_path
find('.btn-success').click
new_path = 'Samurai'
new_name = 'Samurai'
new_description = 'Tokugawa Shogunate'
fill_in 'group_path', with: new_path
fill_in 'group_name', with: new_name
fill_in 'group_description', with: new_description
click_button 'Create group'
expect(current_path).to eq group_path(Group.find_by(name: new_path))
expect(page).to have_content(new_path)
expect(current_path).to eq group_path(Group.find_by(name: new_name))
expect(page).to have_content(new_name)
expect(page).to have_content(new_description)
end
end
......@@ -29,7 +29,7 @@ describe 'Top Plus Menu', :js do
click_topmenuitem("New group")
expect(page).to have_content('Group path')
expect(page).to have_content('Group URL')
expect(page).to have_content('Group name')
end
......@@ -79,7 +79,7 @@ describe 'Top Plus Menu', :js do
click_topmenuitem("New subgroup")
expect(page).to have_content('Group path')
expect(page).to have_content('Group URL')
expect(page).to have_content('Group name')
end
......
......@@ -7,7 +7,7 @@ describe 'Group' do
matcher :have_namespace_error_message do
match do |page|
page.has_content?("Path can contain only letters, digits, '_', '-' and '.'. Cannot start with '-' or end in '.', '.git' or '.atom'.")
page.has_content?("Group URL can contain only letters, digits, '_', '-' and '.'. Cannot start with '-' or end in '.', '.git' or '.atom'.")
end
end
......@@ -18,7 +18,7 @@ describe 'Group' do
describe 'with space in group path' do
it 'renders new group form with validation errors' do
fill_in 'Group path', with: 'space group'
fill_in 'Group URL', with: 'space group'
click_button 'Create group'
expect(current_path).to eq(groups_path)
......@@ -28,7 +28,7 @@ describe 'Group' do
describe 'with .atom at end of group path' do
it 'renders new group form with validation errors' do
fill_in 'Group path', with: 'atom_group.atom'
fill_in 'Group URL', with: 'atom_group.atom'
click_button 'Create group'
expect(current_path).to eq(groups_path)
......@@ -38,7 +38,7 @@ describe 'Group' do
describe 'with .git at end of group path' do
it 'renders new group form with validation errors' do
fill_in 'Group path', with: 'git_group.git'
fill_in 'Group URL', with: 'git_group.git'
click_button 'Create group'
expect(current_path).to eq(groups_path)
......@@ -94,7 +94,8 @@ describe 'Group' do
end
it 'creates a nested group' do
fill_in 'Group path', with: 'bar'
fill_in 'Group name', with: 'bar'
fill_in 'Group URL', with: 'bar'
click_button 'Create group'
expect(current_path).to eq(group_path('foo/bar'))
......@@ -112,7 +113,8 @@ describe 'Group' do
visit new_group_path(group, parent_id: group.id)
fill_in 'Group path', with: 'bar'
fill_in 'Group name', with: 'bar'
fill_in 'Group URL', with: 'bar'
click_button 'Create group'
expect(current_path).to eq(group_path('foo/bar'))
......
......@@ -218,6 +218,7 @@ export default {
diverged_commits_count: 0,
only_allow_merge_if_pipeline_succeeds: false,
commit_change_content_path: '/root/acets-app/merge_requests/22/commit_change_content',
<<<<<<< HEAD
codeclimate: {
head_path: 'head.json',
base_path: 'base.json',
......@@ -230,6 +231,9 @@ export default {
'/help/user/project/merge_requests/index#interacting-with-security-reports-ultimate',
merge_commit_path:
'http://localhost:3000/root/acets-app/commit/53027d060246c8f47e4a9310fb332aa52f221775',
=======
merge_commit_path: 'http://localhost:3000/root/acets-app/commit/53027d060246c8f47e4a9310fb332aa52f221775',
>>>>>>> upstream/master
troubleshooting_docs_path: 'help'
};
// Codeclimate
......
require 'spec_helper'
describe Gitlab::Git::WrapsGitalyErrors do
subject(:wrapper) do
klazz = Class.new { include Gitlab::Git::WrapsGitalyErrors }
klazz.new
end
describe "#wrapped_gitaly_errors" do
mapping = {
GRPC::NotFound => Gitlab::Git::Repository::NoRepository,
GRPC::InvalidArgument => ArgumentError,
GRPC::BadStatus => Gitlab::Git::CommandError
}
mapping.each do |grpc_error, error|
it "wraps #{grpc_error} in a #{error}" do
expect { wrapper.wrapped_gitaly_errors { raise grpc_error.new('wrapped') } }
.to raise_error(error)
end
end
it 'does not swallow other errors' do
expect { wrapper.wrapped_gitaly_errors { raise 'raised' } }
.to raise_error(RuntimeError)
end
end
end
......@@ -177,7 +177,7 @@ describe Groups::TransferService, :postgresql do
it 'should add an error on group' do
transfer_service.execute(new_parent_group)
expect(transfer_service.error).to eq('Transfer failed: Validation failed: Path has already been taken')
expect(transfer_service.error).to eq('Transfer failed: Validation failed: Group URL has already been taken')
end
end
......
......@@ -626,10 +626,10 @@
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-svgs/-/gitlab-svgs-1.33.0.tgz#068566e8ee00795f6f09f58236f08e1716f9f04a"
integrity sha512-8ajtUHk6gQ1xosL/CO5IzHSFM/t18hx5pfzQ3cd0VuQXcyR6QKGuXTLwbYdmJDYOw1Etoo5DqDWxPEClHyZpiA==
"@gitlab-org/gitlab-ui@^1.9.0":
version "1.9.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-ui/-/gitlab-ui-1.9.0.tgz#c47851587316f60926e8304747d1fcdd1222c779"
integrity sha512-OQ/mhWnbeG4pmjnCGwLsyvmHDYdLh2IRnt4Jx6G9jf96oyjEHzY1rveImfqcQ2bvx9azfuI6CU9dmDSY3aWvvQ==
"@gitlab-org/gitlab-ui@^1.10.0":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-ui/-/gitlab-ui-1.10.0.tgz#3ac54ecaa25ea558324f0b382c97fcf9e3c4f0a5"
integrity sha512-kfoCKA+AmWZ3hf1wOS8W9mPJs/7lF+a01PK//+sw2MOLv6PlduJJmdN8drFuJ65o6cTJ1f9FMVB80R6D71XVKQ==
dependencies:
"@gitlab-org/gitlab-svgs" "^1.23.0"
bootstrap-vue "^2.0.0-rc.11"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment