diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-16 18:07:36 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-16 18:07:36 +0300 |
commit | afe44451f46e2c470f429b0b6f73e04d49e66f7c (patch) | |
tree | 2388a3f85355ca180d2256f9c9299b5bf2dda059 /doc | |
parent | 5c4934ee9486fb5ce7f14581680369010009835b (diff) | |
parent | a73f480715f086e86d781e22d8a76b71c3b0680a (diff) |
[ci skip]ce-6038-rebase-preserve-merge
Merge remote-tracking branch 'upstream/master' into ce-6038-rebase-preserve-merge
* upstream/master: (173 commits)
Fix invalid link to GitLab.com architecture.md
i18n: externalize strings from 'app/views/import'
Remove Repository#lookup and unreachable rugged code
refactor code based on feedback
Trigger rails5 tests either by variable or ref name
Fix link in help doc which was linking to old mono-repo, now in its own repo
Allow Danger step to fail
update webpack to v4.16
Backport logger changes from EE
Add the CI Job trigger as the build trigger
Remove flaky and redundant expectations
use fileuploader dynamic path method in uploads manager and add spec
fix typo in uploads manager
add small comment to download method in uploads manager
refactor uploads manager
Update 10.6-to-10.7.md
Lazy-load performance bar UI
Update .gitlab-ci.yml
fixed test to correctly text relative URLs doesnt add query param if source & target projects match
Add changelog entry
...
Diffstat (limited to 'doc')
31 files changed, 240 insertions, 319 deletions
diff --git a/doc/administration/index.md b/doc/administration/index.md index 922cc45d8c4..88190b2df5f 100644 --- a/doc/administration/index.md +++ b/doc/administration/index.md @@ -45,6 +45,7 @@ Learn how to install, configure, update, and maintain your GitLab instance. - [Environment variables](environment_variables.md): Supported environment variables that can be used to override their defaults values in order to configure GitLab. - [Plugins](plugins.md): With custom plugins, GitLab administrators can introduce custom integrations without modifying GitLab's source code. - [Enforcing Terms of Service](../user/admin_area/settings/terms.md) +- [Third party offers](../user/admin_area/settings/third_party_offers.md) #### Customizing GitLab's appearance diff --git a/doc/administration/job_artifacts.md b/doc/administration/job_artifacts.md index 10228d027e8..8c55c8c4298 100644 --- a/doc/administration/job_artifacts.md +++ b/doc/administration/job_artifacts.md @@ -88,13 +88,12 @@ _The artifacts are stored by default in ### Using object storage >**Notes:** -- [Introduced][ee-1762] in [GitLab Premium][eep] 9.4. -- Since version 9.5, artifacts are [browsable], when object storage is enabled. - 9.4 lacks this feature. -> Available in [GitLab Premium](https://about.gitlab.com/pricing/) and -[GitLab.com Silver](https://about.gitlab.com/gitlab-com/). -> Since version 10.6, available in [GitLab CE](https://about.gitlab.com/pricing/) -> Since version 11.0, we support direct_upload to S3. +- [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1762) in + [GitLab Premium](https://about.gitlab.com/pricing/) 9.4. +- Since version 9.5, artifacts are [browsable](../user/project/pipelines/job_artifacts.md#browsing-artifacts), + when object storage is enabled. 9.4 lacks this feature. +- Since version 10.6, available in [GitLab Core](https://about.gitlab.com/pricing/) +- Since version 11.0, we support `direct_upload` to S3. If you don't want to use the local disk where GitLab is installed to store the artifacts, you can use an object storage like AWS S3 instead. diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md index c0a281382a5..b3602bc35ab 100644 --- a/doc/administration/pages/index.md +++ b/doc/administration/pages/index.md @@ -259,6 +259,24 @@ verification requirement. Navigate to `Admin area ➔ Settings` and uncheck **Require users to prove ownership of custom domains** in the Pages section. This setting is enabled by default. +## Activate verbose logging for daemon + +Verbose logging was [introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/2533) in +Omnibus GitLab 11.1. + +Follow the steps below to configure verbose logging of GitLab Pages daemon. + +1. By default the daemon only logs with `INFO` level. + + If you wish to make it log events with level `DEBUG` you must configure this in + `/etc/gitlab/gitlab.rb`: + + ```shell + gitlab_pages['log_verbose'] = true + ``` + +1. [Reconfigure GitLab][reconfigure] + ## Change storage path Follow the steps below to change the default path where GitLab Pages' contents diff --git a/doc/api/README.md b/doc/api/README.md index 6267618d3bc..4566319ad45 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -388,7 +388,7 @@ For example, `/` is represented by `%2F`: GET /api/v4/projects/diaspora%2Fdiaspora ``` -## Branches & tags name encoding +## Branches and tags name encoding If your branch or tag contains a `/`, make sure the branch/tag name is URL-encoded. @@ -399,6 +399,36 @@ For example, `/` is represented by `%2F`: GET /api/v4/projects/1/branches/my%2Fbranch/commits ``` +## Encoding API parameters of `array` and `hash` types + +When making an API call with parameters of type `array` and/or `hash`, the parameters may be +specified as shown below. + +### `array` + +`import_sources` is a parameter of type `array`: + +``` +curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" \ +-d "import_sources[]=github" \ +-d "import_sources[]=bitbucket" \ +"https://gitlab.example.com/api/v4/some_endpoint +``` + +### `hash` + +`override_params` is a parameter of type `hash`: + +``` +curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" \ +--form "namespace=email" \ +--form "path=impapi" \ +--form "file=@/path/to/somefile.txt" +--form "override_params[visibility]=private" \ +--form "override_params[some_other_param]=some_value" \ +https://gitlab.example.com/api/v4/projects/import +``` + ## `id` vs `iid` When you work with the API, you may notice two similar fields in API entities: diff --git a/doc/api/notes.md b/doc/api/notes.md index d29c5b94915..c271d46688f 100644 --- a/doc/api/notes.md +++ b/doc/api/notes.md @@ -218,6 +218,7 @@ Parameters: - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) - `snippet_id` (required) - The ID of a snippet - `body` (required) - The content of a note +- `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z ```bash curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/snippet/11/notes?body=note @@ -340,6 +341,7 @@ Parameters: - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) - `merge_request_iid` (required) - The IID of a merge request - `body` (required) - The content of a note +- `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z ### Modify existing merge request note diff --git a/doc/api/project_import_export.md b/doc/api/project_import_export.md index 085437c801a..83e405141f1 100644 --- a/doc/api/project_import_export.md +++ b/doc/api/project_import_export.md @@ -28,8 +28,11 @@ POST /projects/:id/export | `upload[url]` | string | yes | The URL to upload the project | | `upload[http_method]` | string | no | The HTTP method to upload the exported project. Only `PUT` and `POST` methods allowed. Default is `PUT` | + ```console -curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/export --data "description=FooBar&upload[http_method]=PUT&upload[url]=https://example-bucket.s3.eu-west-3.amazonaws.com/backup?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIMBJHN2O62W8IELQ%2F20180312%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20180312T110328Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=8413facb20ff33a49a147a0b4abcff4c8487cc33ee1f7e450c46e8f695569dbd" +curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/export \ + --data "upload[http_method]=PUT" \ + --data-urlencode "upload[url]=https://example-bucket.s3.eu-west-3.amazonaws.com/backup?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIMBJHN2O62W8IELQ%2F20180312%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20180312T110328Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=8413facb20ff33a49a147a0b4abcff4c8487cc33ee1f7e450c46e8f695569dbd" ``` ```json @@ -125,6 +128,29 @@ by `@`. For example: curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "path=api-project" --form "file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import ``` +cURL doesn't support posting a file from a remote server. Importing a project from a remote server can be accomplished through something like the following: + +```python +import requests +import urllib +import json +import sys + +s3_file = urllib.urlopen(presigned_url) + +url = 'https://gitlab.example.com/api/v4/projects/import' +files = {'file': s3_file} +data = { + "path": "example-project", + "namespace": "example-group" +} +headers = { + 'Private-Token': "9koXpg98eAheJpvBs5tK" +} + +requests.post(url, headers=headers, data=data, files=files) +``` + ```json { "id": 1, diff --git a/doc/api/settings.md b/doc/api/settings.md index e6b207d8746..b6f2101fc7b 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -105,7 +105,7 @@ PUT /application/settings | `housekeeping_gc_period` | integer | no | Number of Git pushes after which 'git gc' is run. | | `housekeeping_incremental_repack_period` | integer | no | Number of Git pushes after which an incremental 'git repack' is run. | | `html_emails_enabled` | boolean | no | Enable HTML emails | -| `import_sources` | Array of strings | no | Sources to allow project import from, possible values: "github bitbucket gitlab google_code fogbugz git gitlab_project | +| `import_sources` | Array of strings | no | Sources to allow project import from, possible values: "github bitbucket gitlab google_code fogbugz git gitlab_project manifest | | `koding_enabled` | boolean | no | Enable Koding integration. Default is `false`. | | `koding_url` | string | yes (if `koding_enabled` is `true`) | The Koding instance URL for integration. | | `max_artifacts_size` | integer | no | Maximum artifacts size in MB | diff --git a/doc/api/todos.md b/doc/api/todos.md index 0843e4eedc6..27e623007cc 100644 --- a/doc/api/todos.md +++ b/doc/api/todos.md @@ -18,7 +18,6 @@ Parameters: | `action` | string | no | The action to be filtered. Can be `assigned`, `mentioned`, `build_failed`, `marked`, `approval_required`, `unmergeable` or `directly_addressed`. | | `author_id` | integer | no | The ID of an author | | `project_id` | integer | no | The ID of a project | -| `group_id` | integer | no | The ID of a group | | `state` | string | no | The state of the todo. Can be either `pending` or `done` | | `type` | string | no | The type of a todo. Can be either `Issue` or `MergeRequest` | diff --git a/doc/ci/examples/README.md b/doc/ci/examples/README.md index aa31e172641..811f4d1f07a 100644 --- a/doc/ci/examples/README.md +++ b/doc/ci/examples/README.md @@ -43,9 +43,9 @@ There's also a collection of repositories with [example projects](https://gitlab - [Using `dpl` as deployment tool](deployment/README.md) - [The `.gitlab-ci.yml` file for GitLab itself](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml) -## Code quality analysis +## Code Quality analysis -[Analyze code quality with the Code Climate CLI](code_climate.md). +**(Starter)** [Analyze your project's Code Quality](code_quality.md). ## Static Application Security Testing (SAST) diff --git a/doc/ci/examples/code_climate.md b/doc/ci/examples/code_climate.md index 2c8865c6e50..b34637efc8d 100644 --- a/doc/ci/examples/code_climate.md +++ b/doc/ci/examples/code_climate.md @@ -1,49 +1,6 @@ -# Analyze project code quality with Code Climate CLI +--- +redirect_from: 'https://docs.gitlab.com/ee/ci/examples/code_climate.html' +redirect_to: code_quality.md +--- -This example shows how to run [Code Climate CLI][cli] on your code by using -GitLab CI and Docker. - -First, you need GitLab Runner with [docker-in-docker executor][dind]. - -Once you set up the Runner, add a new job to `.gitlab-ci.yml`, called `code_quality`: - -```yaml -code_quality: - image: docker:stable - variables: - DOCKER_DRIVER: overlay2 - allow_failure: true - services: - - docker:stable-dind - script: - - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - - docker run - --env SOURCE_CODE="$PWD" - --volume "$PWD":/code - --volume /var/run/docker.sock:/var/run/docker.sock - "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code - artifacts: - paths: [gl-code-quality-report.json] -``` - -The above example will create a `code_quality` job in your CI/CD pipeline which -will scan your source code for code quality issues. The report will be saved -as an artifact that you can later download and analyze. - -TIP: **Tip:** -Starting with [GitLab Starter][ee] 9.3, this information will -be automatically extracted and shown right in the merge request widget. To do -so, the CI/CD job must be named `code_quality` and the artifact path must be -`gl-code-quality-report.json`. -[Learn more on code quality diffs in merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html). - -CAUTION: **Caution:** -Code Quality was previously using `codeclimate` and `codequality` for job name and -`codeclimate.json` for the artifact name. While these old names -are still maintained they have been deprecated with GitLab 11.0 and may be removed -in next major release, GitLab 12.0. You are advised to update your current `.gitlab-ci.yml` -configuration to reflect that change. - -[cli]: https://github.com/codeclimate/codeclimate -[dind]: ../docker/using_docker_build.md#use-docker-in-docker-executor -[ee]: https://about.gitlab.com/pricing/ +This document was moved to [another location](code_quality.md). diff --git a/doc/ci/examples/code_quality.md b/doc/ci/examples/code_quality.md new file mode 100644 index 00000000000..2a7040ecdeb --- /dev/null +++ b/doc/ci/examples/code_quality.md @@ -0,0 +1,49 @@ +# Analyze your project's Code Quality + +This example shows how to run Code Quality on your code by using GitLab CI/CD +and Docker. + +First, you need GitLab Runner with [docker-in-docker executor][dind]. + +Once you set up the Runner, add a new job to `.gitlab-ci.yml`, called `code_quality`: + +```yaml +code_quality: + image: docker:stable + variables: + DOCKER_DRIVER: overlay2 + allow_failure: true + services: + - docker:stable-dind + script: + - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') + - docker run + --env SOURCE_CODE="$PWD" + --volume "$PWD":/code + --volume /var/run/docker.sock:/var/run/docker.sock + "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code + artifacts: + paths: [gl-code-quality-report.json] +``` + +The above example will create a `code_quality` job in your CI/CD pipeline which +will scan your source code for code quality issues. The report will be saved +as an artifact that you can later download and analyze. + +TIP: **Tip:** +Starting with [GitLab Starter][ee] 9.3, this information will +be automatically extracted and shown right in the merge request widget. To do +so, the CI/CD job must be named `code_quality` and the artifact path must be +`gl-code-quality-report.json`. +[Learn more on Code Quality in merge requests](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html). + +CAUTION: **Caution:** +Code Quality was previously using `codeclimate` and `codequality` for job name and +`codeclimate.json` for the artifact name. While these old names +are still maintained they have been deprecated with GitLab 11.0 and may be removed +in next major release, GitLab 12.0. You are advised to update your current `.gitlab-ci.yml` +configuration to reflect that change. + +[cli]: https://github.com/codeclimate/codeclimate +[dind]: ../docker/using_docker_build.md#use-docker-in-docker-executor +[ee]: https://about.gitlab.com/pricing/ diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index 9f6476edc34..84bd64d50cd 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -47,6 +47,7 @@ future GitLab releases.** | **CI_COMMIT_REF_NAME** | 9.0 | all | The branch or tag name for which project is built | | **CI_COMMIT_REF_SLUG** | 9.0 | all | `$CI_COMMIT_REF_NAME` lowercased, shortened to 63 bytes, and with everything except `0-9` and `a-z` replaced with `-`. No leading / trailing `-`. Use in URLs, host names and domain names. | | **CI_COMMIT_SHA** | 9.0 | all | The commit revision for which project is built | +| **CI_COMMIT_BEFORE_SHA** | 11.2 | all | The previous latest commit present on a branch before a push request. | | **CI_COMMIT_TAG** | 9.0 | 0.5 | The commit tag name. Present only when building tags. | | **CI_COMMIT_MESSAGE** | 10.8 | all | The full commit message. | | **CI_COMMIT_TITLE** | 10.8 | all | The title of the commit - the full first line of the message | @@ -118,6 +119,7 @@ future GitLab releases.** | `CI_BUILD_ID` | `CI_JOB_ID` | | `CI_BUILD_REF` | `CI_COMMIT_SHA` | | `CI_BUILD_TAG` | `CI_COMMIT_TAG` | +| `CI_BUILD_BEFORE_SHA` | `CI_COMMIT_BEFORE_SHA` | | `CI_BUILD_REF_NAME` | `CI_COMMIT_REF_NAME` | | `CI_BUILD_REF_SLUG` | `CI_COMMIT_REF_SLUG` | | `CI_BUILD_NAME` | `CI_JOB_NAME` | diff --git a/doc/development/architecture.md b/doc/development/architecture.md index e6cf5e01f46..3e417a44ec1 100644 --- a/doc/development/architecture.md +++ b/doc/development/architecture.md @@ -197,4 +197,4 @@ Note: It is recommended to log into the `git` user using `sudo -i -u git` or `su ## GitLab.com -CONFLICT! +We've also detailed [our architecture of GitLab.com](https://about.gitlab.com/handbook/engineering/infrastructure/production-architecture/) but this is probably over the top unless you have millions of users. diff --git a/doc/development/fe_guide/img/vue_arch.png b/doc/development/fe_guide/img/vue_arch.png Binary files differdeleted file mode 100644 index a67706c7c1e..00000000000 --- a/doc/development/fe_guide/img/vue_arch.png +++ /dev/null diff --git a/doc/development/fe_guide/vue.md b/doc/development/fe_guide/vue.md index 219b98ac696..f6cbd11042c 100644 --- a/doc/development/fe_guide/vue.md +++ b/doc/development/fe_guide/vue.md @@ -2,27 +2,24 @@ To get started with Vue, read through [their documentation][vue-docs]. -## Vue architecture +## Examples -All new features built with Vue.js must follow a [Flux architecture][flux]. -The main goal we are trying to achieve is to have only one data flow and only one data entry. -In order to achieve this goal, you can either use [vuex](#vuex) or use the [store pattern][state-management], explained below: +What is described in the following sections can be found in these examples: -Each Vue bundle needs a Store - where we keep all the data -, a Service - that we use to communicate with the server - and a main Vue component. +- web ide: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/app/assets/javascripts/ide/stores +- security products: https://gitlab.com/gitlab-org/gitlab-ee/tree/master/ee/app/assets/javascripts/vue_shared/security_reports +- registry: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/app/assets/javascripts/registry/stores -Think of the Main Vue Component as the entry point of your application. This is the only smart -component that should exist in each Vue feature. -This component is responsible for: -1. Calling the Service to get data from the server -1. Calling the Store to store the data received -1. Mounting all the other components +## Vue architecture -![Vue Architecture](img/vue_arch.png) +All new features built with Vue.js must follow a [Flux architecture][flux]. +The main goal we are trying to achieve is to have only one data flow and only one data entry. +In order to achieve this goal we use [vuex](#vuex). You can also read about this architecture in vue docs about [state management][state-management] and about [one way data flow][one-way-data-flow]. -### Components, Stores and Services +### Components and Store In some features implemented with Vue.js, like the [issue board][issue-boards] or [environments table][environments-table] @@ -33,10 +30,8 @@ new_feature ├── components │ └── component.vue │ └── ... -├── stores +├── store │ └── new_feature_store.js -├── services # only when not using vuex -│ └── new_feature_service.js ├── index.js ``` _For consistency purposes, we recommend you to follow the same structure._ @@ -125,217 +120,6 @@ You can read more about components in Vue.js site, [Component System][component- #### Vuex Check this [page](vuex.md) for more details. -#### Flux like state management -The Store is a class that allows us to manage the state in a single -source of truth. It is not aware of the service or the components. - -The concept we are trying to follow is better explained by Vue documentation -itself, please read this guide: [State Management][state-management] - -### A folder for the Service - -**If you are using Vuex you won't need this step** - -The Service is a class used only to communicate with the server. -It does not store or manipulate any data. It is not aware of the store or the components. -We use [axios][axios] to communicate with the server. -Refer to [axios](axios.md) for more details. - -Axios instance should only be imported in the service file. - -```javascript -import axios from '~/lib/utils/axios_utils'; -``` - -### End Result - -The following example shows an application: - -```javascript -// store.js -export default class Store { - - /** - * This is where we will iniatialize the state of our data. - * Usually in a small SPA you don't need any options when starting the store. - * In that case you do need guarantee it's an Object and it's documented. - * - * @param {Object} options - */ - constructor(options) { - this.options = options; - - // Create a state object to handle all our data in the same place - this.todos = []; - } - - setTodos(todos = []) { - this.todos = todos; - } - - addTodo(todo) { - this.todos.push(todo); - } - - removeTodo(todoID) { - const state = this.todos; - - const newState = state.filter((element) => {element.id !== todoID}); - - this.todos = newState; - } -} - -// service.js -import axios from '~/lib/utils/axios_utils' - -export default class Service { - constructor(options) { - this.todos = axios.create({ - baseURL: endpoint.todosEndpoint - }); - - } - - getTodos() { - return this.todos.get(); - } - - addTodo(todo) { - return this.todos.put(todo); - } -} -// todo_component.vue -<script> -export default { - props: { - data: { - type: Object, - required: true, - }, - }, -}; -</script> -<template> - <div> - <h1> - Title: {{data.title}} - </h1> - <p> - {{data.text}} - </p> - </div> -</template> - -// todos_main_component.vue -<script> -import Store from 'store'; -import Service from 'service'; -import TodoComponent from 'todoComponent'; -export default { - components: { - todo: TodoComponent, - }, - /** - * Although most data belongs in the store, each component it's own state. - * We want to show a loading spinner while we are fetching the todos, this state belong - * in the component. - * - * We need to access the store methods through all methods of our component. - * We need to access the state of our store. - */ - data() { - const store = new Store(); - - return { - isLoading: false, - store: store, - todos: store.todos, - }; - }, - - created() { - this.service = new Service('/todos'); - - this.getTodos(); - }, - - methods: { - getTodos() { - this.isLoading = true; - - this.service - .getTodos() - .then(response => { - this.store.setTodos(response); - this.isLoading = false; - }) - .catch(() => { - this.isLoading = false; - // Show an error - }); - }, - - addTodo(event) { - this.service - .addTodo({ - title: 'New entry', - text: `You clicked on ${event.target.tagName}`, - }) - .then(response => { - this.store.addTodo(response); - }) - .catch(() => { - // Show an error - }); - }, - }, -}; -</script> -<template> - <div class="container"> - <div v-if="isLoading"> - <i - class="fa fa-spin fa-spinner" - aria-hidden="true" /> - </div> - - <div - v-if="!isLoading" - class="js-todo-list"> - <template v-for='todo in todos'> - <todo :data="todo" /> - </template> - - <button - @click="addTodo" - class="js-add-todo"> - Add Todo - </button> - </div> - <div> -</template> - -// index.js -import todoComponent from 'todos_main_component.vue'; - -new Vue({ - el: '.js-todo-app', - components: { - todoComponent, - }, - render: createElement => createElement('todo-component' { - props: { - someProp: [], - } - }), -}); - -``` - -The [issue boards service][issue-boards-service] -is a good example of this pattern. - ## Style guide Please refer to the Vue section of our [style guide](style_guide_js.md#vue-js) @@ -446,6 +230,5 @@ need to test the rendered output. [Vue][vue-test] guide's to unit test show us e [state-management]: https://vuejs.org/v2/guide/state-management.html#Simple-State-Management-from-Scratch [one-way-data-flow]: https://vuejs.org/v2/guide/components.html#One-Way-Data-Flow [vue-test]: https://vuejs.org/v2/guide/unit-testing.html -[issue-boards-service]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/boards/services/board_service.js.es6 [flux]: https://facebook.github.io/flux [axios]: https://github.com/axios/axios diff --git a/doc/development/what_requires_downtime.md b/doc/development/what_requires_downtime.md index 47396666879..b668c9de6a0 100644 --- a/doc/development/what_requires_downtime.md +++ b/doc/development/what_requires_downtime.md @@ -198,14 +198,14 @@ And that's it, we're done! ## Changing The Schema For Large Tables While `change_column_type_concurrently` and `rename_column_concurrently` can be -used for changing the schema of a table without downtime it doesn't work very +used for changing the schema of a table without downtime, it doesn't work very well for large tables. Because all of the work happens in sequence the migration can take a very long time to complete, preventing a deployment from proceeding. They can also produce a lot of pressure on the database due to it rapidly updating many rows in sequence. To reduce database pressure you should instead use -`change_column_type_using_background_migration` or `rename_column_concurrently` +`change_column_type_using_background_migration` or `rename_column_using_background_migration` when migrating a column in a large table (e.g. `issues`). These methods work similarly to the concurrent counterparts but uses background migration to spread the work / load over a longer time period, without slowing down deployments. diff --git a/doc/install/installation.md b/doc/install/installation.md index 4b68090f8d3..8c7f80fd8e8 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -92,9 +92,9 @@ Is the system packaged Git too old? Remove it and compile from source. # Download and compile from source cd /tmp - curl --remote-name --progress https://www.kernel.org/pub/software/scm/git/git-2.16.3.tar.gz - echo 'dda229e9c73f4fbb7d4324e0d993e11311673df03f73b194c554c2e9451e17cd git-2.16.3.tar.gz' | shasum -a256 -c - && tar -xzf git-2.16.3.tar.gz - cd git-2.16.3/ + curl --remote-name --progress https://www.kernel.org/pub/software/scm/git/git-2.18.0.tar.gz + echo '94faf2c0b02a7920b0b46f4961d8e9cad08e81418614102898a55f980fa3e7e4 git-2.18.0.tar.gz' | shasum -a256 -c - && tar -xzf git-2.18.0.tar.gz + cd git-2.18.0/ ./configure make prefix=/usr/local all diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md index 9094d1f2419..2afcb052536 100644 --- a/doc/integration/bitbucket.md +++ b/doc/integration/bitbucket.md @@ -22,8 +22,8 @@ Bitbucket.org. > **Note:** GitLab 8.15 significantly simplified the way to integrate Bitbucket.org with -GitLab. You are encouraged to upgrade your GitLab instance if you haven't done -already. If you're using GitLab 8.14 and below, [use the previous integration +GitLab. You are encouraged to upgrade your GitLab instance if you haven't done so +already. If you're using GitLab 8.14 or below, [use the previous integration docs][bb-old]. To enable the Bitbucket OmniAuth provider you must register your application @@ -64,7 +64,7 @@ you to use. 1. Select **Save**. 1. Select your newly created OAuth consumer and you should now see a Key and - Secret in the list of OAuth customers. Keep this page open as you continue + Secret in the list of OAuth consumers. Keep this page open as you continue the configuration. ![Bitbucket OAuth key](img/bitbucket_oauth_keys.png) @@ -114,8 +114,8 @@ you to use. from the Bitbucket application page. 1. Save the configuration file. -1. [Reconfigure][] or [restart GitLab][] for the changes to take effect if you - installed GitLab via Omnibus or from source respectively. +1. For the changes to take effect, [reconfigure GitLab][] if you installed via + Omnibus, or [restart][] if installed from source. On the sign in page there should now be a Bitbucket icon below the regular sign in form. Click the icon to begin the authentication process. Bitbucket will ask @@ -127,12 +127,12 @@ well, the user will be returned to GitLab and will be signed in. Once the above configuration is set up, you can use Bitbucket to sign into GitLab and [start importing your projects][bb-import]. -If you don't want to enable signing in with Bitbucket but just want to import -projects from Bitbucket, you could [disable it in the admin panel](omniauth.md#enable-or-disable-sign-in-with-an-omniauth-provider-without-disabling-import-sources). +If you want to import projects from Bitbucket, but don't want to enable signing in, +you can [disable Sign-Ins in the admin panel](omniauth.md#enable-or-disable-sign-in-with-an-omniauth-provider-without-disabling-import-sources). [init-oauth]: omniauth.md#initial-omniauth-configuration [bb-import]: ../workflow/importing/import_projects_from_bitbucket.md [bb-old]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-14-stable/doc/integration/bitbucket.md [bitbucket-docs]: https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html#UsetheSSHprotocolwithBitbucketCloud-KnownhostorBitbucket%27spublickeyfingerprints -[reconfigure]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure -[restart GitLab]: ../administration/restart_gitlab.md#installations-from-source +[reconfigure GitLab]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure +[restart]: ../administration/restart_gitlab.md#installations-from-source diff --git a/doc/raketasks/user_management.md b/doc/raketasks/user_management.md index 5554a0c8b78..e1b1912ed47 100644 --- a/doc/raketasks/user_management.md +++ b/doc/raketasks/user_management.md @@ -14,7 +14,7 @@ bundle exec rake gitlab:import:user_to_projects[username@domain.tld] RAILS_ENV=p Notes: -- admin users are added as masters +- admin users are added as maintainers ```bash # omnibus-gitlab diff --git a/doc/topics/autodevops/index.md b/doc/topics/autodevops/index.md index bb323705ab3..de1d366adc3 100644 --- a/doc/topics/autodevops/index.md +++ b/doc/topics/autodevops/index.md @@ -297,7 +297,7 @@ out. In GitLab Starter, differences between the source and target branches are also -[shown in the merge request widget](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html). +[shown in the merge request widget](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html). ### Auto SAST **[ULTIMATE]** @@ -527,7 +527,7 @@ repo or by specifying a project variable: - **Bundled chart** - If your project has a `./chart` directory with a `Chart.yaml` file in it, Auto DevOps will detect the chart and use it instead of the [default - one](https://gitlab.com/charts/charts.gitlab.io/tree/master/charts/auto-deploy-app). + one](https://gitlab.com/charts/auto-deploy-app). This can be a great way to control exactly how your application is deployed. - **Project variable** - Create a [project variable](../../ci/variables/README.md#secret-variables) `AUTO_DEVOPS_CHART` with the URL of a custom chart to use. diff --git a/doc/update/10.6-to-10.7.md b/doc/update/10.6-to-10.7.md index 4efbb8c65cf..b9c14395a3a 100644 --- a/doc/update/10.6-to-10.7.md +++ b/doc/update/10.6-to-10.7.md @@ -340,7 +340,7 @@ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production If all items are green, then congratulations, the upgrade is complete! -## Things went south? Revert to previous version (10.5) +## Things went south? Revert to previous version (10.6) ### 1. Revert the code to the previous version diff --git a/doc/user/admin_area/settings/third_party_offers.md b/doc/user/admin_area/settings/third_party_offers.md new file mode 100644 index 00000000000..177251b52b9 --- /dev/null +++ b/doc/user/admin_area/settings/third_party_offers.md @@ -0,0 +1,6 @@ +# Third party offers + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20379) +> in [GitLab Core](https://about.gitlab.com/pricing/) 11.1 + +The display of third party offers can be controlled in the Admin Area -> Settings page. diff --git a/doc/user/project/clusters/eks_and_gitlab/index.md b/doc/user/project/clusters/eks_and_gitlab/index.md index 2d8fdf0d1da..ec8467da14f 100644 --- a/doc/user/project/clusters/eks_and_gitlab/index.md +++ b/doc/user/project/clusters/eks_and_gitlab/index.md @@ -62,7 +62,7 @@ Click on `Add Kubernetes cluster`, the cluster is now connected to GitLab. At th If you would like to utilize your own CI/CD scripts to deploy to the cluster, you can stop here. -## Disable Role Based-Access Control (RBAC) +## Disable Role-Based Access Control (RBAC) Presently, Auto DevOps and one-click app installs do not support [Kubernetes role-based access control](https://kubernetes.io/docs/reference/access-authn-authz/rbac/). Support is [being worked on](https://gitlab.com/groups/gitlab-org/-/epics/136), but in the interim RBAC must be disabled to utilize for these features. diff --git a/doc/user/project/clusters/index.md b/doc/user/project/clusters/index.md index baa6efe50d5..cc1d65e4e6c 100644 --- a/doc/user/project/clusters/index.md +++ b/doc/user/project/clusters/index.md @@ -96,8 +96,9 @@ To add an existing Kubernetes cluster to your project: you can follow the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) to create one. You can also view or create service tokens in the - [Kubernetes dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/#config) - (under **Config > Secrets**). + [Kubernetes dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/) + (under **Config > Secrets**). **The account that will issue the service token + must have admin privileges on the cluster.** - **Project namespace** (optional) - You don't have to fill it in; by leaving it blank, GitLab will create one for you. Also: - Each project should have a unique namespace. diff --git a/doc/user/project/import/img/manifest_status.png b/doc/user/project/import/img/manifest_status.png Binary files differnew file mode 100644 index 00000000000..b706116a2ac --- /dev/null +++ b/doc/user/project/import/img/manifest_status.png diff --git a/doc/user/project/import/img/manifest_upload.png b/doc/user/project/import/img/manifest_upload.png Binary files differnew file mode 100644 index 00000000000..d6bf4b157dd --- /dev/null +++ b/doc/user/project/import/img/manifest_upload.png diff --git a/doc/user/project/import/index.md b/doc/user/project/import/index.md index 72cc58546b7..b55435e5b4f 100644 --- a/doc/user/project/import/index.md +++ b/doc/user/project/import/index.md @@ -11,6 +11,7 @@ 1. [From SVN](svn.md) 1. [From TFS](tfs.md) 1. [From repo by URL](repo_by_url.md) +1. [By uploading a manifest file](manifest.md) In addition to the specific migration documentation above, you can import any Git repository via HTTP from the New Project page. Be aware that if the diff --git a/doc/user/project/import/manifest.md b/doc/user/project/import/manifest.md new file mode 100644 index 00000000000..812ecf05faf --- /dev/null +++ b/doc/user/project/import/manifest.md @@ -0,0 +1,48 @@ +# Import multiple repositories by uploading a manifest file + +GitLab allows you to import all the required git repositories +based a manifest file like the one used by the Android repository. + + +>**Note:** +This feature requires [subgroups](../../group/subgroups/index.md) to be supported by your database. + +You can do it by following next steps: + +1. From your GitLab dashboard click **New project** +1. Switch to the **Import project** tab +1. Click on the **Manifest file** button +1. Provide GitLab with a manifest xml file +1. Select a group you want to import to (you need to create a group first if you don't have one) +1. Click **List available repositories** +1. You will be redirected to the import status page with projects list based on manifest file +1. Check the list and click 'Import all repositories' to start import. + +![Manifest upload](img/manifest_upload.png) + +![Manifest status](img/manifest_status.png) + +### Manifest format + +A manifest must be an XML file. There must be one `remote` tag with `review` attribute +that contains a URL to a git server. Each `project` tag must have `name` and `path` attribute. +GitLab will build URL to the repository by combining URL from `remote` tag with a project name. +A path attribute will be used to represent project path in GitLab system. + +Below is a valid example of manifest file. + +```xml +<manifest> + <remote review="https://android-review.googlesource.com/" /> + + <project path="build/make" name="platform/build" /> + <project path="build/blueprint" name="platform/build/blueprint" /> +</manifest> +``` + +As result next projects will be created: + +| GitLab | Import URL | +|---|---| +| https://gitlab/YOUR_GROUP/build/make | https://android-review.googlesource.com/platform/build | +| https://gitlab/YOUR_GROUP/build/blueprint | https://android-review.googlesource.com/platform/build/blueprint | diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index e97b5d05529..860edb8e6f7 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -364,12 +364,12 @@ When dragging issues between lists, different behavior occurs depending on the s Different issue board features are available in different [GitLab tiers](https://about.gitlab.com/pricing/), as shown in the following table: -| Tier | Number of Project Issue Boards | Number of Group Issue Boards | Configurable Project Issue Boards | Configurable Group Issue Boards | Assignee Lists +| Tier | Number of Project Issue Boards | Number of Group Issue Boards | Configurable Issue Boards | Assignee Lists | --- | --- | --- | --- | --- | --- | -| Core | 1 | 1 | No | No | No | -| Starter | Multiple | 1 | Yes | No | No | -| Premium | Multiple | Multiple | Yes | Yes | Yes | -| Ultimate | Multiple | Multiple | Yes | Yes | Yes | +| Core | 1 | 1 | No | No | +| Starter | Multiple | 1 | Yes | No | +| Premium | Multiple | Multiple | Yes | Yes | +| Ultimate | Multiple | Multiple | Yes | Yes | ## Tips diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index 483a54051d7..86ecf33ed31 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -35,7 +35,7 @@ With **[GitLab Enterprise Edition][ee]**, you can also: - View the deployment process across projects with [Multi-Project Pipeline Graphs](https://docs.gitlab.com/ee/ci/multi_project_pipeline_graphs.html#multi-project-pipeline-graphs) **[PREMIUM]** - Request [approvals](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html) from your managers **[STARTER]** -- Analyze the impact of your changes with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) **[STARTER]** +- Analyze the impact of your changes with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html) **[STARTER]** ## Use cases @@ -43,7 +43,7 @@ A. Consider you are a software developer working in a team: 1. You checkout a new branch, and submit your changes through a merge request 1. You gather feedback from your team -1. You work on the implementation optimizing code with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality_diff.html) **[STARTER]** +1. You work on the implementation optimizing code with [Code Quality reports](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html) **[STARTER]** 1. You build and test your changes with GitLab CI/CD 1. You request the approval from your manager 1. Your manager pushes a commit with his final review, [approves the merge request](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html), and set it to [merge when pipeline succeeds](#merge-when-pipeline-succeeds) (Merge Request Approvals are available in GitLab Starter) diff --git a/doc/workflow/todos.md b/doc/workflow/todos.md index dda82352c67..760cd87d4cc 100644 --- a/doc/workflow/todos.md +++ b/doc/workflow/todos.md @@ -109,7 +109,6 @@ There are four kinds of filters you can use on your Todos dashboard. | Filter | Description | | ------- | ----------- | | Project | Filter by project | -| Group | Filter by group | | Author | Filter by the author that triggered the Todo | | Type | Filter by issue or merge request | | Action | Filter by the action that triggered the Todo | |