Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-09-02 21:08:51 +00:00
parent 7247395411
commit e7f5f860cf
9 changed files with 69 additions and 42 deletions

View File

@ -396,7 +396,7 @@ export default {
}
},
onMergeImmediatelyConfirmation() {
this.handleMergeButtonClick(false, true);
this.handleMergeButtonClick(false, true, true);
},
initiateMergePolling() {
simplePoll(

View File

@ -102,7 +102,6 @@
.tree-table {
margin-bottom: 0;
table-layout: fixed;
tr {
border-bottom: 1px solid $white-normal;

View File

@ -7,30 +7,31 @@ type: howto
# How to enable or disable GitLab CI/CD **(FREE)**
To effectively use GitLab CI/CD, you need:
To use GitLab CI/CD, you need:
- A valid [`.gitlab-ci.yml`](yaml/index.md) file present at the root directory
of your project.
- A [runner](runners/index.md) properly set up.
- A [runner](runners/index.md) ready to run jobs.
You can read our [quick start guide](quick_start/index.md) to get you started.
If you use an external CI/CD server like Jenkins or Drone CI, you should
If you use an external CI/CD server like Jenkins or Drone CI, you can
disable GitLab CI/CD to avoid conflicts with the commits status
API.
GitLab CI/CD is exposed by using the `/pipelines` and `/jobs` pages of a project.
Disabling GitLab CI/CD in a project does not delete any previous jobs.
In fact, the `/pipelines` and `/jobs` pages can still be accessed, although
it's hidden from the left sidebar menu.
GitLab CI/CD is enabled by default on all new projects. You can:
- Disable GitLab CI/CD [under each project's settings](#enable-cicd-in-a-project).
- Set GitLab CI/CD to be [disabled in all new projects on an instance](../administration/cicd.md).
This only applies to pipelines run as part of GitLab CI/CD. This doesn't enable or disable
pipelines that are run from an [external integration](../user/project/integrations/overview.md#integrations-listing).
If you disable GitLab CI/CD in a project:
- The **CI/CD** item in the left sidebar is removed.
- The `/pipelines` and `/jobs` pages are no longer available.
- Existing jobs and pipelines are not deleted. Re-enable CI/CD to access them again.
The project or instance settings do not enable or disable pipelines run in an
[external integration](../user/project/integrations/overview.md#integrations-listing).
## Enable CI/CD in a project

View File

@ -107,10 +107,10 @@ We're always looking for contributions that can mitigate these
### Reset the runner registration token for a project
If you think that a registration token for a project was revealed, you should
reset it. A token can be used to register another runner for the project. That new runner
may then be used to obtain the values of secret variables or to clone project code.
reset it. A registration token can be used to register another runner for the project.
That new runner may then be used to obtain the values of secret variables or to clone project code.
To reset the token:
To reset the registration token:
1. Go to the project's **Settings > CI/CD**.
1. Expand the **General pipelines settings** section.
@ -124,6 +124,16 @@ any new runners to the project. If you are using any tools to provision and
register new runners, the tokens used in those tools should be updated to reflect the
value of the new token.
### Reset the runner authentication token
If you think that an authentication token for a runner was revealed, you should
reset it. An attacker could use the token to [clone a runner](https://docs.gitlab.com/runner/security/#cloning-a-runner).
To reset the authentication token, [unregister the runner](https://docs.gitlab.com/runner/commands/#gitlab-runner-unregister)
and then [register](https://docs.gitlab.com/runner/commands/#gitlab-runner-register) it again.
To verify that the previous authentication token is no longer valid, use the [Runners API](../../api/runners.md#verify-authentication-for-a-registered-runner).
## Determine the IP address of a runner
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/17286) in GitLab 10.6.

View File

@ -77,6 +77,8 @@ The setup process involves a few steps to enable GitOps deployments:
1. [Install the Agent into the cluster](#install-the-agent-into-the-cluster).
1. [Create manifest files](#create-manifest-files).
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i> Watch a GitLab 14.2 [walking-through video](https://www.youtube.com/watch?v=XuBpKtsgGkE) with this process.
### Upgrades and version compatibility
As the GitLab Kubernetes Agent is a new product, we are constantly adding new features

View File

@ -54,21 +54,9 @@ Some GitLab features may support versions outside the range provided here.
## Add and remove clusters
You can create new or add existing clusters to GitLab through different levels,
You can create new or add existing clusters to GitLab through different [levels](#cluster-levels),
using different methods.
### Cluster levels
You can connect clusters to GitLab in different levels, according to their purpose:
- On the project level, to have a cluster dedicated to a project.
- On the [group level](../../group/clusters/index.md), to use the same cluster across multiple projects within your group.
- On the [instance level](../../instance/clusters/index.md), to use the same cluster across multiple groups and projects. **(FREE SELF)**
### Methods to create new clusters
To create new clusters, we **recommend** using [Infrastructure as Code](../../infrastructure/index.md).
### Methods to connect existing clusters
To safely connect and configure an existing cluster on the **project level**, we
@ -80,6 +68,18 @@ You can use [cluster certificates](add_existing_cluster.md) to connect
clusters in all levels (projects, group, instance). However, for
[security implications](#security-implications), this method is no longer recommended.
### Methods to create new clusters
To create new clusters, we **recommend** using [Infrastructure as Code](../../infrastructure/index.md).
### Cluster levels
You can connect clusters to GitLab in different levels, according to their purpose:
- On the project level, to have a cluster dedicated to a project.
- On the [group level](../../group/clusters/index.md), to use the same cluster across multiple projects within your group.
- On the [instance level](../../instance/clusters/index.md), to use the same cluster across multiple groups and projects. **(FREE SELF)**
## Security implications
WARNING:

View File

@ -115,7 +115,7 @@
"codesandbox-api": "0.0.23",
"compression-webpack-plugin": "^5.0.2",
"copy-webpack-plugin": "^6.4.1",
"core-js": "^3.17.1",
"core-js": "^3.17.2",
"cron-validator": "^1.1.1",
"cropper": "^2.3.0",
"css-loader": "^2.1.1",

View File

@ -8,6 +8,7 @@ import waitForPromises from 'helpers/wait_for_promises';
import waitUsingRealTimer from 'helpers/wait_using_real_timer';
import { exampleConfigs, exampleFiles } from 'jest/ide/lib/editorconfig/mock_data';
import { EDITOR_CODE_INSTANCE_FN, EDITOR_DIFF_INSTANCE_FN } from '~/editor/constants';
import { EditorMarkdownExtension } from '~/editor/extensions/source_editor_markdown_ext';
import { EditorWebIdeExtension } from '~/editor/extensions/source_editor_webide_ext';
import SourceEditor from '~/editor/source_editor';
import RepoEditor from '~/ide/components/repo_editor.vue';
@ -25,6 +26,7 @@ import ContentViewer from '~/vue_shared/components/content_viewer/content_viewer
import { file } from '../helpers';
const PREVIEW_MARKDOWN_PATH = '/foo/bar/preview_markdown';
const CURRENT_PROJECT_ID = 'gitlab-org/gitlab';
const defaultFileProps = {
...file('file.txt'),
@ -63,7 +65,7 @@ const prepareStore = (state, activeFile) => {
const localState = {
openFiles: [activeFile],
projects: {
'gitlab-org/gitlab': {
[CURRENT_PROJECT_ID]: {
branches: {
main: {
name: 'main',
@ -74,7 +76,7 @@ const prepareStore = (state, activeFile) => {
},
},
},
currentProjectId: 'gitlab-org/gitlab',
currentProjectId: CURRENT_PROJECT_ID,
currentBranchId: 'main',
entries: {
[activeFile.path]: activeFile,
@ -98,6 +100,7 @@ describe('RepoEditor', () => {
let createInstanceSpy;
let createDiffInstanceSpy;
let createModelSpy;
let applyExtensionSpy;
const waitForEditorSetup = () =>
new Promise((resolve) => {
@ -124,11 +127,28 @@ describe('RepoEditor', () => {
const findEditor = () => wrapper.find('[data-testid="editor-container"]');
const findTabs = () => wrapper.findAll('.ide-mode-tabs .nav-links li');
const findPreviewTab = () => wrapper.find('[data-testid="preview-tab"]');
const expectEditorMarkdownExtension = (shouldHaveExtension) => {
if (shouldHaveExtension) {
expect(applyExtensionSpy).toHaveBeenCalledWith(
wrapper.vm.editor,
expect.any(EditorMarkdownExtension),
);
// TODO: spying on extensions causes Jest to blow up, so we have to assert on
// the public property the extension adds, as opposed to the args passed to the ctor
expect(wrapper.vm.editor.previewMarkdownPath).toBe(PREVIEW_MARKDOWN_PATH);
} else {
expect(applyExtensionSpy).not.toHaveBeenCalledWith(
wrapper.vm.editor,
expect.any(EditorMarkdownExtension),
);
}
};
beforeEach(() => {
createInstanceSpy = jest.spyOn(SourceEditor.prototype, EDITOR_CODE_INSTANCE_FN);
createDiffInstanceSpy = jest.spyOn(SourceEditor.prototype, EDITOR_DIFF_INSTANCE_FN);
createModelSpy = jest.spyOn(monacoEditor, 'createModel');
applyExtensionSpy = jest.spyOn(SourceEditor, 'instanceApplyExtension');
jest.spyOn(service, 'getFileData').mockResolvedValue();
jest.spyOn(service, 'getRawFileData').mockResolvedValue();
});
@ -280,13 +300,8 @@ describe('RepoEditor', () => {
'$prefix install markdown extension for $activeFile.name in $viewer viewer',
async ({ activeFile, viewer, shouldHaveMarkdownExtension } = {}) => {
await createComponent({ state: { viewer }, activeFile });
if (shouldHaveMarkdownExtension) {
expect(vm.editor.previewMarkdownPath).toBe(PREVIEW_MARKDOWN_PATH);
expect(vm.editor.togglePreview).toBeDefined();
} else {
expect(vm.editor.previewMarkdownPath).toBeUndefined();
expect(vm.editor.togglePreview).toBeUndefined();
}
expectEditorMarkdownExtension(shouldHaveMarkdownExtension);
},
);
});

View File

@ -3898,10 +3898,10 @@ core-js-pure@^3.0.0:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813"
integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==
core-js@^3.1.3, core-js@^3.17.1:
version "3.17.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.17.1.tgz#b39e086f413789cf2ca4680c4ecd1b36a50ba277"
integrity sha512-C8i/FNpVN2Ti89QIJcFn9ZQmnM+HaAQr2OpE+ja3TRM9Q34FigsGlAVuwPGkIgydSVClo/1l1D1grP8LVt9IYA==
core-js@^3.1.3, core-js@^3.17.2:
version "3.17.2"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.17.2.tgz#f960eae710dc62c29cca93d5332e3660e289db10"
integrity sha512-XkbXqhcXeMHPRk2ItS+zQYliAMilea2euoMsnpRRdDad6b2VY6CQQcwz1K8AnWesfw4p165RzY0bTnr3UrbYiA==
core-js@~2.3.0:
version "2.3.0"