Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-10-14 21:08:38 +00:00
parent 93960490b8
commit 5c635722c6
37 changed files with 242 additions and 390 deletions

View File

@ -94,7 +94,7 @@ export default {
},
{
key: 'issue',
label: s__('AlertManagement|Issue'),
label: s__('AlertManagement|Incident'),
thClass: 'gl-w-12 gl-pointer-events-none',
tdClass,
},

View File

@ -1,9 +1,9 @@
<script>
import {
GlDeprecatedDropdown,
GlDeprecatedDropdownDivider,
GlDeprecatedDropdownHeader,
GlDeprecatedDropdownItem,
GlDropdown,
GlDropdownDivider,
GlDropdownSectionHeader,
GlDropdownItem,
GlIcon,
} from '@gitlab/ui';
import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility';
@ -20,10 +20,10 @@ const ROW_TYPES = {
export default {
components: {
GlDeprecatedDropdown,
GlDeprecatedDropdownDivider,
GlDeprecatedDropdownHeader,
GlDeprecatedDropdownItem,
GlDropdown,
GlDropdownDivider,
GlDropdownSectionHeader,
GlDropdownItem,
GlIcon,
},
apollo: {
@ -226,11 +226,11 @@ export default {
getComponent(type) {
switch (type) {
case ROW_TYPES.divider:
return 'gl-deprecated-dropdown-divider';
return 'gl-dropdown-divider';
case ROW_TYPES.header:
return 'gl-deprecated-dropdown-header';
return 'gl-dropdown-section-header';
default:
return 'gl-deprecated-dropdown-item';
return 'gl-dropdown-item';
}
},
},
@ -246,7 +246,7 @@ export default {
</router-link>
</li>
<li v-if="renderAddToTreeDropdown" class="breadcrumb-item">
<gl-deprecated-dropdown toggle-class="add-to-tree qa-add-to-tree ml-1">
<gl-dropdown toggle-class="add-to-tree qa-add-to-tree gl-ml-2">
<template #button-content>
<span class="sr-only">{{ __('Add to tree') }}</span>
<gl-icon name="plus" :size="16" class="float-left" />
@ -257,7 +257,7 @@ export default {
{{ item.text }}
</component>
</template>
</gl-deprecated-dropdown>
</gl-dropdown>
</li>
</ol>
</nav>

View File

@ -27,7 +27,7 @@
margin: 0;
padding: $gl-padding-4 $gl-padding $gl-padding;
border-bottom: 0;
color: $gl-text-color-secondary;
color: var(--gray-500, $gray-500);
}
.issue-boards-page {
@ -102,7 +102,7 @@
}
&:hover {
background-color: $gray-50;
background-color: var(--gray-50, $gray-50);
transition: background-color 0.1s linear;
}
}
@ -167,8 +167,8 @@
.board-inner {
font-size: $issue-boards-font-size;
background: $gray-light;
border: 1px solid $gray-100;
background: var(--gray-10, $gray-10);
border: 1px solid var(--gray-100, $gray-100);
}
.board-header {
@ -199,7 +199,7 @@
.board-title {
align-items: center;
font-size: 1em;
border-bottom: 1px solid $gray-100;
border-bottom: 1px solid var(--gray-100, $gray-100);
padding: 0 $gl-spacing-scale-3;
height: 3rem;
@ -217,14 +217,14 @@
outline: 0;
&:hover {
color: $blue-600;
color: var(--blue-600, $blue-600);
box-shadow: none;
}
}
.board-blank-state,
.board-promotion-state {
background-color: $white;
background-color: var(--white, $white);
flex: 1;
overflow-y: auto;
overflow-x: hidden;
@ -258,9 +258,9 @@
}
.board-card {
background: $white;
border: 1px solid $gray-100;
box-shadow: 0 1px 2px $issue-boards-card-shadow;
background: var(--white, $white);
border: 1px solid var(--gray-100, $gray-100);
box-shadow: 0 1px 2px rgba(var(--black, $black), 0.1);
line-height: $gl-padding;
list-style: none;
position: relative;
@ -271,12 +271,12 @@
&.is-active,
&.is-active .board-card-assignee:hover a {
background-color: $blue-50;
background-color: var(--blue-50, $blue-50);
}
&.multi-select {
border-color: $blue-200;
background-color: $blue-50;
border-color: var(--blue-200, $blue-200);
background-color: var(--blue-50, $blue-50);
}
.gl-label {
@ -285,12 +285,12 @@
}
.confidential-icon {
color: $orange-500;
color: var(--orange-500, $orange-500);
cursor: help;
}
.issue-blocked-icon {
color: $red-500;
color: var(--red-500, $red-500);
}
@include media-breakpoint-down(md) {
@ -303,7 +303,7 @@
font-size: 1em;
a {
color: $gl-text-color;
color: var(--gray-900, $gray-900);
}
@include media-breakpoint-down(md) {
@ -325,7 +325,7 @@
min-width: $gl-padding-24;
height: $gl-padding-24;
border-radius: $gl-padding-24;
background-color: $gl-text-color-tertiary;
background-color: var(--gray-400, $gray-400);
font-size: $gl-font-size-xs;
cursor: help;
font-weight: $gl-font-weight-bold;
@ -372,7 +372,7 @@
.board-card-number {
font-size: $gl-font-size-xs;
color: $gl-text-color-secondary;
color: var(--gray-500, $gray-500);
@include media-breakpoint-up(md) {
font-size: $label-font-size;
@ -381,7 +381,7 @@
.board-list-count {
padding: 10px 0;
color: $gl-text-color-secondary;
color: var(--gray-500, $gray-500);
font-size: 13px;
}
@ -437,8 +437,8 @@
max-width: 1100px;
min-height: 500px;
padding: 25px 15px 0;
background-color: $white;
box-shadow: 0 2px 12px rgba($black, 0.5);
background-color: var(--white, $white);
box-shadow: 0 2px 12px rgba(var(--black, $black), 0.5);
.empty-state {
&.add-issues-empty-state-filter {
@ -486,8 +486,8 @@
}
.board-card {
border: 1px solid $border-white-normal;
box-shadow: 0 1px 2px rgba($issue-boards-card-shadow, 0.3);
border: 1px solid var(--gray-900, $gray-900);
box-shadow: 0 1px 2px rgba(var(--black, $black), 0.4);
cursor: pointer;
}
}
@ -511,16 +511,16 @@
right: -3px;
top: -3px;
width: 17px;
background-color: $blue-500;
background-color: var(--blue-500, $blue-500);
color: $white;
border: 1px solid $blue-600;
border: 1px solid var(--blue-600, $blue-600);
font-size: 9px;
line-height: 15px;
border-radius: 50%;
}
.board-card-info {
color: $gl-text-color-secondary;
color: var(--gray-500, $gray-500);
white-space: nowrap;
margin-right: $gl-padding-8;
@ -529,7 +529,7 @@
}
&.board-card-weight {
color: $gl-text-color-secondary;
color: var(--gray-500, $gray-500);
cursor: pointer;
&:hover {
@ -539,7 +539,7 @@
}
.board-card-info-icon {
color: $gray-500;
color: var(--gray-500, $gray-500);
margin-right: $gl-padding-4;
vertical-align: text-top;
}
@ -568,7 +568,7 @@
height: 100%;
top: 0;
left: 0;
background: $white;
background: var(--white, $white);
z-index: 9000;
@include media-breakpoint-down(sm) {
@ -591,7 +591,7 @@
}
.board-header-collapsed-info-icon:hover {
color: $gray-900;
color: var(--gray-900, $gray-900);
}
$epic-icons-spacing: 40px;

View File

@ -10,13 +10,13 @@ $status-box-line-height: 26px;
padding: $gl-padding-8;
margin-top: $gl-padding-8;
border-radius: $border-radius-default;
background-color: $gray-100;
background-color: var(--gray-100, $gray-100);
.milestone {
border: 0;
padding: $gl-padding-top $gl-padding;
border-radius: $border-radius-default;
background-color: $white;
background-color: var(--white, $white);
&:not(:last-child) {
margin-bottom: $gl-padding-4;
@ -35,7 +35,7 @@ $status-box-line-height: 26px;
.milestone-progress,
.milestone-release-links {
a {
color: $blue-600;
color: var(--blue-600, $blue-600);
}
}
@ -63,7 +63,7 @@ $status-box-line-height: 26px;
.issuable-row {
span {
a {
color: $gl-text-color;
color: var(--gray-900, $gray-900);
word-wrap: break-word;
}
@ -164,7 +164,7 @@ $status-box-line-height: 26px;
}
.issuable-number {
color: $gl-text-color-secondary;
color: var(--gray-500, $gray-500);
margin-right: 5px;
}
@ -179,7 +179,7 @@ $status-box-line-height: 26px;
}
.milestone-detail {
border-bottom: 1px solid $border-color;
border-bottom: 1px solid var(--border-color, $border-color);
}
@include media-breakpoint-down(xs) {
@ -235,7 +235,7 @@ $status-box-line-height: 26px;
}
.issuable-row {
background-color: $white;
background-color: var(--white, $white);
}
.milestone-popover-instructions-list {

View File

@ -9,7 +9,11 @@ module MirrorHelper
end
def mirror_lfs_sync_message
html_escape(_('The Git LFS objects will %{strong_open}not%{strong_close} be synced.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
docs_link_url = help_page_path('topics/git/lfs/index')
docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: docs_link_url }
html_escape(_('Git LFS objects will be synced if LFS is %{docs_link_start}enabled for the project%{docs_link_end}. Push mirrors will %{strong_open}not%{strong_close} sync LFS objects over SSH.')) %
{ docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
end
end

View File

@ -55,7 +55,6 @@ module Projects
end
def send_lfs_objects!(remote_mirror)
return unless Feature.enabled?(:push_mirror_syncs_lfs, project)
return unless project.lfs_enabled?
# TODO: Support LFS sync over SSH

View File

@ -0,0 +1,5 @@
---
title: Sync LFS objects when push mirroring over HTTPS
merge_request: 44457
author:
type: added

View File

@ -0,0 +1,5 @@
---
title: Fix dark mode for boards and swimlanes
merge_request: 44951
author:
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Fix dark mode for milestones
merge_request: 44952
author:
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Replace `GlDeprecatedDropdown` with `GlDropdown` in `app/assets/javascripts/repository/components/breadcrumbs.vue`
merge_request: 41427
author: nuwe1
type: other

View File

@ -0,0 +1,5 @@
---
title: Enable one_dimensional_matrix feature flag by default
merge_request: 45086
author:
type: added

View File

@ -0,0 +1,5 @@
---
title: Revert of Background migration for setting Jira tracker data deployment type
merge_request: 45205
author:
type: fixed

View File

@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42170
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/256062
type: development
group: group::pipeline authoring
default_enabled: false
default_enabled: true

View File

@ -1,7 +0,0 @@
---
name: push_mirror_syncs_lfs
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40137
rollout_issue_url:
group: group::source code
type: development
default_enabled: false

View File

@ -5,26 +5,11 @@ class BackfillJiraTrackerDeploymentType < ActiveRecord::Migration[6.0]
DOWNTIME = false
disable_ddl_transaction!
MIGRATION = 'BackfillJiraTrackerDeploymentType'
BATCH_SIZE = 100
BATCH_INTERVAL = 20.seconds
class JiraTrackerData < ActiveRecord::Base
self.table_name = 'jira_tracker_data'
include ::EachBatch
end
# 78_627 JiraTrackerData records, 76_313 with deployment_type == 0
def up
JiraTrackerData.where(deployment_type: 0).each_batch(of: BATCH_SIZE) do |relation, index|
jobs = relation.pluck(:id).map { |id| [MIGRATION, [id]] }
delay = index * BATCH_INTERVAL
bulk_migrate_in(delay, jobs)
end
# no-op
# this migration was reverted
# in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45205
# due to https://gitlab.com/gitlab-com/gl-infra/production/-/issues/2820
end
def down

View File

@ -163,7 +163,7 @@ to authenticate with the API:
- [Conan Repository](../user/packages/conan_repository/index.md)
- [Container Registry](../user/packages/container_registry/index.md) (`$CI_REGISTRY_PASSWORD` is actually `$CI_JOB_TOKEN`, but this may change in the future)
- [Go Proxy](../user/packages/go_proxy/index.md)
- [Maven Repository](../user/packages/maven_repository/index.md#authenticating-with-a-ci-job-token)
- [Maven Repository](../user/packages/maven_repository/index.md#authenticate-with-a-ci-job-token)
- [NPM Repository](../user/packages/npm_registry/index.md#authenticating-with-a-ci-job-token)
- [Nuget Repository](../user/packages/nuget_repository/index.md)
- [PyPI Repository](../user/packages/pypi_repository/index.md#using-gitlab-ci-with-pypi-packages)

View File

@ -73,6 +73,8 @@ to your needs:
![Use a `.gitlab-ci.yml` template](img/add_file_template_11_10.png)
While building your `.gitlab-ci.yml`, you can use the [CI/CD configuration visualization](yaml/visualization.md) to facilate your writing experience.
For a broader overview, see the [CI/CD getting started](quick_start/README.md) guide.
Once you're familiar with how GitLab CI/CD works, see the

View File

@ -112,6 +112,9 @@ What is important is that each job is run independently from each other.
If you want to check whether the `.gitlab-ci.yml` of your project is valid, there is a
[CI Lint tool](../lint.md) available in every project.
You can use the [CI/CD configuration visualization](../yaml/visualization.md) to
see a graphical representation of your `.gitlab-ci.yml`.
For more information and a complete `.gitlab-ci.yml` syntax, please read
[the reference documentation on `.gitlab-ci.yml`](../yaml/README.md).

View File

@ -3574,8 +3574,8 @@ There can be from 2 to 50 jobs.
[In GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/26362) and later,
you can have one-dimensional matrices with a single job.
The ability to have one-dimensional matrices is [deployed behind a feature flag](../../user/feature_flags.md),
disabled by default. It's disabled on GitLab.com. To use it in a GitLab self-managed
instance, ask a GitLab administrator to [enable the `one_dimensional_matrix:` feature flag](../../administration/feature_flags.md). **(CORE ONLY)**
enabled by default. It's enabled on GitLab.com. For self-managed GitLab instances,
administrators can opt to disable it by [disabling the `one_dimensional_matrix:` feature flag](../../administration/feature_flags.md). **(CORE ONLY)**
Every job gets the same `CI_NODE_TOTAL` [environment variable](../variables/README.md#predefined-environment-variables) value, and a unique `CI_NODE_INDEX` value.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,46 @@
# Visualize your CI/CD configuration
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/241722) in GitLab 13.5.
> - It's [deployed behind a feature flag](../../user/feature_flags.md), disabled by default.
> - It's disabled on GitLab.com.
> - It's not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-cicd-configuration-visualization). **(CORE ONLY)**
CAUTION: **Warning:**
This feature might not be available to you. Check the **version history** note above for details.
To see a visualization of your `gitlab-ci.yml` configuration, navigate to any CI/CD
configuration file and click on the `Visualization` tab. The visualization shows
all stages and jobs. [`needs`](README.md#needs) relationships are displayed as lines
connecting jobs together, showing the hierarchy of execution:
![CI Config Visualization](img/ci_config_visualization_v13_5.png)
Hovering on a job highlights its `needs` relationships:
![CI Config Visualization on hover](img/ci_config_visualization_hover_v13_5.png)
If the configuration does not have any `needs` relationships, then no lines are drawn because
each job depends only on the previous stage being completed successfully.
You can only preview one `gitlab-ci.yml` file at a time. Configuration imported with
[`includes`](README.md#include) is ignored and not included in the visualization.
## Enable or disable CI/CD configuration visualization **(CORE ONLY)**
CI/CD configuration visualization is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md)
can enable it.
To enable it:
```ruby
Feature.enable(:gitlab_ci_yml_preview)
```
To disable it:
```ruby
Feature.disable(:gitlab_ci_yml_preview)
```

View File

@ -607,7 +607,7 @@ When adding, changing, or updating metrics, please update the [Event Dictionary'
### 5. Add new metric to Versions Application
Check if new metrics need to be added to the Versions Application. See `usage_data` [schema](https://gitlab.com/gitlab-services/version-gitlab-com/-/blob/master/db/schema.rb#L147) and usage data [parameters accepted](https://gitlab.com/gitlab-services/version-gitlab-com/-/blob/master/app/services/usage_ping.rb). Any metrics added under the `counts` key are saved in the `counts` column.
Check if new metrics need to be added to the Versions Application. See `usage_data` [schema](https://gitlab.com/gitlab-services/version-gitlab-com/-/blob/master/db/schema.rb#L147) and usage data [parameters accepted](https://gitlab.com/gitlab-services/version-gitlab-com/-/blob/master/app/services/usage_ping.rb). Any metrics added under the `counts` key are saved in the `stats` column.
### 6. Add the feature label

View File

@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Integrations
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13203) in [GitLab Core](https://about.gitlab.com/pricing/) 12.5.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/245331) in [GitLab Core](https://about.gitlab.com/pricing/) 13.5.
With Maintainer or higher [permissions](../../user/permissions.md), you can view
the list of configured alerts integrations by navigating to

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

View File

@ -4,44 +4,24 @@ group: Package
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
---
# GitLab Maven Repository
# Maven packages in the Package Repository
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/5811) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.3.
> - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/221259) to GitLab Core in 13.3.
With the GitLab [Maven](https://maven.apache.org) Repository, every
project can have its own space to store its Maven artifacts.
Publish [Maven](https://maven.apache.org) artifacts in your projects Package Registry.
Then, install the packages whenever you need to use them as a dependency.
![GitLab Maven Repository](img/maven_package_view_v12_6.png)
## Build a Maven package
## Enabling the Maven Repository
This section explains how to install Maven and build a package.
NOTE: **Note:**
This option is available only if your GitLab administrator has
[enabled support for the Maven repository](../../../administration/packages/index.md).
If you already use Maven and know how to build your own packages, go to the
[next section](#add-the-package-registry-as-a-maven-remote).
After the Packages feature is enabled, the Maven Repository is available for
all new projects by default. To enable it for existing projects, or if you want
to disable it:
Maven repositories work well with Gradle, too. To set up a Gradle project, see [get started with Gradle](#use-gradle-to-create-a-java-project).
1. Navigate to your project's **Settings > General > Visibility, project features, permissions**.
1. Find the Packages feature and enable or disable it.
1. Click on **Save changes** for the changes to take effect.
You should then be able to see the **Packages & Registries** section on the left sidebar.
Next, you must configure your project to authorize with the GitLab Maven
repository.
## Getting Started with Maven
This section covers installing Maven and building a package. This is a
quickstart to help if you're new to building Maven packages. If you're already
using Maven and understand how to build your own packages, move onto the
[next section](#adding-the-gitlab-package-registry-as-a-maven-remote).
Maven repositories work well with Gradle, too. Move onto [getting started with Gradle](#getting-started-with-gradle) if you want to setup a Gradle project.
### Installing Maven
### Install Maven
The required minimum versions are:
@ -66,7 +46,7 @@ Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.2", arch: "x86_64", family: "mac"
```
### Creating a project
### Create a project
Understanding how to create a full Java project is outside the scope of this
guide but you can follow the steps below to create a new project that can be
@ -105,14 +85,14 @@ your project has been set up successfully:
You should see a new directory where you ran this command matching your
`DartifactId` parameter (in this case it should be `my-project`).
## Getting started with Gradle
## Use Gradle to create a Java project
This section covers installing Gradle and initializing a Java project. This is a
quickstart to help if you're new to Gradle. If you're already
using Gradle and understand how to build your own packages, move onto the
[next section](#adding-the-gitlab-package-registry-as-a-maven-remote).
This section explains how to install Gradle and initialize a Java project.
### Installing Gradle
If you already use Gradle and know how to build your own packages, go to the
[next section](#add-the-package-registry-as-a-maven-remote).
### Install Gradle
Installation is needed only if you want to create a new Gradle project. Follow
instructions at [gradle.org](https://gradle.org/install/) to download and install
@ -145,7 +125,7 @@ JVM: 11.0.5 (Oracle Corporation 11.0.5+10)
OS: Windows 10 10.0 amd64
```
### Creating a project in Gradle
### Create a Java project
Understanding how to create a full Java project in Gradle is outside the scope of this
guide, but you can follow the steps below to create a new project that can be
@ -209,23 +189,23 @@ Project name (default: test):
Enter a project name or hit enter to use the directory name as project name.
## Adding the GitLab Package Registry as a Maven remote
## Add the Package Registry as a Maven remote
The next step is to add the GitLab Package Registry as a Maven remote. If a
project is private or you want to upload Maven artifacts to GitLab,
credentials must be provided for authorization too. Support is available
for [personal access tokens](#authenticating-with-a-personal-access-token),
[CI job tokens](#authenticating-with-a-ci-job-token), and
for [personal access tokens](#authenticate-with-a-personal-access-token),
[CI job tokens](#authenticate-with-a-ci-job-token), and
[deploy tokens](../../project/deploy_tokens/index.md) only. Regular username/password
credentials do not work.
### Authenticating with a personal access token
### Authenticate with a personal access token
To authenticate with a [personal access token](../../profile/personal_access_tokens.md),
set the scope to `api` when creating one, and add it to your Maven or Gradle configuration
files.
#### Authenticating with a personal access token in Maven
#### Authenticate with a personal access token in Maven
Add a corresponding section to your
[`settings.xml`](https://maven.apache.org/settings.html) file:
@ -248,7 +228,7 @@ Add a corresponding section to your
</settings>
```
#### Authenticating with a personal access token in Gradle
#### Authenticate with a personal access token in Gradle
Create a file `~/.gradle/gradle.properties` with the following content:
@ -278,12 +258,12 @@ repositories {
You should now be able to upload Maven artifacts to your project.
### Authenticating with a CI job token
### Authenticate with a CI job token
If you're using GitLab CI/CD, a CI job token can be used instead
of a personal access token.
#### Authenticating with a CI job token in Maven
#### Authenticate with a CI job token in Maven
To authenticate with a CI job token, add a corresponding section to your
[`settings.xml`](https://maven.apache.org/settings.html) file:
@ -309,7 +289,7 @@ To authenticate with a CI job token, add a corresponding section to your
You can read more on
[how to create Maven packages using GitLab CI/CD](#creating-maven-packages-with-gitlab-cicd).
#### Authenticating with a CI job token in Gradle
#### Authenticate with a CI job token in Gradle
To authenticate with a CI job token, add a repositories section to your
[`build.gradle`](https://docs.gradle.org/current/userguide/tutorial_using_tasks.html)
@ -331,7 +311,7 @@ repositories {
}
```
### Authenticating with a deploy token
### Authenticate with a deploy token
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213566) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.0.
@ -339,7 +319,7 @@ To authenticate with a [deploy token](./../../project/deploy_tokens/index.md),
set the scope to `api` when creating one, and add it to your Maven or Gradle configuration
files.
#### Authenticating with a deploy token in Maven
#### Authenticate with a deploy token in Maven
Add a corresponding section to your
[`settings.xml`](https://maven.apache.org/settings.html) file:
@ -362,7 +342,7 @@ Add a corresponding section to your
</settings>
```
#### Authenticating with a deploy token in Gradle
#### Authenticate with a deploy token in Gradle
To authenticate with a deploy token, add a repositories section to your
[`build.gradle`](https://docs.gradle.org/current/userguide/tutorial_using_tasks.html)
@ -441,7 +421,7 @@ repositories {
```
The `id` must be the same with what you
[defined in `settings.xml`](#adding-the-gitlab-package-registry-as-a-maven-remote).
[defined in `settings.xml`](#add-the-package-registry-as-a-maven-remote).
Replace `PROJECT_ID` with your project ID which can be found on the home page
of your project.
@ -452,7 +432,7 @@ domain name.
NOTE: **Note:**
For retrieving artifacts, you can use either the
[URL encoded](../../../api/README.md#namespaced-path-encoding) path of the project
(e.g., `group%2Fproject`) or the project's ID (e.g., `42`). However, only the
(such as `group%2Fproject`) or the project's ID (such as `42`). However, only the
project's ID can be used for uploading.
### Group level Maven endpoint
@ -505,7 +485,7 @@ repositories {
```
The `id` must be the same with what you
[defined in `settings.xml`](#adding-the-gitlab-package-registry-as-a-maven-remote).
[defined in `settings.xml`](#add-the-package-registry-as-a-maven-remote).
Replace `my-group` with your group name and `PROJECT_ID` with your project ID
which can be found on the home page of your project.
@ -516,7 +496,7 @@ domain name.
NOTE: **Note:**
For retrieving artifacts, you can use either the
[URL encoded](../../../api/README.md#namespaced-path-encoding) path of the group
(e.g., `group%2Fsubgroup`) or the group's ID (e.g., `12`).
(such as `group%2Fsubgroup`) or the group's ID (such as `12`).
### Instance level Maven endpoint
@ -571,7 +551,7 @@ repositories {
```
The `id` must be the same with what you
[defined in `settings.xml`](#adding-the-gitlab-package-registry-as-a-maven-remote).
[defined in `settings.xml`](#add-the-package-registry-as-a-maven-remote).
Replace `PROJECT_ID` with your project ID which can be found on the home page
of your project.
@ -582,12 +562,12 @@ domain name.
NOTE: **Note:**
For retrieving artifacts, you can use either the
[URL encoded](../../../api/README.md#namespaced-path-encoding) path of the project
(e.g., `group%2Fproject`) or the project's ID (e.g., `42`). However, only the
(such as `group%2Fproject`) or the project's ID (such as `42`). However, only the
project's ID can be used for uploading.
## Uploading packages
Once you have set up the [remote and authentication](#adding-the-gitlab-package-registry-as-a-maven-remote)
Once you have set up the [remote and authentication](#add-the-package-registry-as-a-maven-remote)
and [configured your project](#configuring-your-project-to-use-the-gitlab-maven-repository-url),
test to upload a Maven artifact from a project of yours.
@ -661,7 +641,7 @@ artifacts or even delete them.
## Installing a package
Installing a package from the GitLab Package Registry requires that you set up
the [remote and authentication](#adding-the-gitlab-package-registry-as-a-maven-remote)
the [remote and authentication](#add-the-package-registry-as-a-maven-remote)
as above. Once this is completed, there are two ways to install a package.
### Install using Maven with `mvn install`
@ -708,7 +688,7 @@ Package details page, allowing for quick and easy installation.
### Install using Gradle
Add a [dependency](https://docs.gradle.org/current/userguide/declaring_dependencies.html) to build.gradle in the dependencies section:
Add a [dependency](https://docs.gradle.org/current/userguide/declaring_dependencies.html) to `build.gradle` in the dependencies section:
```groovy
dependencies {
@ -802,7 +782,7 @@ Docker container), and Maven uses the configured CI
The example below shows how to create a new package each time the `master` branch
is updated:
1. Make sure you use the Job-Token authentication as described in ["Authenticating with a CI job token in Gradle"](#authenticating-with-a-ci-job-token-in-gradle).
1. Make sure you use the Job-Token authentication as described in ["Authenticating with a CI job token in Gradle"](#authenticate-with-a-ci-job-token-in-gradle).
1. Add a `deploy` job to your `.gitlab-ci.yml` file:

View File

@ -26,8 +26,8 @@ point them at the same project on GitLab.
There are a few reasons you might want to publish all your packages to one project on GitLab:
1. You want to publish your packages on GitLab, but to a project that is different from where your code is stored.
1. You would like to group packages together in ways that make sense for your usage (all NPM packages in one project,
all packages being used by a specific department in one project, all private packages in one project, etc.)
1. You would like to group packages together in ways that make sense for your usage (such as all NPM packages in one project,
all packages being used by a specific department in one project, or all private packages in one project)
1. You want to use one remote for all of your packages when installing them into other projects.
1. You would like to migrate your packages to a single place on GitLab from a third-party package registry and do not
want to worry about setting up separate projects for each package.
@ -44,7 +44,7 @@ Let's take a look at how you might create a public place to hold all of your pub
### Create a project
First, create a new project on GitLab. It does not have to have any code or content. Make note of the project ID
displayed on the project overview page, as you will need this later.
displayed on the project overview page for use later in this process.
### Create an access token
@ -67,15 +67,15 @@ If you are using NPM, this involves creating an `.npmrc` file and adding the app
to your project using your project ID, then adding a section to your `package.json` file with a similar URL.
Follow
the instructions in the [GitLab NPM Registry documentation](../npm_registry/index.md#authenticating-to-the-gitlab-npm-registry). Once
you do this, you will be able to push your NPM package to your project using `npm publish`, as described in the
the instructions in the [GitLab NPM Registry documentation](../npm_registry/index.md#authenticating-to-the-gitlab-npm-registry). After
you do this, you can push your NPM package to your project using `npm publish`, as described in the
[uploading packages](../npm_registry/index.md#uploading-packages) section of the docs.
#### Maven
If you are using Maven, this involves updating your `pom.xml` file with distribution sections, including the
appropriate URL for your project, as described in the [GitLab Maven Repository documentation](../maven_repository/index.md#project-level-maven-endpoint).
Then, you need to add a `settings.xml` file and [include your access token](../maven_repository/index.md#authenticating-with-a-personal-access-token).
Then, you need to add a `settings.xml` file and [include your access token](../maven_repository/index.md#authenticate-with-a-personal-access-token).
Now you can [deploy Maven packages](../maven_repository/index.md#uploading-packages) to your project.
#### Conan
@ -83,7 +83,7 @@ Now you can [deploy Maven packages](../maven_repository/index.md#uploading-packa
For Conan, first you need to add GitLab as a Conan registry remote. Follow the instructions in the [GitLab Conan Repository docs](../conan_repository/index.md#add-the-package-registry-as-a-conan-remote)
to do so. Then, create your package using the plus-separated (`+`) project path as your Conan user. For example,
if your project is located at `https://gitlab.com/foo/bar/my-proj`, then you can [create your Conan package](../conan_repository/index.md)
using `conan create . foo+bar+my-proj/channel`, where `channel` is your package channel (`stable`, `beta`, etc.). Once your package
using `conan create . foo+bar+my-proj/channel`, where `channel` is your package channel (such as `stable` or `beta`). After your package
is created, you are ready to [upload your package](../conan_repository/index.md#publish-a-conan-package) depending on your final package recipe. For example:
```shell

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -56,6 +56,7 @@ The following are some possible use cases for repository mirroring:
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/249) in GitLab Enterprise Edition 8.7.
> - [Moved to GitLab Core](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/18715) in 10.8.
> - [LFS support over HTTPS added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40137) in 13.5
For an existing project, you can set up push mirroring as follows:

View File

@ -1,65 +0,0 @@
# frozen_string_literal: true
# Based on https://community.developer.atlassian.com/t/get-rest-api-3-filter-search/29459/2,
# it's enough at the moment to simply notice if the url is from `atlassian.net`
module Gitlab
module BackgroundMigration
# Backfill the deployment_type in jira_tracker_data table
class BackfillJiraTrackerDeploymentType
# Migration only version of jira_tracker_data table
class JiraTrackerDataTemp < ApplicationRecord
self.table_name = 'jira_tracker_data'
def self.encryption_options
{
key: Settings.attr_encrypted_db_key_base_32,
encode: true,
mode: :per_attribute_iv,
algorithm: 'aes-256-gcm'
}
end
attr_encrypted :url, encryption_options
attr_encrypted :api_url, encryption_options
enum deployment_type: { unknown: 0, server: 1, cloud: 2 }, _prefix: :deployment
end
# Migration only version of services table
class JiraServiceTemp < ApplicationRecord
self.table_name = 'services'
self.inheritance_column = :_type_disabled
end
def perform(tracker_id)
@jira_tracker_data = JiraTrackerDataTemp.find_by(id: tracker_id, deployment_type: 0)
return unless jira_tracker_data
return unless client_url
update_deployment_type
end
private
attr_reader :jira_tracker_data
def client_url
jira_tracker_data.api_url.presence || jira_tracker_data.url.presence
end
def server_type
client_url.downcase.include?('.atlassian.net') ? :cloud : :server
end
def update_deployment_type
case server_type
when :server
jira_tracker_data.deployment_server!
when :cloud
jira_tracker_data.deployment_cloud!
end
end
end
end
end

View File

@ -68,7 +68,7 @@ module Gitlab
end
def self.one_dimensional_matrix_enabled?
::Feature.enabled?(:one_dimensional_matrix, default_enabled: false)
::Feature.enabled?(:one_dimensional_matrix, default_enabled: true)
end
def self.manual_bridges_enabled?(project)

View File

@ -2302,10 +2302,10 @@ msgstr ""
msgid "AlertManagement|High"
msgstr ""
msgid "AlertManagement|Info"
msgid "AlertManagement|Incident"
msgstr ""
msgid "AlertManagement|Issue"
msgid "AlertManagement|Info"
msgstr ""
msgid "AlertManagement|Key"
@ -12121,7 +12121,7 @@ msgstr ""
msgid "Git LFS is not enabled on this GitLab server, contact your admin."
msgstr ""
msgid "Git LFS objects will be synced in pull mirrors if LFS is %{docs_link_start}enabled for the project%{docs_link_end}. They will %{strong_open}not%{strong_close} be synced in push mirrors."
msgid "Git LFS objects will be synced if LFS is %{docs_link_start}enabled for the project%{docs_link_end}. Push mirrors will %{strong_open}not%{strong_close} sync LFS objects over SSH."
msgstr ""
msgid "Git LFS status:"
@ -22022,6 +22022,9 @@ msgstr ""
msgid "Repositories Analytics"
msgstr ""
msgid "RepositoriesAnalytics|Coverage"
msgstr ""
msgid "RepositoriesAnalytics|Download Historic Test Coverage Data"
msgstr ""
@ -22034,6 +22037,18 @@ msgstr ""
msgid "RepositoriesAnalytics|Historic Test Coverage Data is available in raw format (.csv) for further analysis."
msgstr ""
msgid "RepositoriesAnalytics|Last Update"
msgstr ""
msgid "RepositoriesAnalytics|Number of Coverages"
msgstr ""
msgid "RepositoriesAnalytics|Please select a project or multiple projects to display their most recent test coverage data."
msgstr ""
msgid "RepositoriesAnalytics|Please select projects to display."
msgstr ""
msgid "RepositoriesAnalytics|Test Code Coverage"
msgstr ""
@ -25771,9 +25786,6 @@ msgstr ""
msgid "The CSV export will be created in the background. Once finished, it will be sent to %{strong_open}%{email}%{strong_close} in an attachment."
msgstr ""
msgid "The Git LFS objects will %{strong_open}not%{strong_close} be synced."
msgstr ""
msgid "The GitLab user to which the Jira user %{jiraDisplayName} will be mapped"
msgstr ""
@ -28207,7 +28219,7 @@ msgstr ""
msgid "UsageQuota|Artifacts"
msgstr ""
msgid "UsageQuota|Build Artifacts"
msgid "UsageQuota|Artifacts is a sum of build and pipeline artifacts."
msgstr ""
msgid "UsageQuota|Buy additional minutes"

View File

@ -3,8 +3,7 @@
module QA
RSpec.describe 'Create' do
describe 'Push mirror a repository over HTTP' do
it 'configures and syncs LFS objects for a (push) mirrored repository', :requires_admin, testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/414' do
Runtime::Feature.enable(:push_mirror_syncs_lfs)
it 'configures and syncs LFS objects for a (push) mirrored repository', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/414' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)

View File

@ -1,5 +1,5 @@
import { shallowMount, RouterLinkStub } from '@vue/test-utils';
import { GlDeprecatedDropdown } from '@gitlab/ui';
import { GlDropdown } from '@gitlab/ui';
import Breadcrumbs from '~/repository/components/breadcrumbs.vue';
let vm;
@ -61,7 +61,7 @@ describe('Repository breadcrumbs component', () => {
vm.setData({ userPermissions: { forkProject: false, createMergeRequestIn: false } });
return vm.vm.$nextTick(() => {
expect(vm.find(GlDeprecatedDropdown).exists()).toBe(false);
expect(vm.find(GlDropdown).exists()).toBe(false);
});
});
@ -71,7 +71,7 @@ describe('Repository breadcrumbs component', () => {
vm.setData({ userPermissions: { forkProject: true, createMergeRequestIn: true } });
return vm.vm.$nextTick(() => {
expect(vm.find(GlDeprecatedDropdown).exists()).toBe(true);
expect(vm.find(GlDropdown).exists()).toBe(true);
});
});
});

View File

@ -1,80 +0,0 @@
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillJiraTrackerDeploymentType, :migration, schema: 20200910155617 do
let_it_be(:jira_service_temp) { described_class::JiraServiceTemp }
let_it_be(:jira_tracker_data_temp) { described_class::JiraTrackerDataTemp }
let_it_be(:api_host) { 'https://api.atlassian.net' }
let(:jira_service) { jira_service_temp.create!(type: 'JiraService', active: true, category: 'issue_tracker') }
subject { described_class.new }
describe '#perform' do
context 'when tracker is not valid' do
it 'returns if deployment already set' do
jira_tracker_data = jira_tracker_data_temp.create!(service_id: jira_service.id,
url: api_host, deployment_type: 1)
expect(subject).not_to receive(:update_deployment_type)
subject.perform(jira_tracker_data.id)
end
it 'returns if no url is set' do
jira_tracker_data = jira_tracker_data_temp.create!(service_id: jira_service.id,
deployment_type: 0)
expect(subject).not_to receive(:update_deployment_type)
subject.perform(jira_tracker_data.id)
end
end
context 'when tracker is valid' do
let(:jira_tracker_data) do
jira_tracker_data_temp.create!(service_id: jira_service.id,
url: api_host, deployment_type: 0)
end
it 'sets the deployment_type to cloud' do
subject.perform(jira_tracker_data.id)
expect(jira_tracker_data.reload.deployment_cloud?).to be_truthy
end
describe 'with a mixed case url' do
let_it_be(:api_host) { 'https://api.AtlassiaN.nEt' }
it 'sets the deployment_type to cloud' do
subject.perform(jira_tracker_data.id)
expect(jira_tracker_data.reload.deployment_cloud?).to be_truthy
end
end
describe 'with a Jira Server' do
let_it_be(:api_host) { 'https://my.server.net' }
it 'sets the deployment_type to server' do
subject.perform(jira_tracker_data.id)
expect(jira_tracker_data.reload.deployment_server?).to be_truthy
end
end
describe 'with api_url specified' do
let(:jira_tracker_data) do
jira_tracker_data_temp.create!(service_id: jira_service.id,
api_url: api_host, deployment_type: 0)
end
it 'sets the deployment_type to cloud' do
subject.perform(jira_tracker_data.id)
expect(jira_tracker_data.reload.deployment_cloud?).to be_truthy
end
end
end
end
end

View File

@ -1,39 +0,0 @@
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200910155617_backfill_jira_tracker_deployment_type.rb')
RSpec.describe BackfillJiraTrackerDeploymentType, :sidekiq, schema: 20200910155617 do
let(:services) { table(:services) }
let(:jira_tracker_data) { table(:jira_tracker_data) }
let(:migration) { described_class.new }
let(:batch_interval) { described_class::BATCH_INTERVAL }
describe '#up' do
before do
stub_const("#{described_class}::BATCH_SIZE", 2)
active_service = services.create!(type: 'JiraService', active: true)
inactive_service = services.create!(type: 'JiraService', active: false)
jira_tracker_data.create!(id: 1, service_id: active_service.id, deployment_type: 0)
jira_tracker_data.create!(id: 2, service_id: active_service.id, deployment_type: 1)
jira_tracker_data.create!(id: 3, service_id: inactive_service.id, deployment_type: 2)
jira_tracker_data.create!(id: 4, service_id: inactive_service.id, deployment_type: 0)
jira_tracker_data.create!(id: 5, service_id: active_service.id, deployment_type: 0)
end
it 'schedules BackfillJiraTrackerDeploymentType background jobs' do
Sidekiq::Testing.fake! do
freeze_time do
migration.up
expect(BackgroundMigrationWorker.jobs.size).to eq(3)
expect(described_class::MIGRATION).to be_scheduled_delayed_migration(batch_interval, 1)
expect(described_class::MIGRATION).to be_scheduled_delayed_migration(batch_interval, 4)
expect(described_class::MIGRATION).to be_scheduled_delayed_migration(batch_interval * 2, 5)
end
end
end
end
end

View File

@ -123,54 +123,36 @@ RSpec.describe Projects::UpdateRemoteMirrorService do
stub_lfs_setting(enabled: true)
end
context 'feature flag enabled' do
before do
stub_feature_flags(push_mirror_syncs_lfs: true)
it 'pushes LFS objects to a HTTP repository' do
expect_next_instance_of(Lfs::PushService) do |service|
expect(service).to receive(:execute)
end
it 'pushes LFS objects to a HTTP repository' do
expect_next_instance_of(Lfs::PushService) do |service|
expect(service).to receive(:execute)
end
execute!
end
it 'does nothing to an SSH repository' do
remote_mirror.update!(url: 'ssh://example.com')
expect_any_instance_of(Lfs::PushService).not_to receive(:execute)
execute!
end
it 'does nothing if LFS is disabled' do
expect(project).to receive(:lfs_enabled?) { false }
expect_any_instance_of(Lfs::PushService).not_to receive(:execute)
execute!
end
it 'does nothing if non-password auth is specified' do
remote_mirror.update!(auth_method: 'ssh_public_key')
expect_any_instance_of(Lfs::PushService).not_to receive(:execute)
execute!
end
execute!
end
context 'feature flag disabled' do
before do
stub_feature_flags(push_mirror_syncs_lfs: false)
end
it 'does nothing to an SSH repository' do
remote_mirror.update!(url: 'ssh://example.com')
it 'does nothing' do
expect_any_instance_of(Lfs::PushService).not_to receive(:execute)
expect_any_instance_of(Lfs::PushService).not_to receive(:execute)
execute!
end
execute!
end
it 'does nothing if LFS is disabled' do
expect(project).to receive(:lfs_enabled?) { false }
expect_any_instance_of(Lfs::PushService).not_to receive(:execute)
execute!
end
it 'does nothing if non-password auth is specified' do
remote_mirror.update!(auth_method: 'ssh_public_key')
expect_any_instance_of(Lfs::PushService).not_to receive(:execute)
execute!
end
end
end