Commit 5ebc4d92 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 52cacdb8
......@@ -6,7 +6,7 @@ import {
GlModal,
GlModalDirective,
} from '@gitlab/ui';
import _ from 'underscore';
import { escape as esc } from 'lodash';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import ToggleButton from '~/vue_shared/components/toggle_button.vue';
import axios from '~/lib/utils/axios_utils';
......@@ -65,7 +65,7 @@ export default {
'AlertService|%{linkStart}Learn more%{linkEnd} about configuring this endpoint to receive alerts.',
),
{
linkStart: `<a href="${_.escape(
linkStart: `<a href="${esc(
this.learnMoreUrl,
)}" target="_blank" rel="noopener noreferrer">`,
linkEnd: '</a>',
......
import _ from 'underscore';
import { escape as esc } from 'lodash';
import '~/gl_dropdown';
export default class CreateItemDropdown {
......@@ -37,14 +37,14 @@ export default class CreateItemDropdown {
},
selectable: true,
toggleLabel(selected) {
return selected && 'id' in selected ? _.escape(selected.title) : this.defaultToggleLabel;
return selected && 'id' in selected ? esc(selected.title) : this.defaultToggleLabel;
},
fieldName: this.fieldName,
text(item) {
return _.escape(item.text);
return esc(item.text);
},
id(item) {
return _.escape(item.id);
return esc(item.id);
},
onFilter: this.toggleCreateNewButton.bind(this),
clicked: options => {
......
......@@ -4,6 +4,8 @@
}
.dashboard-card {
@include gl-cursor-grab;
&-header {
&-warning {
background-color: $orange-100;
......
---
title: Add grab cursor for operations dashboard cards
merge_request: 28868
author:
type: changed
......@@ -904,7 +904,7 @@ The new pipeline can be:
- A detached merge request pipeline.
- A [pipeline for merged results](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md)
if the [project setting is enabled](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md#enabling-pipelines-for-merged-results).
if the [project setting is enabled](../ci/merge_request_pipelines/pipelines_for_merged_results/index.md#enable-pipelines-for-merged-results).
```plaintext
POST /projects/:id/merge_requests/:merge_request_iid/pipelines
......
......@@ -7,9 +7,8 @@ last_update: 2019-07-03
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/15310) in GitLab 11.6.
In a [basic configuration](../pipelines/pipeline_architectures.md), GitLab runs a pipeline each time
changes are pushed to a branch. The settings in the [`.gitlab-ci.yml`](../yaml/README.md)
file, including `rules`, `only`, and `except`, determine which jobs are added to a pipeline.
In a [basic configuration](../pipelines/pipeline_architectures.md#basic-pipelines), GitLab runs a pipeline each time
changes are pushed to a branch.
If you want the pipeline to run jobs **only** when merge requests are created or updated,
you can use *pipelines for merge requests*.
......@@ -28,7 +27,7 @@ A few notes:
## Configuring pipelines for merge requests
To configure pipelines for merge requests, configure your CI yaml file.
To configure pipelines for merge requests, configure your [CI/CD configuration file](../yaml/README.md).
There are a few different ways to do this.
### Enable pipelines for merge requests for all jobs
......
......@@ -36,31 +36,41 @@ again run against the merged results.
## Requirements and limitations
Pipelines for merged results require a [GitLab Runner][runner] 11.9 or newer.
[runner]: https://gitlab.com/gitlab-org/gitlab-runner
In addition, pipelines for merged results have the following limitations:
Pipelines for merged results have the following requirements and limitations:
- Pipelines for merged results require [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner) 11.9 or newer.
- Forking/cross-repo workflows are not currently supported. To follow progress,
see [#11934](https://gitlab.com/gitlab-org/gitlab/issues/11934).
- This feature is not available for
[fast forward merges](../../../user/project/merge_requests/fast_forward_merge.md) yet.
To follow progress, see [#58226](https://gitlab.com/gitlab-org/gitlab/-/issues/26996).
## Enabling Pipelines for Merged Results
## Enable pipelines for merged results
To enable pipelines on merged results at the project level:
To enable pipelines for merged results for your project:
1. [Configure your CI/CD configuration file](../index.md#configuring-pipelines-for-merge-requests)
so that the pipeline or individual jobs run for merge requests.
1. Visit your project's **Settings > General** and expand **Merge requests**.
1. Check **Merge pipelines will try to validate the post-merge result prior to merging**.
1. Click **Save changes** button.
1. Click **Save changes**.
CAUTION: **Caution:**
If you select the check box but don't configure your CI/CD to use
pipelines for merge requests, your merge requests may become stuck in an
unresolved state or your pipelines may be dropped.
## Using Merge Trains
![Merge request pipeline config](img/merge_request_pipeline_config.png)
When you enable [Pipelines for merged results](#pipelines-for-merged-results-premium),
GitLab [automatically displays](merge_trains/index.md#add-a-merge-request-to-a-merge-train)
a **Start/Add Merge Train button**.
CAUTION: **Warning:**
Make sure your `gitlab-ci.yml` file is [configured properly for pipelines for merge requests](../index.md#configuring-pipelines-for-merge-requests),
otherwise pipelines for merged results won't run and your merge requests will be stuck in an unresolved state.
Generally, this is a safer option than merging merge requests immediately, because your
merge request will be evaluated with an expected post-merge result before the actual
merge happens.
For more information, read the [documentation on Merge Trains](merge_trains/index.md).
## Automatic pipeline cancelation
......@@ -118,15 +128,3 @@ which indicates that the checkout-SHA is not found in the merge ref.
This behavior was improved at GitLab 12.4 by introducing [Persistent pipeline refs](../../pipelines/index.md#troubleshooting-fatal-reference-is-not-a-tree).
You should be able to create pipelines at any timings without concerning the error.
## Using Merge Trains **(PREMIUM)**
By enabling [Pipelines for merged results](#pipelines-for-merged-results-premium),
GitLab will [automatically display](merge_trains/index.md#how-to-add-a-merge-request-to-a-merge-train)
a **Start/Add Merge Train button** as the most recommended merge strategy.
Generally, this is a safer option than merging merge requests immediately as your
merge request will be evaluated with an expected post-merge result before the actual
merge happens.
For more information, read the [documentation on Merge Trains](merge_trains/index.md).
......@@ -34,7 +34,7 @@ description: 'Learn how to contribute to GitLab.'
- [Code review guidelines](code_review.md) for reviewing code and having code reviewed
- [Database review guidelines](database_review.md) for reviewing database-related changes and complex SQL queries, and having them reviewed
- [Secure coding guidelines](https://gitlab.com/gitlab-com/gl-security/security-guidelines)
- [Secure coding guidelines](secure_coding_guidelines.md)
- [Pipelines for the GitLab project](pipelines.md)
Complementary reads:
......
......@@ -211,6 +211,15 @@ To ensure that we get consistent ordering, we will append an ordering on the pri
key, in descending order. This is usually `id`, so basically we will add `order(id: :desc)`
to the end of the relation. A primary key _must_ be available on the underlying table.
#### Shortcut fields
Sometimes it can seem easy to implement a "shortcut field", having the resolver return the first of a collection if no parameters are passed.
These "shortcut fields" are discouraged because they create maintenance overhead.
They need to be kept in sync with their canonical field, and deprecated or modified if their canonical field changes.
Use the functionality the framework provides unless there is a compelling reason to do otherwise.
For example, instead of `latest_pipeline`, use `pipelines(last: 1)`.
### Exposing permissions for a type
To expose permissions the current user has on a resource, you can call
......
This diff is collapsed.
# Testing with feature flags
To run a specific test with a feature flag enabled you can use the `QA::Runtime::Feature` class to enabled and disable feature flags ([via the API](../../../api/features.md)).
To run a specific test with a feature flag enabled you can use the `QA::Runtime::Feature` class to enable and disable feature flags ([via the API](../../../api/features.md)).
Note that administrator authorization is required to change feature flags. `QA::Runtime::Feature` will automatically authenticate as an administrator as long as you provide an appropriate access token via `GITLAB_QA_ADMIN_ACCESS_TOKEN` (recommended), or provide `GITLAB_ADMIN_USERNAME` and `GITLAB_ADMIN_PASSWORD`.
Please be sure to include the tag `:requires_admin` so that the test can be skipped in environments where admin access is not available.
```ruby
context "with feature flag enabled" do
context "with feature flag enabled", :requires_admin do
before do
Runtime::Feature.enable('feature_flag_name')
end
......
......@@ -533,6 +533,11 @@ The metrics include:
- **Response Metrics:** latency, throughput, error rate
- **System Metrics:** CPU utilization, memory utilization
GitLab provides some initial alerts for you after you install Prometheus:
- Ingress status code `500` > 0.1%
- NGINX status code `500` > 0.1%
To make use of Auto Monitoring:
1. [Install and configure the requirements](index.md#requirements).
......
......@@ -7,7 +7,7 @@ type: index
GitLab University is a great place to start when learning about version control with Git and GitLab, as well as other GitLab features.
If you're looking for a GitLab subscription for _your university_, see our [Education](https://about.gitlab.com/solutions/education/) page.
If you're looking for a GitLab subscription for _your university_, see our [GitLab for Education](https://about.gitlab.com/solutions/education/) page.
CAUTION: **Caution:**
Some of the content in GitLab University may be out of date and we plan to
......
......@@ -17184,6 +17184,12 @@ msgstr ""
msgid "Requirements"
msgstr ""
msgid "Requirements allow you to create criteria to check your products against."
msgstr ""
msgid "Requirements can be based on users, stakeholders, system, software or anything else you find important to capture."
msgstr ""
msgid "Requires approval from %{names}."
msgid_plural "Requires %{count} more approvals from %{names}."
msgstr[0] ""
......
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