From 9a5f40878c6d71e7fd4858f7fa1d948af6c371ae Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 3 Aug 2016 11:32:29 +0300 Subject: Add API to list merge request diff versions Signed-off-by: Dmitriy Zaporozhets --- doc/api/merge_requests.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index e00882e6d5d..cf262dc4a80 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -894,3 +894,93 @@ Example response: "created_at": "2016-07-01T11:14:15.530Z" } ``` + +## Get MR diff versions + +Get a list of merge request diff versions. + +``` +GET /projects/:id/merge_requests/:merge_request_id/versions +``` + +Parameters: + +- `id` (required) - The ID of a project +- `merge_request_id` (required) - The ID of MR + + +```json +[{ + "id": 110, + "head_commit_sha": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30", + "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", + "start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", + "created_at": "2016-07-26T14:44:48.926Z", + "merge_request_id": 105, + "state": "collected", + "real_size": "1", + "commits": [{ + "id": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30", + "short_id": "33e2ee85", + "title": "Change year to 2018", + "author_name": "Administrator", + "author_email": "admin@example.com", + "created_at": "2016-07-26T17:44:29.000+03:00", + "message": "Change year to 2018" + }, { + "id": "aa24655de48b36335556ac8a3cd8bb521f977cbd", + "short_id": "aa24655d", + "title": "Update LICENSE", + "author_name": "Administrator", + "author_email": "admin@example.com", + "created_at": "2016-07-25T17:21:53.000+03:00", + "message": "Update LICENSE" + }, { + "id": "3eed087b29835c48015768f839d76e5ea8f07a24", + "short_id": "3eed087b", + "title": "Add license", + "author_name": "Administrator", + "author_email": "admin@example.com", + "created_at": "2016-07-25T17:21:20.000+03:00", + "message": "Add license" + }], + "diffs": [{ + "old_path": "LICENSE", + "new_path": "LICENSE", + "a_mode": "0", + "b_mode": "100644", + "diff": "--- /dev/null\n+++ b/LICENSE\n@@ -0,0 +1,21 @@\n+The MIT License (MIT)\n+\n+Copyright (c) 2018 Administrator\n+\n+Permission is hereby granted, free of charge, to any person obtaining a copy\n+of this software and associated documentation files (the \"Software\"), to deal\n+in the Software without restriction, including without limitation the rights\n+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+copies of the Software, and to permit persons to whom the Software is\n+furnished to do so, subject to the following conditions:\n+\n+The above copyright notice and this permission notice shall be included in all\n+copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+SOFTWARE.\n", + "new_file": true, + "renamed_file": false, + "deleted_file": false + }] +}, { + "id": 108, + "head_commit_sha": "3eed087b29835c48015768f839d76e5ea8f07a24", + "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", + "start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", + "created_at": "2016-07-25T14:21:33.028Z", + "merge_request_id": 105, + "state": "collected", + "real_size": "1", + "commits": [{ + "id": "3eed087b29835c48015768f839d76e5ea8f07a24", + "short_id": "3eed087b", + "title": "Add license", + "author_name": "Administrator", + "author_email": "admin@example.com", + "created_at": "2016-07-25T17:21:20.000+03:00", + "message": "Add license" + }], + "diffs": [{ + "old_path": "LICENSE", + "new_path": "LICENSE", + "a_mode": "0", + "b_mode": "100644", + "diff": "--- /dev/null\n+++ b/LICENSE\n@@ -0,0 +1,21 @@\n+The MIT License (MIT)\n+\n+Copyright (c) 2016 Administrator\n+\n+Permission is hereby granted, free of charge, to any person obtaining a copy\n+of this software and associated documentation files (the \"Software\"), to deal\n+in the Software without restriction, including without limitation the rights\n+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+copies of the Software, and to permit persons to whom the Software is\n+furnished to do so, subject to the following conditions:\n+\n+The above copyright notice and this permission notice shall be included in all\n+copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+SOFTWARE.\n", + "new_file": true, + "renamed_file": false, + "deleted_file": false + }] +}] +``` -- cgit v1.2.1 From 69096ad9da77ce51d544a8f23f4e8873df273f4e Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 3 Aug 2016 11:58:09 +0300 Subject: Update merge request versions API to match styleguide Signed-off-by: Dmitriy Zaporozhets --- doc/api/merge_requests.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index cf262dc4a80..68b5172ed0d 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -903,11 +903,16 @@ Get a list of merge request diff versions. GET /projects/:id/merge_requests/:merge_request_id/versions ``` -Parameters: +| Attribute | Type | Required | Description | +| --------- | ------- | -------- | --------------------- | +| `id` | integer | yes | The ID of the project | +| `merge_request_id` | integer | yes | The ID of the merge request | -- `id` (required) - The ID of a project -- `merge_request_id` (required) - The ID of MR +```bash +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions +``` +Example response: ```json [{ -- cgit v1.2.1 From 08f5f897889dc7e7f00a65f56e988449350e60f2 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 3 Aug 2016 12:35:20 +0300 Subject: Fix project id param for merge request version API Signed-off-by: Dmitriy Zaporozhets --- doc/api/merge_requests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 68b5172ed0d..0c06cfcd876 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -905,7 +905,7 @@ GET /projects/:id/merge_requests/:merge_request_id/versions | Attribute | Type | Required | Description | | --------- | ------- | -------- | --------------------- | -| `id` | integer | yes | The ID of the project | +| `id` | String | yes | The ID of the project | | `merge_request_id` | integer | yes | The ID of the merge request | ```bash -- cgit v1.2.1 From ac072132b8f0e36badf297208a5964109dbed126 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 12 Aug 2016 14:44:49 +0300 Subject: Add single merge request diff API endpoint Signed-off-by: Dmitriy Zaporozhets --- doc/api/merge_requests.md | 72 ++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 29 deletions(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 0c06cfcd876..130488bf7c1 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -916,6 +916,48 @@ Example response: ```json [{ + "id": 110, + "head_commit_sha": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30", + "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", + "start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", + "created_at": "2016-07-26T14:44:48.926Z", + "merge_request_id": 105, + "state": "collected", + "real_size": "1" +}, { + "id": 108, + "head_commit_sha": "3eed087b29835c48015768f839d76e5ea8f07a24", + "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", + "start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", + "created_at": "2016-07-25T14:21:33.028Z", + "merge_request_id": 105, + "state": "collected", + "real_size": "1" +}] +``` + +## Get a single MR diff version + +Get a single merge request diff version. + +``` +GET /projects/:id/merge_requests/:merge_request_id/versions/:version_id +``` + +| Attribute | Type | Required | Description | +| --------- | ------- | -------- | --------------------- | +| `id` | String | yes | The ID of the project | +| `merge_request_id` | integer | yes | The ID of the merge request | +| `version_id` | integer | yes | The ID of the merge request diff version | + +```bash +curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions/1 +``` + +Example response: + +```json +{ "id": 110, "head_commit_sha": "33e2ee8579fda5bc36accc9c6fbd0b4fefda9e30", "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", @@ -959,33 +1001,5 @@ Example response: "renamed_file": false, "deleted_file": false }] -}, { - "id": 108, - "head_commit_sha": "3eed087b29835c48015768f839d76e5ea8f07a24", - "base_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", - "start_commit_sha": "eeb57dffe83deb686a60a71c16c32f71046868fd", - "created_at": "2016-07-25T14:21:33.028Z", - "merge_request_id": 105, - "state": "collected", - "real_size": "1", - "commits": [{ - "id": "3eed087b29835c48015768f839d76e5ea8f07a24", - "short_id": "3eed087b", - "title": "Add license", - "author_name": "Administrator", - "author_email": "admin@example.com", - "created_at": "2016-07-25T17:21:20.000+03:00", - "message": "Add license" - }], - "diffs": [{ - "old_path": "LICENSE", - "new_path": "LICENSE", - "a_mode": "0", - "b_mode": "100644", - "diff": "--- /dev/null\n+++ b/LICENSE\n@@ -0,0 +1,21 @@\n+The MIT License (MIT)\n+\n+Copyright (c) 2016 Administrator\n+\n+Permission is hereby granted, free of charge, to any person obtaining a copy\n+of this software and associated documentation files (the \"Software\"), to deal\n+in the Software without restriction, including without limitation the rights\n+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+copies of the Software, and to permit persons to whom the Software is\n+furnished to do so, subject to the following conditions:\n+\n+The above copyright notice and this permission notice shall be included in all\n+copies or substantial portions of the Software.\n+\n+THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+SOFTWARE.\n", - "new_file": true, - "renamed_file": false, - "deleted_file": false - }] -}] +} ``` -- cgit v1.2.1 From a8fe213ebbb4a1aa48a20c908ba989190d20f2a1 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 12 Aug 2016 15:40:00 +0300 Subject: Add documentation for merge request versions Signed-off-by: Dmitriy Zaporozhets --- doc/workflow/merge_requests.md | 8 ++++++++ doc/workflow/merge_requests/versions.png | Bin 0 -> 100566 bytes 2 files changed, 8 insertions(+) create mode 100644 doc/workflow/merge_requests/versions.png (limited to 'doc') diff --git a/doc/workflow/merge_requests.md b/doc/workflow/merge_requests.md index d2ec56e6504..a81b1080ca6 100644 --- a/doc/workflow/merge_requests.md +++ b/doc/workflow/merge_requests.md @@ -61,3 +61,11 @@ If you click the "Hide whitespace changes" button, you can see the diff without It is also working on commits compare view. ![Commit Compare](merge_requests/commit_compare.png) + +## Merge Requests versions + +Every time you push to merge request branch, a new version of merge request diff +is created. When you visit the merge request page you see latest version of changes. +However you can select an older one from version dropdown + +![Merge Request Versions](merge_requests/versions.png) diff --git a/doc/workflow/merge_requests/versions.png b/doc/workflow/merge_requests/versions.png new file mode 100644 index 00000000000..c0a6dfe6806 Binary files /dev/null and b/doc/workflow/merge_requests/versions.png differ -- cgit v1.2.1 From 74461ccc1f1503c86102b7d8e790ebac0d28fc0b Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 19 Aug 2016 12:35:40 +0300 Subject: Fix merge request versions api doc Signed-off-by: Dmitriy Zaporozhets --- doc/api/merge_requests.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 66957647d00..1cf4940198f 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -909,7 +909,7 @@ GET /projects/:id/merge_requests/:merge_request_id/versions | `merge_request_id` | integer | yes | The ID of the merge request | ```bash -curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions ``` Example response: @@ -951,7 +951,7 @@ GET /projects/:id/merge_requests/:merge_request_id/versions/:version_id | `version_id` | integer | yes | The ID of the merge request diff version | ```bash -curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions/1 +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/1/merge_requests/1/versions/1 ``` Example response: -- cgit v1.2.1 From 2bd0ed4a5cb70884f1a31a54fc67c4bc86fa3340 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 19 Aug 2016 12:25:52 +0200 Subject: Fix typo in gitlab-workhorse header --- doc/install/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index eb9606934cd..b0ec9b4a961 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -397,7 +397,7 @@ If you are not using Linux you may have to run `gmake` instead of cd /home/git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git cd gitlab-workhorse - sudo -u git -H git checkout v0.7.8 + sudo -u git -H git checkout v0.7.10 sudo -u git -H make ### Initialize Database and Activate Advanced Features -- cgit v1.2.1 From a927a9bf6baa99be94181c3ab980947621ae2fe0 Mon Sep 17 00:00:00 2001 From: Gokmen Goksel Date: Mon, 25 Jul 2016 20:59:39 -0700 Subject: Support integration with Koding (online IDE) Koding: #index: landing page for Koding integration If enabled it will provide a link to open remote Koding instance url for now we are also providing the sneak preview video for how integration works in detail. Repository: check whether .koding.yml file exists on repository Projects: landing page: show Run in IDE (Koding) button if repo has stack file Projects: MR: show Run in IDE Koding button if repo has stack file on active branch ProjectHelpers: add_koding_stack: stack generator for provided project With this helper we will auto-generate the required stack template for a given project. For the feature we can request this base template from the running Koding instance on integration. Currently this will provide users to create a t2.nano instance on aws and it'll automatically configures the instance for basic requirements. Projects: empty state and landing page provide shortcuts to create stack projects_helper: use branch on checkout and provide an entry point This ${var.koding_queryString_branch} will be replaced with the branch provided in query string which will allow us to use same stack template for different branches of the same repository. ref: https://github.com/koding/koding/pull/8597/commits/b8c0e43c4c24bf132670aa8a3cfb0d634acfd09b projects_helper: provide sha info in query string to use existing vms With this change we'll be able to query existing vms on Koding side based on the commit id that they've created. ref: https://github.com/koding/koding/pull/8597/commits/1d630fadf31963fa6ccd3bed92e526761a30a343 Integration: Docs: Koding documentation added Disable /koding route if integration is disabled Use application settings to enable Koding Projects_helper: better indentation with strip_heredoc usage Projects_helper: return koding_url as is if there is no project provided current_settings: set koding_enabled: false by default Koding_Controller: to render not_found once integration is disabled Dashboard_specs: update spec for Koding enabled case Projects_Helper: make repo dynamic ref: https://github.com/koding/koding/pull/8597/commits/4d615242f45aaea4c4986be84ecc612b0bb1514c Updated documentation to have right format --- doc/integration/README.md | 1 + doc/integration/img/koding_build-in-progress.png | Bin 0 -> 70949 bytes doc/integration/img/koding_build-logs.png | Bin 0 -> 263623 bytes doc/integration/img/koding_build-success.png | Bin 0 -> 304666 bytes doc/integration/img/koding_commit-koding.yml.png | Bin 0 -> 302703 bytes .../img/koding_different-stack-on-mr-try.png | Bin 0 -> 333649 bytes doc/integration/img/koding_edit-on-ide.png | Bin 0 -> 330880 bytes doc/integration/img/koding_enable-koding.png | Bin 0 -> 73499 bytes doc/integration/img/koding_landing.png | Bin 0 -> 268455 bytes .../img/koding_open-gitlab-from-koding.png | Bin 0 -> 32559 bytes doc/integration/img/koding_run-in-ide.png | Bin 0 -> 65465 bytes doc/integration/img/koding_run-mr-in-ide.png | Bin 0 -> 339759 bytes doc/integration/img/koding_set-up-ide.png | Bin 0 -> 207481 bytes doc/integration/img/koding_stack-import.png | Bin 0 -> 500352 bytes doc/integration/img/koding_start-build.png | Bin 0 -> 105253 bytes doc/integration/koding-usage.md | 122 +++++++++++ doc/integration/koding.md | 239 +++++++++++++++++++++ 17 files changed, 362 insertions(+) create mode 100644 doc/integration/img/koding_build-in-progress.png create mode 100644 doc/integration/img/koding_build-logs.png create mode 100644 doc/integration/img/koding_build-success.png create mode 100644 doc/integration/img/koding_commit-koding.yml.png create mode 100644 doc/integration/img/koding_different-stack-on-mr-try.png create mode 100644 doc/integration/img/koding_edit-on-ide.png create mode 100644 doc/integration/img/koding_enable-koding.png create mode 100644 doc/integration/img/koding_landing.png create mode 100644 doc/integration/img/koding_open-gitlab-from-koding.png create mode 100644 doc/integration/img/koding_run-in-ide.png create mode 100644 doc/integration/img/koding_run-mr-in-ide.png create mode 100644 doc/integration/img/koding_set-up-ide.png create mode 100644 doc/integration/img/koding_stack-import.png create mode 100644 doc/integration/img/koding_start-build.png create mode 100644 doc/integration/koding-usage.md create mode 100644 doc/integration/koding.md (limited to 'doc') diff --git a/doc/integration/README.md b/doc/integration/README.md index ddbd570ac6c..70895abbcad 100644 --- a/doc/integration/README.md +++ b/doc/integration/README.md @@ -15,6 +15,7 @@ See the documentation below for details on how to configure these services. - [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages - [reCAPTCHA](recaptcha.md) Configure GitLab to use Google reCAPTCHA for new users - [Akismet](akismet.md) Configure Akismet to stop spam +- [Koding](koding.md) Configure Koding to use IDE integration GitLab Enterprise Edition contains [advanced Jenkins support][jenkins]. diff --git a/doc/integration/img/koding_build-in-progress.png b/doc/integration/img/koding_build-in-progress.png new file mode 100644 index 00000000000..f8cc81834c4 Binary files /dev/null and b/doc/integration/img/koding_build-in-progress.png differ diff --git a/doc/integration/img/koding_build-logs.png b/doc/integration/img/koding_build-logs.png new file mode 100644 index 00000000000..a04cd5aff99 Binary files /dev/null and b/doc/integration/img/koding_build-logs.png differ diff --git a/doc/integration/img/koding_build-success.png b/doc/integration/img/koding_build-success.png new file mode 100644 index 00000000000..2a0dd296480 Binary files /dev/null and b/doc/integration/img/koding_build-success.png differ diff --git a/doc/integration/img/koding_commit-koding.yml.png b/doc/integration/img/koding_commit-koding.yml.png new file mode 100644 index 00000000000..3e133c50327 Binary files /dev/null and b/doc/integration/img/koding_commit-koding.yml.png differ diff --git a/doc/integration/img/koding_different-stack-on-mr-try.png b/doc/integration/img/koding_different-stack-on-mr-try.png new file mode 100644 index 00000000000..fd25e32f648 Binary files /dev/null and b/doc/integration/img/koding_different-stack-on-mr-try.png differ diff --git a/doc/integration/img/koding_edit-on-ide.png b/doc/integration/img/koding_edit-on-ide.png new file mode 100644 index 00000000000..fd5aaff75f5 Binary files /dev/null and b/doc/integration/img/koding_edit-on-ide.png differ diff --git a/doc/integration/img/koding_enable-koding.png b/doc/integration/img/koding_enable-koding.png new file mode 100644 index 00000000000..c0ae0ee9918 Binary files /dev/null and b/doc/integration/img/koding_enable-koding.png differ diff --git a/doc/integration/img/koding_landing.png b/doc/integration/img/koding_landing.png new file mode 100644 index 00000000000..7c629d9b05e Binary files /dev/null and b/doc/integration/img/koding_landing.png differ diff --git a/doc/integration/img/koding_open-gitlab-from-koding.png b/doc/integration/img/koding_open-gitlab-from-koding.png new file mode 100644 index 00000000000..c958cf8f224 Binary files /dev/null and b/doc/integration/img/koding_open-gitlab-from-koding.png differ diff --git a/doc/integration/img/koding_run-in-ide.png b/doc/integration/img/koding_run-in-ide.png new file mode 100644 index 00000000000..f91ee0f74cc Binary files /dev/null and b/doc/integration/img/koding_run-in-ide.png differ diff --git a/doc/integration/img/koding_run-mr-in-ide.png b/doc/integration/img/koding_run-mr-in-ide.png new file mode 100644 index 00000000000..502817a2a46 Binary files /dev/null and b/doc/integration/img/koding_run-mr-in-ide.png differ diff --git a/doc/integration/img/koding_set-up-ide.png b/doc/integration/img/koding_set-up-ide.png new file mode 100644 index 00000000000..7f408c980b5 Binary files /dev/null and b/doc/integration/img/koding_set-up-ide.png differ diff --git a/doc/integration/img/koding_stack-import.png b/doc/integration/img/koding_stack-import.png new file mode 100644 index 00000000000..2a4e3c87fc8 Binary files /dev/null and b/doc/integration/img/koding_stack-import.png differ diff --git a/doc/integration/img/koding_start-build.png b/doc/integration/img/koding_start-build.png new file mode 100644 index 00000000000..52159440f62 Binary files /dev/null and b/doc/integration/img/koding_start-build.png differ diff --git a/doc/integration/koding-usage.md b/doc/integration/koding-usage.md new file mode 100644 index 00000000000..bb74badce66 --- /dev/null +++ b/doc/integration/koding-usage.md @@ -0,0 +1,122 @@ +# Koding & GitLab + +This document will guide you through using Koding integration on GitLab in +detail. For configuring and installing please follow [this](koding.md) guide. + +You can use Koding integration to run and develop your projects on GitLab. This +will allow you and the users to test your project without leaving the browser. +Koding handles projects as stacks which are basic recipes to define your +environment for your project. With this integration you can automatically +create a proper stack template for your projects. Currently auto-generated +stack templates are designed to work with AWS which requires a valid AWS +credential to be able to use these stacks. You can find more information about +stacks and the other providers that you can use on Koding from +[here](https://www.koding.com/docs). + + +# Enable Integration + +You can enable Koding integration by providing the running Koding instance URL +in Application Settings; + + - Open **Admin area > Settings** (`/admin/application_settings`). + +![Enable Koding](help/integration/img/koding_enable-koding.png) + +Once enabled you will see `Koding` link on your sidebar which leads you to +Koding Landing page + +![Koding Landing](help/integration/img/koding_landing.png) + +You can navigate to running Koding instance from here. For more information and +details about configuring integration please follow [this](koding.md) guide. + + +# Set up Koding on Projects + +Once it's enabled, you will see some integration buttons on Project pages, +Merge Requests etc. To get started working on a specific project you first need +to create a `.koding.yml` file under your project root. You can easily do that +by using `Set Up Koding` button which will be visible on every project's +landing page; + +![Set Up Koding](help/integration/img/koding_set-up-ide.png) + +Once you click this will open a New File page on GitLab with auto-generated +`.koding.yml` content based on your server and repository configuration. + +![Commit .koding.yml](help/integration/img/koding_commit-koding.yml.png) + + +# Run a project on Koding + +If there is `.koding.yml` exists in your project root, you will see +`Run in IDE (Koding)` button in your project landing page. You can initiate the +process from here. + +![Run on Koding](help/integration/img/koding_run-in-ide.png) + +This will open Koding defined in the settings in a new window and will start +importing the project's stack file; + +![Import Stack](help/integration/img/koding_stack-import.png) + +You should see the details of your repository imported into your Koding +instance. Once it's completed it will lead you to the Stack Editor and from +there you can start using your new stack integrated with your project on your +GitLab instance. For details about what's next you can follow +[this](https://www.koding.com/docs/creating-an-aws-stack) guide from 8. step. + +Once stack initialized you will see the `README.md` content from your project +in `Stack Build` wizard, this wizard will let you to build the stack and import +your project into it. **Once it's completed it will automatically open the +related vm instead of importing from scratch** + +![Stack Building](help/integration/img/koding_start-build.png) + +This will take time depending on the required environment. + +![Stack Building in Progress](help/integration/img/koding_build-in-progress.png) + +It usually takes ~4 min. to make it ready with a `t2.nano` instance on given +AWS region. (`t2.nano` is default vm type on auto-generated stack template +which can be manually changed) + +![Stack Building Success](help/integration/img/koding_build-success.png) + +You can check out the `Build Logs` from this success modal as well; + +![Stack Build Logs](help/integration/img/koding_build-logs.png) + +You can now `Start Coding`! + +![Edit On IDE](help/integration/img/koding_edit-on-ide.png) + + +# Try a Merge Request on IDE + +It's also possible to try a change on IDE before merging it. This flow only +enabled if the target project has `.koding.yml` in it's target branch. You +should see the alternative version of `Run in IDE (Koding)` button in merge +request pages as well; + +![Run in IDE on MR](help/integration/img/koding_run-mr-in-ide.png) + +This will again take you to Koding with proper arguments passed, which will +allow Koding to modify the stack template provided by target branch. You can +see the difference; + +![Different Branch for MR](help/integration/img/koding_different-stack-on-mr-try.png) + +The flow for the branch stack is also same with the regular project flow. + + +# Open GitLab from Koding + +Since stacks generated with import flow defined in previous steps, they have +information about the repository they are belonging to. By using this +information you can access to related GitLab page from stacks on your sidebar +on Koding. + +![Open GitLab from Koding](help/integration/img/koding_open-gitlab-from-koding.png) + diff --git a/doc/integration/koding.md b/doc/integration/koding.md new file mode 100644 index 00000000000..53450b6d048 --- /dev/null +++ b/doc/integration/koding.md @@ -0,0 +1,239 @@ +# Koding & GitLab + +This document will guide you through installing and configuring Koding with +GitLab. + +First of all, to be able to use Koding and GitLab together you will need public +access to your server. This allows you to use single sign-on from GitLab to +Koding and using vms from cloud providers like AWS. Koding has a registry for +VMs, called Kontrol and it runs on the same server as Koding itself, VMs from +cloud providers register themselves to Kontrol via the agent that we put into +provisioned VMs. This agent is called Klient and it provides Koding to access +and manage the target machine. + +Kontrol and Klient are based on another technology called +[Kite](github.com/koding/kite), that we have written at Koding. Which is a +microservice framework that allows you to develop microservices easily. + + +## Requirements + +### Hardware + +Minimum requirements are; + + - 2 cores CPU + - 3G RAM + - 10G Storage + +If you plan to use AWS to install Koding it is recommended that you use at +least a `c3.xlarge` instance. + +### Software + + - [git](https://git-scm.com) + - [docker](https://www.docker.com) + - [docker-compose](https://www.docker.com/products/docker-compose) + +Koding can run on most of the UNIX based operating systems, since it's shipped +as containerized with Docker support, it can work on any operating system that +supports Docker. + +Required services are; + + - PostgreSQL # Kontrol and Service DB provider + - MongoDB # Main DB provider the application + - Redis # In memory DB used by both application and services + - RabbitMQ # Message Queue for both application and services + +which are also provided as a Docker container by Koding. + + +## Getting Started with Development Versions + + +### Koding + +You can run `docker-compose` environment for developing koding by +executing commands in the following snippet. + +```bash +git clone https://github.com/koding/koding.git +cd koding +docker-compose up +``` + +This should start koding on `localhost:8090`. + +By default there is no team exists in Koding DB. You'll need to create a team +called `gitlab` which is the default team name for GitLab integration in the +configuration. To make things in order it's recommended to create the `gitlab` +team first thing after setting up Koding. + + +### GitLab + +To install GitLab to your environment for development purposes it's recommended +to use GitLab Development Kit which you can get it from +[here](https://gitlab.com/gitlab-org/gitlab-development-kit). + +After all those steps, gitlab should be running on `localhost:3000` + + +## Integration + +Integration includes following components; + + - Single Sign On with OAuth from GitLab to Koding + - System Hook integration for handling GitLab events on Koding + (`project_created`, `user_joined` etc.) + - Service endpoints for importing/executing stacks from GitLab to Koding + (`Run/Try on IDE (Koding)` buttons on GitLab Projects, Issues, MRs) + +As it's pointed out before, you will need public access to this machine that +you've installed Koding and GitLab on. Better to use a domain but a static IP +is also fine. + +For IP based installation you can use [xip.io](https://xip.io) service which is +free and provides DNS resolution to IP based requests like following; + + - 127.0.0.1.xip.io -> resolves to 127.0.0.1 + - foo.bar.baz.127.0.0.1.xip.io -> resolves to 127.0.0.1 + - and so on... + +As Koding needs subdomains for team names; `foo.127.0.0.1.xip.io` requests for +a running koding instance on `127.0.0.1` server will be handled as `foo` team +requests. + + +### GitLab Side + +You need to enable Koding integration from Settings under Admin Area. To do +that login with an Admin account and do followings; + + - open [http://127.0.0.1:3000/admin/application_settings](http://127.0.0.1:3000/admin/application_settings) + - scroll to bottom of the page until Koding section + - check `Enable Koding` checkbox + - provide GitLab team page for running Koding instance as `Koding URL`* + +* For `Koding URL` you need to provide the gitlab integration enabled team on +your Koding installation. Team called `gitlab` has integration on Koding out +of the box, so if you didn't change anything your team on Koding should be +`gitlab`. + +So, if your Koding is running on `http://1.2.3.4.xip.io:8090` your URL needs +to be `http://gitlab.1.2.3.4.xip.io:8090`. You need to provide the same host +with your Koding installation here. + + +#### Registering Koding for OAuth integration + +We need `Application ID` and `Secret` to enable login to Koding via GitLab +feature and to do that you need to register running Koding as a new application +to your running GitLab application. Follow +[these](http://docs.gitlab.com/ce/integration/oauth_provider.html) steps to +enable this integration. + +Redirect URI should be `http://gitlab.127.0.0.1:8090/-/oauth/gitlab/callback` +which again you need to _replace `127.0.0.1` with your instance public IP._ + +Take a copy of `Application ID` and `Secret` that is generated by the GitLab +application, we will need those on _Koding Part_ of this guide. + + +#### Registering system hooks to Koding (optional) + +Koding can take actions based on the events generated by GitLab application. +This feature is still in progress and only following events are processed by +Koding at the moment; + + - user_create + - user_destroy + +All system events are handled but not implemented on Koding side. + +To enable this feature you need to provide a `URL` and a `Secret Token` to your +GitLab application. Open your admin area on your GitLab app from +[http://127.0.0.1:3000/admin/hooks](http://127.0.0.1:3000/admin/hooks) +and provide `URL` as `http://gitlab.127.0.0.1:8090/-/api/gitlab` which is the +endpoint to handle GitLab events on Koding side. Provide a `Secret Token` and +keep a copy of it, we will need it on _Koding Part_ of this guide. + +_(replace `127.0.0.1` with your instance public IP)_ + + +### Koding Part + +If you followed the steps in GitLab part we should have followings to enable +Koding part integrations; + + - `Application ID` and `Secret` for OAuth integration + - `Secret Token` for system hook integration + - Public address of running GitLab instance + + +#### Start Koding with GitLab URL + +Now we need to configure Koding with all this information to get things ready. +If it's already running please stop koding first. + +##### From command-line + +Replace followings with the ones you got from GitLab part of this guide; + +```bash +cd koding +docker-compose run \ + --service-ports backend \ + /opt/koding/scripts/bootstrap-container build \ + --host=**YOUR_IP**.xip.io \ + --gitlabHost=**GITLAB_IP** \ + --gitlabPort=**GITLAB_PORT** \ + --gitlabToken=**SECRET_TOKEN** \ + --gitlabAppId=**APPLICATION_ID** \ + --gitlabAppSecret=**SECRET** +``` + +##### By updating configuration + +Alternatively you can update `gitlab` section on +`config/credentials.default.coffee` like following; + +``` +gitlab = + host: '**GITLAB_IP**' + port: '**GITLAB_PORT**' + applicationId: '**APPLICATION_ID**' + applicationSecret: '**SECRET**' + team: 'gitlab' + redirectUri: '' + systemHookToken: '**SECRET_TOKEN**' + hooksEnabled: yes +``` + +and start by only providing the `host`; + +```bash +cd koding +docker-compose run \ + --service-ports backend \ + /opt/koding/scripts/bootstrap-container build \ + --host=**YOUR_IP**.xip.io \ +``` + +#### Enable Single Sign On + +Once you restarted your Koding and logged in with your username and password +you need to activate oauth authentication for your user. To do that + + - Navigate to Dashboard on Koding from; + `http://gitlab.**YOUR_IP**.xip.io:8090/Home/my-account` + - Scroll down to Integrations section + - Click on toggle to turn On integration in GitLab integration section + +This will redirect you to your GitLab instance and will ask your permission ( +if you are not logged in to GitLab at this point you will be redirected after +login) once you accept you will be redirected to your Koding instance. + +From now on you can login by using `SIGN IN WITH GITLAB` button on your Login +screen in your Koding instance. -- cgit v1.2.1 From 65c25993b08c465e92d0ea24c28d59f06239d63d Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Sat, 20 Aug 2016 10:57:10 +0200 Subject: Update gitlab-shell to v3.4.0 --- doc/update/8.10-to-8.11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index 84c624cbcb7..253fff50bdd 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -46,7 +46,7 @@ sudo -u git -H git checkout 8-11-stable-ee ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch --all --tags -sudo -u git -H git checkout v3.3.3 +sudo -u git -H git checkout v3.4.0 ``` ### 5. Update gitlab-workhorse -- cgit v1.2.1 From f83c5d243459c06fc80a4bf0e287ed59f83e009c Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sun, 21 Aug 2016 10:59:19 +0300 Subject: Document the new behavior of protected branches --- .../img/protected_branches_devs_can_push.png | Bin 23976 -> 19312 bytes doc/user/project/img/protected_branches_list.png | Bin 16817 -> 16223 bytes doc/user/project/img/protected_branches_page.png | Bin 0 -> 17839 bytes doc/user/project/protected_branches.md | 78 ++++++++++++--------- 4 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 doc/user/project/img/protected_branches_page.png (limited to 'doc') diff --git a/doc/user/project/img/protected_branches_devs_can_push.png b/doc/user/project/img/protected_branches_devs_can_push.png index 9c33db36586..812cc8767b7 100644 Binary files a/doc/user/project/img/protected_branches_devs_can_push.png and b/doc/user/project/img/protected_branches_devs_can_push.png differ diff --git a/doc/user/project/img/protected_branches_list.png b/doc/user/project/img/protected_branches_list.png index 9f070f7a208..f33f1b2bdb6 100644 Binary files a/doc/user/project/img/protected_branches_list.png and b/doc/user/project/img/protected_branches_list.png differ diff --git a/doc/user/project/img/protected_branches_page.png b/doc/user/project/img/protected_branches_page.png new file mode 100644 index 00000000000..1585dde5b29 Binary files /dev/null and b/doc/user/project/img/protected_branches_page.png differ diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md index 96d9bdc1b29..330e0040998 100644 --- a/doc/user/project/protected_branches.md +++ b/doc/user/project/protected_branches.md @@ -5,6 +5,8 @@ idea of having read or write permission to the repository and branches. To prevent people from messing with history or pushing code without review, we've created protected branches. +## Overview + By default, a protected branch does four simple things: - it prevents its creation, if not already created, from everybody except users @@ -15,6 +17,11 @@ By default, a protected branch does four simple things: See the [Changelog](#changelog) section for changes over time. +> +>Added benefits for GitLab Enterprise Edition: +> +>- Restrict push and merge access to [certain users][ee-restrict] + ## Configuring protected branches To protect a branch, you need to have at least Master permission level. Note @@ -28,26 +35,45 @@ that the `master` branch is protected by default. 1. From the **Branch** dropdown menu, select the branch you want to protect and click **Protect**. In the screenshot below, we chose the `develop` branch. - ![Choose protected branch](img/protected_branches_choose_branch.png) + ![Protected branches page](img/protected_branches_page.png) -1. Once done, the protected branch will appear in the "Already protected" list. +1. Once done, the protected branch will appear in the "Protected branches" list. ![Protected branches list](img/protected_branches_list.png) +## Using the Allowed to merge and Allowed to push settings + +> This feature was [introduced][ce-5081] in GitLab 8.11. + +Since GitLab 8.11, we added another layer of branch protection which provides +more granular management of protected branches. The "Developers can push" +option was replaced by an "Allowed to push" setting which can be set to +allow/prohibit Masters and/or Developers to push to a protected branch. + +Using the "Allowed to push" and "Allowed to merge" settings, you can control +the actions that different roles can perform with the protected branch. +For example, you could set "Allowed to push" to "No one", and "Allowed to merge" +to "Developers + Masters", to require _everyone_ to submit a merge request for +changes going into the protected branch. This is compatible with workflows like +the [GitLab workflow](../../workflow/gitlab_flow.md). + +However, there are workflows where that is not needed, and only protecting from +force pushes and branch removal is useful. For those workflows, you can allow +everyone with write access to push to a protected branch by setting +"Allowed to push" to "Developers + Masters". + +You can set the "Allowed to push" and "Allowed to merge" options while creating +a protected branch or afterwards by selecting the option you want from the +dropdown list in the "Already protected" area. -Since GitLab 8.10, we added another layer of branch protection which provides -more granular management of protected branches. You can now choose the option -"Developers can merge" so that Developer users can merge a merge request but -not directly push. In that case, your branches are protected from direct pushes, -yet Developers don't need elevated permissions or wait for someone with a higher -permission level to press merge. +![Developers can push](img/protected_branches_devs_can_push.png) -You can set this option while creating the protected branch or after its -creation. +If you don't choose any of those options while creating a protected branch, +they are set to "Masters" by default. ## Wildcard protected branches -> [Introduced][ce-4665] in GitLab 8.10. +> This feature was [introduced][ce-4665] in GitLab 8.10. You can specify a wildcard protected branch, which will protect all branches matching the wildcard. For example: @@ -66,40 +92,22 @@ Two different wildcards can potentially match the same branch. For example, In that case, if _any_ of these protected branches have a setting like "Allowed to push", then `production-stable` will also inherit this setting. -If you click on a protected branch's name that is created using a wildcard, -you will be presented with a list of all matching branches: +If you click on a protected branch's name, you will be presented with a list of +all matching branches: ![Protected branch matches](img/protected_branches_matches.png) ## Restrict the creation of protected branches -Creating a protected branch or a list of protected branches using the wildcard -feature, not only you are restricting pushes to those branches, but also their -creation if not already created. - -## Error messages when pushing to a protected branch - -A user with insufficient permissions will be presented with an error when -creating or pushing to a branch that's prohibited, either through GitLab's UI: - -![Protected branch error GitLab UI](img/protected_branches_error_ui.png) - -or using Git from their terminal: - -```bash -remote: GitLab: You are not allowed to push code to protected branches on this project. -To https://gitlab.example.com/thedude/bowling.git - ! [remote rejected] staging-stable -> staging-stable (pre-receive hook declined) -error: failed to push some refs to 'https://gitlab.example.com/thedude/bowling.git' -``` - ## Changelog -**8.10.0** +**8.10** -- Allow specifying protected branches using wildcards [gitlab-org/gitlab-ce!5081][ce-4665] +- Allow specifying protected branches using wildcards [gitlab-org/gitlab-ce!5081][ce-5081] +- Allow creating protected branches that can't be pushed to [gitlab-org/gitlab-ce!5081][ce-4665] --- [ce-4665]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4665 "Allow specifying protected branches using wildcards" [ce-5081]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5081 "Allow creating protected branches that can't be pushed to" +[ee-restrict]: http://docs.gitlab.com/ee/user/project/protected_branches.html#restricting-push-and-merge-access-to-certain-users -- cgit v1.2.1 From 13a9f454ff0f8fedf6f1bd584beeb05957a395f7 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 22 Aug 2016 15:14:36 +0300 Subject: Add changelog items to protected branches docs --- doc/user/project/protected_branches.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md index 330e0040998..53a6fdfa820 100644 --- a/doc/user/project/protected_branches.md +++ b/doc/user/project/protected_branches.md @@ -97,17 +97,20 @@ all matching branches: ![Protected branch matches](img/protected_branches_matches.png) -## Restrict the creation of protected branches - ## Changelog +**8.11** + +- Allow creating protected branches that can't be pushed to [gitlab-org/gitlab-ce!5081][ce-5081] + **8.10** -- Allow specifying protected branches using wildcards [gitlab-org/gitlab-ce!5081][ce-5081] -- Allow creating protected branches that can't be pushed to [gitlab-org/gitlab-ce!5081][ce-4665] +- Allow developers to merge into a protected branch without having push access [gitlab-org/gitlab-ce!4892][ce-4892] +- Allow specifying protected branches using wildcards [gitlab-org/gitlab-ce!4665][ce-4665] --- [ce-4665]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4665 "Allow specifying protected branches using wildcards" +[ce-4892]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4892 "Allow developers to merge into a protected branch without having push access" [ce-5081]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5081 "Allow creating protected branches that can't be pushed to" [ee-restrict]: http://docs.gitlab.com/ee/user/project/protected_branches.html#restricting-push-and-merge-access-to-certain-users -- cgit v1.2.1 From 16f484890c9a9489786a0eb138bec701d9d45dc8 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 22 Aug 2016 15:19:01 +0300 Subject: Reword GitLab EE ad --- doc/user/project/protected_branches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md index 53a6fdfa820..6e0f2dcc436 100644 --- a/doc/user/project/protected_branches.md +++ b/doc/user/project/protected_branches.md @@ -18,7 +18,7 @@ By default, a protected branch does four simple things: See the [Changelog](#changelog) section for changes over time. > ->Added benefits for GitLab Enterprise Edition: +>Additional functionality for GitLab Enterprise Edition: > >- Restrict push and merge access to [certain users][ee-restrict] -- cgit v1.2.1 From e466aeb87ee620f83320f0c9718386c38be56a74 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 22 Aug 2016 15:22:05 +0300 Subject: Conform to doc styleguide on new features --- doc/user/project/protected_branches.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md index 6e0f2dcc436..f7a686d2ccf 100644 --- a/doc/user/project/protected_branches.md +++ b/doc/user/project/protected_branches.md @@ -43,7 +43,7 @@ that the `master` branch is protected by default. ## Using the Allowed to merge and Allowed to push settings -> This feature was [introduced][ce-5081] in GitLab 8.11. +> [Introduced][ce-5081] in GitLab 8.11. Since GitLab 8.11, we added another layer of branch protection which provides more granular management of protected branches. The "Developers can push" @@ -73,7 +73,7 @@ they are set to "Masters" by default. ## Wildcard protected branches -> This feature was [introduced][ce-4665] in GitLab 8.10. +> [Introduced][ce-4665] in GitLab 8.10. You can specify a wildcard protected branch, which will protect all branches matching the wildcard. For example: -- cgit v1.2.1 From e4e03d946e1c830973db776a570fc89f66917ff3 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 19 Aug 2016 17:21:00 +0200 Subject: Added performance guidelines for new MRs These guidelines cover the performance requirement for newly submitted merge requests. These guidelines are put in to place to prevent merge requests from negatively impacting GitLab performance as much as possible. --- doc/development/README.md | 2 + .../merge_request_performance_guidelines.md | 171 +++++++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 doc/development/merge_request_performance_guidelines.md (limited to 'doc') diff --git a/doc/development/README.md b/doc/development/README.md index 57f37da6f80..58c00f618fa 100644 --- a/doc/development/README.md +++ b/doc/development/README.md @@ -18,6 +18,8 @@ ## Process - [Code review guidelines](code_review.md) for reviewing code and having code reviewed. +- [Merge request performance guidelines](merge_request_performance_guidelines.md) + for ensuring merge requests do not negatively impact GitLab performance ## Backend howtos diff --git a/doc/development/merge_request_performance_guidelines.md b/doc/development/merge_request_performance_guidelines.md new file mode 100644 index 00000000000..0363bf8c1d5 --- /dev/null +++ b/doc/development/merge_request_performance_guidelines.md @@ -0,0 +1,171 @@ +# Merge Request Performance Guidelines + +To ensure a merge request does not negatively impact performance of GitLab +_every_ merge request **must** adhere to the guidelines outlined in this +document. There are no exceptions to this rule unless specifically discussed +with and agreed upon by merge request endbosses and performance specialists. + +To measure the impact of a merge request you can use +[Sherlock](profiling.md#sherlock). It's also highly recommended that you read +the following guides: + +* [Performance Guidelines](performance.md) +* [What requires downtime?](what_requires_downtime.md) + +## Impact Analysis + +**Summary:** think about the impact your merge request may have on performance +and those maintaining a GitLab setup. + +Any change submitted can have an impact not only on the application itself but +also those maintaining it and those keeping it up and running (e.g. production +engineers). As a result you should think carefully about the impact of your +merge request on not only the application but also on the people keeping it up +and running. + +Can the queries used potentially take down any critical services and result in +engineers being woken up in the night? Can a malicious user abuse the code to +take down a GitLab instance? Will my changes simply make loading a certain page +slower? Will execution time grow exponentially given enough load or data in the +database? + +These are all questions one should ask themselves before submitting a merge +request. It may sometimes be difficult to assess the impact, in which case you +should ask a performance specialist to review your code. See the "Reviewing" +section below for more information. + +## Performance Review + +**Summary:** ask performance specialists to review your code if you're not sure +about the impact. + +Sometimes it's hard to assess the impact of a merge request. In this case you +should ask one of the merge request (mini) endbosses to review your changes. You +can find a list of these endbosses at . An +endboss in turn can request a performance specialist to review the changes. + +## Query Counts + +**Summary:** a merge request **should not** increase the number of executed SQL +queries unless absolutely necessary. + +The number of queries executed by the code modified or added by a merge request +must not increase unless absolutely necessary. When building features it's +entirely possible you will need some extra queries, but you should try to keep +this at a minimum. + +As an example, say you introduce a feature that updates a number of database +rows with the same value. It may be very tempting (and easy) to write this using +the following pseudo code: + +```ruby +objects_to_update.each do |object| + object.some_field = some_value + object.save +end +``` + +This will end up running one query for every object to update. This code can +easily overload a database given enough rows to update or many instances of this +code running in parallel. This particular problem is known as the +["N+1 query problem"](http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations). + +In this particular case the workaround is fairly easy: + +```ruby +objects_to_update.update_all(some_field: some_value) +``` + +This uses ActiveRecord's `update_all` method to update all rows in a single +query. This in turn makes it much harder for this code to overload a database. + +## Executing Queries in Loops + +**Summary:** SQL queries **must not** be executed in a loop unless absolutely +necessary. + +Executing SQL queries in a loop can result in many queries being executed +depending on the number of iterations in a loop. This may work fine for a +development environment with little data, but in a production environment this +can quickly spiral out of control. + +There are some cases where this may be needed. If this is the case this should +be clearly mentioned in the merge request description. + +## Eager Loading + +**Summary:** always eager load associations when retrieving more than one row. + +When retrieving multiple database records for which you need to use any +associations you **must** eager load these associations. For example, if you're +retrieving a list of blog posts and you want to display their authors you +**must** eager load the author associations. + +In other words, instead of this: + +```ruby +Post.all.each do |post| + puts post.author.name +end +``` + +You should use this: + +```ruby +Post.all.includes(:author).each do |post| + puts post.author.name +end +``` + +## Memory Usage + +**Summary:** merge requests **must not** increase memory usage unless absolutely +necessary. + +A merge request must not increase the memory usage of GitLab by more than the +absolute bare minimum required by the code. This means that if you have to parse +some large document (e.g. an HTML document) it's best to parse it as a stream +whenever possible, instead of loading the entire input into memory. Sometimes +this isn't possible, in that case this should be stated explicitly in the merge +request. + +## Lazy Rendering of UI Elements + +**Summary:** only render UI elements when they're actually needed. + +Certain UI elements may not always be needed. For example, when hovering over a +diff line there's a small icon displayed that can be used to create a new +comment. Instead of always rendering these kind of elements they should only be +rendered when actually needed. This ensures we don't spend time generating +Haml/HTML when it's not going to be used. + +## Instrumenting New Code + +**Summary:** always add instrumentation for new classes, modules, and methods. + +Newly added classes, modules, and methods must be instrumented. This ensures +we can track the performance of this code over time. + +For more information see [Instrumentation](instrumentation.md). This guide +describes how to add instrumentation and where to add it. + +## Use of Caching + +**Summary:** cache data in memory or in Redis when it's needed multiple times in +a transaction or has to be kept around for a certain time period. + +Sometimes certain bits of data have to be re-used in different places during a +transaction. In these cases this data should be cached in memory to remove the +need for running complex operations to fetch the data. You should use Redis if +data should be cached for a certain time period instead of the duration of the +transaction. + +For example, say you process multiple snippets of text containiner username +mentions (e.g. `Hello @alice` and `How are you doing @alice?`). By caching the +user objects for every username we can remove the need for running the same +query for every mention of `@alice`. + +Caching data per transaction can be done using +[RequestStore](https://github.com/steveklabnik/request_store). Caching data in +Redis can be done using [Rails' caching +system](http://guides.rubyonrails.org/caching_with_rails.html). -- cgit v1.2.1 From c70037752c7d3d7ccf52a19fc8d637ec441bfa25 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 22 Aug 2016 15:53:09 +0300 Subject: Change location of slash commands docs --- doc/user/project/slash_commands.md | 30 ++++++++++++++++++++++++++++++ doc/workflow/README.md | 2 +- doc/workflow/slash_commands.md | 30 ------------------------------ 3 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 doc/user/project/slash_commands.md delete mode 100644 doc/workflow/slash_commands.md (limited to 'doc') diff --git a/doc/user/project/slash_commands.md b/doc/user/project/slash_commands.md new file mode 100644 index 00000000000..91d69d4e77e --- /dev/null +++ b/doc/user/project/slash_commands.md @@ -0,0 +1,30 @@ +# GitLab slash commands + +Slash commands are textual shortcuts for common actions on issues or merge +requests that are usually done by clicking buttons or dropdowns in GitLab's UI. +You can enter these commands while creating a new issue or merge request, and +in comments. Each command should be on a separate line in order to be properly +detected and executed. The commands are removed from the issue, merge request or +comment body before it is saved and will not be visible to anyone else. + +Below is a list of all of the available commands and descriptions about what they +do. + +| Command | Action | +|:---------------------------|:-------------| +| `/close` | Close the issue or merge request | +| `/reopen` | Reopen the issue or merge request | +| `/title ` | Change title | +| `/assign @username` | Assign | +| `/unassign` | Remove assignee | +| `/milestone %milestone` | Set milestone | +| `/remove_milestone` | Remove milestone | +| `/label ~foo ~"bar baz"` | Add label(s) | +| `/unlabel ~foo ~"bar baz"` | Remove all or specific label(s) | +| `/relabel ~foo ~"bar baz"` | Replace all label(s) | +| `/todo` | Add a todo | +| `/done` | Mark todo as done | +| `/subscribe` | Subscribe | +| `/unsubscribe` | Unsubscribe | +| `/due ` | Set due date | +| `/remove_due_date` | Remove due date | diff --git a/doc/workflow/README.md b/doc/workflow/README.md index 1653d95e722..4a7e17039cd 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -7,7 +7,6 @@ - [GitLab Flow](gitlab_flow.md) - [Groups](groups.md) - [Keyboard shortcuts](shortcuts.md) -- [Slash commands](slash_commands.md) - [File finder](file_finder.md) - [Labels](../user/project/labels.md) - [Notification emails](notifications.md) @@ -15,6 +14,7 @@ - [Project forking workflow](forking_workflow.md) - [Project users](add-user/add-user.md) - [Protected branches](../user/project/protected_branches.md) +- [Slash commands](../user/project/slash_commands.md) - [Sharing a project with a group](share_with_group.md) - [Share projects with other groups](share_projects_with_other_groups.md) - [Web Editor](web_editor.md) diff --git a/doc/workflow/slash_commands.md b/doc/workflow/slash_commands.md deleted file mode 100644 index 91d69d4e77e..00000000000 --- a/doc/workflow/slash_commands.md +++ /dev/null @@ -1,30 +0,0 @@ -# GitLab slash commands - -Slash commands are textual shortcuts for common actions on issues or merge -requests that are usually done by clicking buttons or dropdowns in GitLab's UI. -You can enter these commands while creating a new issue or merge request, and -in comments. Each command should be on a separate line in order to be properly -detected and executed. The commands are removed from the issue, merge request or -comment body before it is saved and will not be visible to anyone else. - -Below is a list of all of the available commands and descriptions about what they -do. - -| Command | Action | -|:---------------------------|:-------------| -| `/close` | Close the issue or merge request | -| `/reopen` | Reopen the issue or merge request | -| `/title ` | Change title | -| `/assign @username` | Assign | -| `/unassign` | Remove assignee | -| `/milestone %milestone` | Set milestone | -| `/remove_milestone` | Remove milestone | -| `/label ~foo ~"bar baz"` | Add label(s) | -| `/unlabel ~foo ~"bar baz"` | Remove all or specific label(s) | -| `/relabel ~foo ~"bar baz"` | Replace all label(s) | -| `/todo` | Add a todo | -| `/done` | Mark todo as done | -| `/subscribe` | Subscribe | -| `/unsubscribe` | Unsubscribe | -| `/due ` | Set due date | -| `/remove_due_date` | Remove due date | -- cgit v1.2.1 From 2955ca51e306452590131a361f9f0ab293e47114 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 22 Aug 2016 15:56:43 +0300 Subject: Fix docs not rendering the pipe symbol --- doc/user/project/slash_commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/user/project/slash_commands.md b/doc/user/project/slash_commands.md index 91d69d4e77e..11e1574f772 100644 --- a/doc/user/project/slash_commands.md +++ b/doc/user/project/slash_commands.md @@ -26,5 +26,5 @@ do. | `/done` | Mark todo as done | | `/subscribe` | Subscribe | | `/unsubscribe` | Unsubscribe | -| `/due ` | Set due date | +| `/due ` | Set due date | | `/remove_due_date` | Remove due date | -- cgit v1.2.1 From 7a34794a98e498d69cfeac74c20d15f167e7c070 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 8 Aug 2016 17:26:32 +0300 Subject: Documentation for Issue Boards --- doc/user/project/issue_board.md | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 doc/user/project/issue_board.md (limited to 'doc') diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md new file mode 100644 index 00000000000..5890c48013f --- /dev/null +++ b/doc/user/project/issue_board.md @@ -0,0 +1,45 @@ +# Issue board + +> [Introduced][ce-5554] in GitLab 8.11. + +The GitLab Issue Board is a software project management tool used to plan, +organize, and visualize a workflow for a feature or product release. + +It allows you to create lists, which are based on the [labels] that already +exist in the issue tracker. Issues can be seen as cards and they can easily be +moved between the lists, as to create workflows. + +The starting point is two lists: **Backlog** and **Done**. Under the **Backlog** +list, all the issues that are not assigned to a list will appear. Drag a card +to the **Done** list and the relevant issue will be closed. + +## Creating workflows + +By adding new lists, you can create workflows. For instance you can create a +list based on the label of `Design` and one for `Backend`. A designer can start +working on an issue by dragging it to `Design`. That way, everyone knows, this +issue is now being worked on by the designers. Then, once they’re done, all +they have to do is drag it over to the next list, Backend, where a Backend +developer can eventually pick it up. Once they’re done, they move it to closed, +to close the issue. + +As lists in Issue Boards are based on labels, it works out of the box with your +existing issues. So if you've already labeled things with `Backend` and `Frontend`, +the issue will appear in the lists as you create them. In addition, this means +you can easily move something between lists by changing a label. + +If you move an issue from one list to the next, it removes the label from the +list it comes from and adds the label from the list it moves towards. + +## Pro-tips + +- Issue boards can have between 2-10 lists which display as columns. +- Creating a new list is easy! Simply click the **Create new list** button in + the upper right corner and select the labels from your GitLab issue tracker + to populate the list. +- If you need to create a list based on a label that doesn't exist yet, just + click **Create new list** and then "Create new**. +- All issues can be dragged and dropped into lists. + +[ce-5554]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5554 +[labels]: ./labels.md -- cgit v1.2.1 From aef158a74dd4bc8c5a40afd8976419dd6052fcd0 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 16 Aug 2016 13:40:16 +0300 Subject: Great refactor of Issue Board docs --- doc/user/project/img/issue_board.png | Bin 0 -> 200614 bytes doc/user/project/issue_board.md | 98 +++++++++++++++++++++++++++++++---- doc/workflow/README.md | 1 + 3 files changed, 89 insertions(+), 10 deletions(-) create mode 100644 doc/user/project/img/issue_board.png (limited to 'doc') diff --git a/doc/user/project/img/issue_board.png b/doc/user/project/img/issue_board.png new file mode 100644 index 00000000000..accd0900cbb Binary files /dev/null and b/doc/user/project/img/issue_board.png differ diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 5890c48013f..29c823a68f3 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -4,15 +4,96 @@ The GitLab Issue Board is a software project management tool used to plan, organize, and visualize a workflow for a feature or product release. +It can be seen like a light version of a [Kanban] or a [Scrum] board. -It allows you to create lists, which are based on the [labels] that already -exist in the issue tracker. Issues can be seen as cards and they can easily be +## Overview + +The Issue Board builds on GitLab's existing issue tracking functionality and +leverages the power of [labels] by utilizing them as lists of the scrum board. + +With the Issue Board you can have a different view of your issues while also +maintaining the same filtering and sorting abilities you see across the +issue tracker. + +There are three types of lists, of which two are default: + +- **Backlog** (default): shows all issues that do not fall in one of the other + lists. Always appears on the very left. +- **Done** (default): shows all closed issues. Always appears on the very right. +- Label list: a list based on a label. It shows all issues with that label. + +![GitLab Issue Board](img/issue_board.png) + +--- + +Below is a table of the definitions used for GitLab's Issue Board. + +| Term | Definition | +| ---- | ----------- | +| **Issue Board** | It can have up to 10 lists with each list consisting of issues represented by cards. | +| **List** | Each label that exists in the issue tracker can have its own dedicated list. Every list is named after the label it is based on and is represented by a column which contains all the issues associated with that label. You can think of a list like the results you get when you filter the issues by a label in your issue tracker. You can create up to 10 lists per Issue Board. | +| **Card** | Every card represents an issue. The information you can see on a card consists of the issue number, the issue title and the labels associated with it. You can drag cards around from one lists to another. Issues are [ordered by priority](labels.md#prioritize-labels). | + + +## Functionality + +The Issue Board consists of lists appearing as columns. Each list is named after +and based on the labels that already exist in your issue tracker. + +It allows you to create lists, which are based on the labels that already +exist in your issue tracker. Issues can be seen as cards and they can easily be moved between the lists, as to create workflows. +Every list contains all issues that are associated with the corresponding label. + +The issues inside each list are sorted by priority. + +- Issue boards can have between 2-10 lists which display as columns. + +The first time you navigate to your Issue Board, you will be presented with the +two special lists ('Backlog' and 'Done') and a welcoming message that The starting point is two lists: **Backlog** and **Done**. Under the **Backlog** list, all the issues that are not assigned to a list will appear. Drag a card to the **Done** list and the relevant issue will be closed. +Here's a list of actions you can take in an Issue Board: + +1. Create a new issue list +1. Delete an issue list +1. Drag issues between lists +1. Drag and reorder the lists themselves +1. Change issue labels on-the-fly while dragging issues between lists +1. Close an issue if you drag it to the 'Done' list +1. Create a new list from a non-existing label by creating the label on-the-fly +1. Populate lists with issues automatically + +Issues > Labels + +Board > Lists > Cards + +Moving an issue between lists removes the label from the list it came from (exception: backlog) and adds the label of the list it goes to: + +When moving from the backlog, just add the new label. The backlog is not a label. + +When moving to Done, remove the label of the list it came from and close the issue. + +If an issue exists in multiple label lists, just show it in multiple lists: + + +## First time using the Issue Board + +When default lists are created, they are empty because the labels associated to them did not exist up until that moment, which means the system has no way of populating them automatically. It'll be the users' job to add individual issues to them. + +## Adding a new list + +Add a new list by clicking on the button. In a modal you will find a label dropdown, where you can also create new labels (like in the sidebar): + +The new list should be inserted at the end of the lists, before Done. + +## Moving lists + +You should be able to drag the label lists around by dragging them on the top. + ## Creating workflows By adding new lists, you can create workflows. For instance you can create a @@ -31,15 +112,12 @@ you can easily move something between lists by changing a label. If you move an issue from one list to the next, it removes the label from the list it comes from and adds the label from the list it moves towards. -## Pro-tips +## Filtering issues -- Issue boards can have between 2-10 lists which display as columns. -- Creating a new list is easy! Simply click the **Create new list** button in - the upper right corner and select the labels from your GitLab issue tracker - to populate the list. -- If you need to create a list based on a label that doesn't exist yet, just - click **Create new list** and then "Create new**. -- All issues can be dragged and dropped into lists. +You should be able to use the filters on top, as seen in the mockup and similar to the issue list. +Every issue contains metadata. [ce-5554]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5554 [labels]: ./labels.md +[scrum]: https://en.wikipedia.org/wiki/Scrum_(software_development) +[kanban]: https://en.wikipedia.org/wiki/Kanban_(development) diff --git a/doc/workflow/README.md b/doc/workflow/README.md index 1653d95e722..8979600735a 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -6,6 +6,7 @@ - [Feature branch workflow](workflow.md) - [GitLab Flow](gitlab_flow.md) - [Groups](groups.md) +- [Issue Board](../user/project/issue_board.md) - [Keyboard shortcuts](shortcuts.md) - [Slash commands](slash_commands.md) - [File finder](file_finder.md) -- cgit v1.2.1 From 641e50368a17475404056e835e510305d178dc89 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 16 Aug 2016 19:30:03 +0300 Subject: Clean up Issue Board doc a bit --- doc/user/project/issue_board.md | 62 +++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 37 deletions(-) (limited to 'doc') diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 29c823a68f3..75ac14167fd 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -34,59 +34,47 @@ Below is a table of the definitions used for GitLab's Issue Board. | **List** | Each label that exists in the issue tracker can have its own dedicated list. Every list is named after the label it is based on and is represented by a column which contains all the issues associated with that label. You can think of a list like the results you get when you filter the issues by a label in your issue tracker. You can create up to 10 lists per Issue Board. | | **Card** | Every card represents an issue. The information you can see on a card consists of the issue number, the issue title and the labels associated with it. You can drag cards around from one lists to another. Issues are [ordered by priority](labels.md#prioritize-labels). | - ## Functionality -The Issue Board consists of lists appearing as columns. Each list is named after -and based on the labels that already exist in your issue tracker. - -It allows you to create lists, which are based on the labels that already -exist in your issue tracker. Issues can be seen as cards and they can easily be -moved between the lists, as to create workflows. - -Every list contains all issues that are associated with the corresponding label. - -The issues inside each list are sorted by priority. - -- Issue boards can have between 2-10 lists which display as columns. +The Issue Board consists of lists appearing as columns. Each list you add is +named after and based on the labels that already exist in your issue tracker. +Issues can be seen as cards and they can easily be moved between the lists, as +to create workflows. The issues inside each list are sorted by priority. The first time you navigate to your Issue Board, you will be presented with the -two special lists ('Backlog' and 'Done') and a welcoming message that -The starting point is two lists: **Backlog** and **Done**. Under the **Backlog** -list, all the issues that are not assigned to a list will appear. Drag a card +two special lists (**Backlog** and **Done**) and a welcoming message that +The starting point is two lists: **Backlog** and **Done**. The **Backlog** +list shows all issues that do not fall in one of the other lists. Drag a card to the **Done** list and the relevant issue will be closed. Here's a list of actions you can take in an Issue Board: -1. Create a new issue list +1. Add a new issue list 1. Delete an issue list 1. Drag issues between lists 1. Drag and reorder the lists themselves 1. Change issue labels on-the-fly while dragging issues between lists -1. Close an issue if you drag it to the 'Done' list -1. Create a new list from a non-existing label by creating the label on-the-fly +1. Close an issue if you drag it to the **Done** list +1. Add a new list from a non-existing label by creating the label on-the-fly 1. Populate lists with issues automatically -Issues > Labels - -Board > Lists > Cards - -Moving an issue between lists removes the label from the list it came from (exception: backlog) and adds the label of the list it goes to: - -When moving from the backlog, just add the new label. The backlog is not a label. +Moving an issue between lists removes the label from the list it came from +and adds the label of the list it goes to. When moving to Done, remove the label of the list it came from and close the issue. -If an issue exists in multiple label lists, just show it in multiple lists: - +An issue can exist in multiple lists if it has more than one labels. ## First time using the Issue Board -When default lists are created, they are empty because the labels associated to them did not exist up until that moment, which means the system has no way of populating them automatically. It'll be the users' job to add individual issues to them. +When default lists are created, they are empty because the labels associated to +them did not exist up until that moment, which means the system has no way of +populating them automatically. It'll be the users' job to add individual issues to them. ## Adding a new list -Add a new list by clicking on the button. In a modal you will find a label dropdown, where you can also create new labels (like in the sidebar): +Add a new list by clicking on the button. In a modal you will find a label +dropdown, where you can also create new labels (like in the sidebar). The new list should be inserted at the end of the lists, before Done. @@ -97,15 +85,15 @@ You should be able to drag the label lists around by dragging them on the top. ## Creating workflows By adding new lists, you can create workflows. For instance you can create a -list based on the label of `Design` and one for `Backend`. A designer can start -working on an issue by dragging it to `Design`. That way, everyone knows, this -issue is now being worked on by the designers. Then, once they’re done, all -they have to do is drag it over to the next list, Backend, where a Backend -developer can eventually pick it up. Once they’re done, they move it to closed, -to close the issue. +list based on the label of 'Frontend' and one for 'Backend'. A designer can start +working on an issue by dragging it from **Backlog** to 'Frontend'. That way, everyone +knows, this issue is now being worked on by the designers. Then, once they’re +done, all they have to do is drag it over to the next list, 'Backend', where a +backend developer can eventually pick it up. Once they’re done, they move it to +**Done**, to close the issue. As lists in Issue Boards are based on labels, it works out of the box with your -existing issues. So if you've already labeled things with `Backend` and `Frontend`, +existing issues. So if you've already labeled things with 'Backend' and 'Frontend', the issue will appear in the lists as you create them. In addition, this means you can easily move something between lists by changing a label. -- cgit v1.2.1 From 31e11c90ce2a28d7733c6596d7beefb4db60a305 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 18 Aug 2016 09:09:16 +0300 Subject: Remove 10 lists limit --- doc/user/project/issue_board.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 75ac14167fd..5f87a06504e 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -30,8 +30,8 @@ Below is a table of the definitions used for GitLab's Issue Board. | Term | Definition | | ---- | ----------- | -| **Issue Board** | It can have up to 10 lists with each list consisting of issues represented by cards. | -| **List** | Each label that exists in the issue tracker can have its own dedicated list. Every list is named after the label it is based on and is represented by a column which contains all the issues associated with that label. You can think of a list like the results you get when you filter the issues by a label in your issue tracker. You can create up to 10 lists per Issue Board. | +| **Issue Board** | It can have multiple lists with each list consisting of issues represented by cards. | +| **List** | Each label that exists in the issue tracker can have its own dedicated list. Every list is named after the label it is based on and is represented by a column which contains all the issues associated with that label. You can think of a list like the results you get when you filter the issues by a label in your issue tracker. | | **Card** | Every card represents an issue. The information you can see on a card consists of the issue number, the issue title and the labels associated with it. You can drag cards around from one lists to another. Issues are [ordered by priority](labels.md#prioritize-labels). | ## Functionality -- cgit v1.2.1 From 53f11f9be79c30e50d4077257945467ff75e7d03 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 18 Aug 2016 13:31:44 +0300 Subject: Complete rest of documentation for Issue Boards --- doc/user/project/img/issue_board_add_list.png | Bin 0 -> 22046 bytes .../project/img/issue_board_welcome_message.png | Bin 0 -> 92257 bytes doc/user/project/issue_board.md | 136 +++++++++++++-------- 3 files changed, 87 insertions(+), 49 deletions(-) create mode 100644 doc/user/project/img/issue_board_add_list.png create mode 100644 doc/user/project/img/issue_board_welcome_message.png (limited to 'doc') diff --git a/doc/user/project/img/issue_board_add_list.png b/doc/user/project/img/issue_board_add_list.png new file mode 100644 index 00000000000..e5538763dee Binary files /dev/null and b/doc/user/project/img/issue_board_add_list.png differ diff --git a/doc/user/project/img/issue_board_welcome_message.png b/doc/user/project/img/issue_board_welcome_message.png new file mode 100644 index 00000000000..ebb9fbe8246 Binary files /dev/null and b/doc/user/project/img/issue_board_welcome_message.png differ diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 5f87a06504e..a0edc062f99 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -15,6 +15,14 @@ With the Issue Board you can have a different view of your issues while also maintaining the same filtering and sorting abilities you see across the issue tracker. +Below is a table of the definitions used for GitLab's Issue Board. + +| How we call it | What it means | +| -------------- | ------------- | +| **Issue Board** | It represents a different view for your issues. It can have multiple lists with each list consisting of issues represented by cards. | +| **List** | Each label that exists in the issue tracker can have its own dedicated list. Every list is named after the label it is based on and is represented by a column which contains all the issues associated with that label. You can think of a list like the results you get when you filter the issues by a label in your issue tracker. | +| **Card** | Every card represents an issue and it is shown under the list for which it has a label for. The information you can see on a card consists of the issue number, the issue title, the assignee and the labels associated with it. You can drag cards around from one list to another. Issues inside lists are [ordered by priority](labels.md#prioritize-labels). | + There are three types of lists, of which two are default: - **Backlog** (default): shows all issues that do not fall in one of the other @@ -26,86 +34,116 @@ There are three types of lists, of which two are default: --- -Below is a table of the definitions used for GitLab's Issue Board. +In short, here's a list of actions you can take in an Issue Board: -| Term | Definition | -| ---- | ----------- | -| **Issue Board** | It can have multiple lists with each list consisting of issues represented by cards. | -| **List** | Each label that exists in the issue tracker can have its own dedicated list. Every list is named after the label it is based on and is represented by a column which contains all the issues associated with that label. You can think of a list like the results you get when you filter the issues by a label in your issue tracker. | -| **Card** | Every card represents an issue. The information you can see on a card consists of the issue number, the issue title and the labels associated with it. You can drag cards around from one lists to another. Issues are [ordered by priority](labels.md#prioritize-labels). | +- [Add a new list](#adding-a-new-list). +- [Remove an existing list](#removing-a-list). +- Drag issues between lists. +- Drag and reorder the lists themselves. +- Change issue labels on-the-fly while dragging issues between lists. +- Close an issue if you drag it to the **Done** list. +- Add a new list from a non-existing label by creating the label on-the-fly. +- [Filter issues](#filtering-issues) that appear across your Issue Board. -## Functionality +If you are not able to perform one or more of the things above, make sure you +have the right [permissions](#permissions). -The Issue Board consists of lists appearing as columns. Each list you add is -named after and based on the labels that already exist in your issue tracker. -Issues can be seen as cards and they can easily be moved between the lists, as -to create workflows. The issues inside each list are sorted by priority. +## First time using the Issue Board The first time you navigate to your Issue Board, you will be presented with the -two special lists (**Backlog** and **Done**) and a welcoming message that -The starting point is two lists: **Backlog** and **Done**. The **Backlog** -list shows all issues that do not fall in one of the other lists. Drag a card -to the **Done** list and the relevant issue will be closed. +two special lists (**Backlog** and **Done**) and a welcoming message that gives +you two options. You can either create a predefined set of labels and add their +corresponding lists to the Issue Board or opt-out and use your own lists. + +![Issue Board welcome message](img/issue_board_welcome_message.png) -Here's a list of actions you can take in an Issue Board: +If you choose to use and add the default lists, they will appear as empty +because the labels associated to them will not exist up until that moment, +which means the system has no way of populating them automatically. It'll be +the users' job to add individual issues to them. -1. Add a new issue list -1. Delete an issue list -1. Drag issues between lists -1. Drag and reorder the lists themselves -1. Change issue labels on-the-fly while dragging issues between lists -1. Close an issue if you drag it to the **Done** list -1. Add a new list from a non-existing label by creating the label on-the-fly -1. Populate lists with issues automatically +## Adding a new list -Moving an issue between lists removes the label from the list it came from -and adds the label of the list it goes to. +Add a new list by clicking on the **Add new list** button at the upper right +corner of the Issue Board. -When moving to Done, remove the label of the list it came from and close the issue. +![Issue Board welcome message](img/issue_board_add_list.png) -An issue can exist in multiple lists if it has more than one labels. +Simply choose the label to create the list from. The new list will be inserted +at the end of the lists, before **Done**. Moving and reordering lists is as +easy as dragging them around. -## First time using the Issue Board +To add a list for a label that doesn't exist yet, simply create the label by +choosing **Create new label**. The label will be created on-the-fly and it will +be immediately added to the dropdown. You can now choose it to add a list. -When default lists are created, they are empty because the labels associated to -them did not exist up until that moment, which means the system has no way of -populating them automatically. It'll be the users' job to add individual issues to them. +## Removing a list -## Adding a new list +To remove a list from the Issue Board use the small trash icon that is present +in the list's heading. A confirmation dialog will appear for you to confirm. -Add a new list by clicking on the button. In a modal you will find a label -dropdown, where you can also create new labels (like in the sidebar). +Removing a list doesn't have any effect in issues and labels, it's just the +list view that is removed. -The new list should be inserted at the end of the lists, before Done. +## Filtering issues -## Moving lists +You should be able to use the filters on top of your Issue Board to show only +the results you want. This is similar to the filtering used in the issue tracker +since the metadata from the issues and labels are re-used in the Issue Board. -You should be able to drag the label lists around by dragging them on the top. +You can filter by author, assignee, milestone and label. ## Creating workflows -By adding new lists, you can create workflows. For instance you can create a +By adding new lists, you can create workflows. As lists in Issue Boards are +based on labels, it works out of the box with your existing issues. So if you've +already labeled things with 'Backend' and 'Frontend', the issue will appear in +the lists as you create them. In addition, this means you can easily move +something between lists by changing a label. + +A typical workflow of using the Issue Board would be: + +1. You have [created labels] so that you can easily categorize your issues. +1. You have a bunch of issues (ideally labeled). +1. You visit the Issue Board and start [adding lists](#adding-a-new-list) as to + create a workflow. +1. You move issues around in lists so that your team knows who should be working + on what issue. +1. When the work by one team is done, the issue can be dragged to the next list + so someone else can pick up. +1. When the issue is finally resolved, the issue is moved to the **Done** list + and gets automatically closed. + +For instance you can add a list based on the label of 'Frontend' and one for 'Backend'. A designer can start working on an issue by dragging it from **Backlog** to 'Frontend'. That way, everyone -knows, this issue is now being worked on by the designers. Then, once they’re +knows that this issue is now being worked on by the designers. Then, once they’re done, all they have to do is drag it over to the next list, 'Backend', where a backend developer can eventually pick it up. Once they’re done, they move it to **Done**, to close the issue. -As lists in Issue Boards are based on labels, it works out of the box with your -existing issues. So if you've already labeled things with 'Backend' and 'Frontend', -the issue will appear in the lists as you create them. In addition, this means -you can easily move something between lists by changing a label. +## Permissions -If you move an issue from one list to the next, it removes the label from the -list it comes from and adds the label from the list it moves towards. +[Developers and up](../permissions.md) can use all the functionality of the +Issue Board, that is add/remove lists and drag issues around. -## Filtering issues +## Tips + +A few things to remember: -You should be able to use the filters on top, as seen in the mockup and similar to the issue list. -Every issue contains metadata. +- Moving an issue between lists removes the label from the list it came from + and adds the label from the list it goes to. +- When moving a card to **Done**, the label of the list it came from is removed + the issue gets closed. +- An issue can exist in multiple lists if it has more than one labels. +- Lists are populated with issues automatically if the issues are labeled. +- Clicking on the issue title inside a card will get you to that issue. +- Clicking on a label inside a card will quickly filter the entire Issue Board + and show only the issues from all lists that have that label. +- Issues inside lists are [ordered by priority](labels.md#prioritize-labels). [ce-5554]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5554 [labels]: ./labels.md [scrum]: https://en.wikipedia.org/wiki/Scrum_(software_development) [kanban]: https://en.wikipedia.org/wiki/Kanban_(development) +[created labels]: ./labels.md#create-new-labels -- cgit v1.2.1 From 1804f60fd5a1aab92f553b7c66b79857ef35df35 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 18 Aug 2016 22:34:17 +0300 Subject: Change images to reflect current status, add link to inline docs --- doc/user/project/img/issue_board_add_list.png | Bin 22046 -> 22391 bytes .../project/img/issue_board_welcome_message.png | Bin 92257 -> 78694 bytes doc/user/project/issue_board.md | 34 ++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'doc') diff --git a/doc/user/project/img/issue_board_add_list.png b/doc/user/project/img/issue_board_add_list.png index e5538763dee..2b8c10eaa0a 100644 Binary files a/doc/user/project/img/issue_board_add_list.png and b/doc/user/project/img/issue_board_add_list.png differ diff --git a/doc/user/project/img/issue_board_welcome_message.png b/doc/user/project/img/issue_board_welcome_message.png index ebb9fbe8246..b757faeb230 100644 Binary files a/doc/user/project/img/issue_board_welcome_message.png and b/doc/user/project/img/issue_board_welcome_message.png differ diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index a0edc062f99..0ad21606ef6 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -36,8 +36,8 @@ There are three types of lists, of which two are default: In short, here's a list of actions you can take in an Issue Board: -- [Add a new list](#adding-a-new-list). -- [Remove an existing list](#removing-a-list). +- [Create a new list](#creating-a-new-list). +- [Delete an existing list](#deleting-a-list). - Drag issues between lists. - Drag and reorder the lists themselves. - Change issue labels on-the-fly while dragging issues between lists. @@ -62,10 +62,10 @@ because the labels associated to them will not exist up until that moment, which means the system has no way of populating them automatically. It'll be the users' job to add individual issues to them. -## Adding a new list +## Creating a new list -Add a new list by clicking on the **Add new list** button at the upper right -corner of the Issue Board. +Create a new list by clicking on the **Create new list** button at the upper +right corner of the Issue Board. ![Issue Board welcome message](img/issue_board_add_list.png) @@ -73,16 +73,16 @@ Simply choose the label to create the list from. The new list will be inserted at the end of the lists, before **Done**. Moving and reordering lists is as easy as dragging them around. -To add a list for a label that doesn't exist yet, simply create the label by +To create a list for a label that doesn't exist yet, simply create the label by choosing **Create new label**. The label will be created on-the-fly and it will -be immediately added to the dropdown. You can now choose it to add a list. +be immediately added to the dropdown. You can now choose it to create a list. -## Removing a list +## Deleting a list -To remove a list from the Issue Board use the small trash icon that is present +To delete a list from the Issue Board use the small trash icon that is present in the list's heading. A confirmation dialog will appear for you to confirm. -Removing a list doesn't have any effect in issues and labels, it's just the +Deleting a list doesn't have any effect in issues and labels, it's just the list view that is removed. ## Filtering issues @@ -114,13 +114,13 @@ A typical workflow of using the Issue Board would be: 1. When the issue is finally resolved, the issue is moved to the **Done** list and gets automatically closed. -For instance you can add a -list based on the label of 'Frontend' and one for 'Backend'. A designer can start -working on an issue by dragging it from **Backlog** to 'Frontend'. That way, everyone -knows that this issue is now being worked on by the designers. Then, once they’re -done, all they have to do is drag it over to the next list, 'Backend', where a -backend developer can eventually pick it up. Once they’re done, they move it to -**Done**, to close the issue. +For instance you can add a list based on the label of 'Frontend' and one for +'Backend'. A designer can start working on an issue by dragging it from +**Backlog** to 'Frontend'. That way, everyone knows that this issue is now being +worked on by the designers. Then, once they're done, all they have to do is +drag it over to the next list, 'Backend', where a backend developer can +eventually pick it up. Once they’re done, they move it to **Done**, to close the +issue. ## Permissions -- cgit v1.2.1 From 04d4208eed39d72ba4886c9920796d0172a20627 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 19 Aug 2016 08:30:59 +0300 Subject: Add section on searching through the Backlog list --- .../project/img/issue_board_search_backlog.png | Bin 0 -> 25948 bytes doc/user/project/issue_board.md | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 doc/user/project/img/issue_board_search_backlog.png (limited to 'doc') diff --git a/doc/user/project/img/issue_board_search_backlog.png b/doc/user/project/img/issue_board_search_backlog.png new file mode 100644 index 00000000000..112ea171539 Binary files /dev/null and b/doc/user/project/img/issue_board_search_backlog.png differ diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 0ad21606ef6..edc93f6bc13 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -85,6 +85,24 @@ in the list's heading. A confirmation dialog will appear for you to confirm. Deleting a list doesn't have any effect in issues and labels, it's just the list view that is removed. +## Searching issues in the Backlog list + +The very first time you start using the Issue Board, it is very likely your +issue tracker is already populated with labels and issues. In that case, +**Backlog** will have all the issues that don't belong to another list, and +**Done** will have all the closed ones. + +For performance and visibility reasons, each list shows the first 20 issues +by default. If you have more than 20, you have to start scrolling down for the +next 20 issues to appear. This can be cumbersome if your issue tracker hosts +hundreds of issues, and for that reason it is easier to search for issues to +move from **Backlog** to another list. + +Start typing in the search bar under the **Backlog** list and the relevant +issues will appear. + +![Issue Board search Backlog](img/issue_board_search_backlog.png) + ## Filtering issues You should be able to use the filters on top of your Issue Board to show only @@ -141,6 +159,9 @@ A few things to remember: - Clicking on a label inside a card will quickly filter the entire Issue Board and show only the issues from all lists that have that label. - Issues inside lists are [ordered by priority](labels.md#prioritize-labels). +- For performance and visibility reasons, each list shows the first 20 issues + by default. If you have more than 20 issues start scrolling down and the next + 20 will appear. [ce-5554]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5554 [labels]: ./labels.md -- cgit v1.2.1 From 3a737e7ea5d4a497489e38ed1e1f14140d7c45e3 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 19 Aug 2016 08:35:39 +0300 Subject: Mention missing labels for corresponding lists --- doc/user/project/issue_board.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index edc93f6bc13..f3fd7e1ec1a 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -149,6 +149,7 @@ Issue Board, that is add/remove lists and drag issues around. A few things to remember: +- The label that corresponds to a list is hidden for issues under that list. - Moving an issue between lists removes the label from the list it came from and adds the label from the list it goes to. - When moving a card to **Done**, the label of the list it came from is removed -- cgit v1.2.1 From 3d1b24767b292af2bcadd3de728abd9a1d08cdb6 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 19 Aug 2016 08:44:39 +0300 Subject: Add note about labels and system notes --- doc/user/project/img/issue_board_system_notes.png | Bin 0 -> 20637 bytes doc/user/project/issue_board.md | 5 +++++ 2 files changed, 5 insertions(+) create mode 100644 doc/user/project/img/issue_board_system_notes.png (limited to 'doc') diff --git a/doc/user/project/img/issue_board_system_notes.png b/doc/user/project/img/issue_board_system_notes.png new file mode 100644 index 00000000000..b69ef034954 Binary files /dev/null and b/doc/user/project/img/issue_board_system_notes.png differ diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index f3fd7e1ec1a..c0b040c3c07 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -140,6 +140,11 @@ drag it over to the next list, 'Backend', where a backend developer can eventually pick it up. Once they’re done, they move it to **Done**, to close the issue. +This process can be seen clearly when visiting an issue since with every move +to another list the label changes and a system not is recorded. + +![Issue Board system notes](img/issue_board_system_notes.png) + ## Permissions [Developers and up](../permissions.md) can use all the functionality of the -- cgit v1.2.1 From fa72b5fa1481f49758cef45fa37c6d1d4e261e3a Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sat, 20 Aug 2016 18:21:30 +0300 Subject: Fix typos and grammar --- doc/user/project/issue_board.md | 49 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'doc') diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index c0b040c3c07..33db21d442b 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -17,13 +17,14 @@ issue tracker. Below is a table of the definitions used for GitLab's Issue Board. -| How we call it | What it means | +| What we call it | What it means | | -------------- | ------------- | | **Issue Board** | It represents a different view for your issues. It can have multiple lists with each list consisting of issues represented by cards. | | **List** | Each label that exists in the issue tracker can have its own dedicated list. Every list is named after the label it is based on and is represented by a column which contains all the issues associated with that label. You can think of a list like the results you get when you filter the issues by a label in your issue tracker. | -| **Card** | Every card represents an issue and it is shown under the list for which it has a label for. The information you can see on a card consists of the issue number, the issue title, the assignee and the labels associated with it. You can drag cards around from one list to another. Issues inside lists are [ordered by priority](labels.md#prioritize-labels). | +| **Card** | Every card represents an issue and it is shown under the list for which it has a label. The information you can see on a card consists of the issue number, the issue title, the assignee and the labels associated with it. You can drag cards around from one list to another. Issues inside lists are [ordered by priority](labels.md#prioritize-labels). | -There are three types of lists, of which two are default: +There are three types of lists, the ones you create based on your labels, and +two default: - **Backlog** (default): shows all issues that do not fall in one of the other lists. Always appears on the very left. @@ -42,7 +43,8 @@ In short, here's a list of actions you can take in an Issue Board: - Drag and reorder the lists themselves. - Change issue labels on-the-fly while dragging issues between lists. - Close an issue if you drag it to the **Done** list. -- Add a new list from a non-existing label by creating the label on-the-fly. +- Create a new list from a non-existing label by [creating the label on-the-fly](#creating-a-new-list) + within the Issue Board. - [Filter issues](#filtering-issues) that appear across your Issue Board. If you are not able to perform one or more of the things above, make sure you @@ -51,16 +53,17 @@ have the right [permissions](#permissions). ## First time using the Issue Board The first time you navigate to your Issue Board, you will be presented with the -two special lists (**Backlog** and **Done**) and a welcoming message that gives -you two options. You can either create a predefined set of labels and add their -corresponding lists to the Issue Board or opt-out and use your own lists. +two default lists (**Backlog** and **Done**) and a welcoming message that gives +you two options. You can either create a predefined set of labels and create +their corresponding lists to the Issue Board or opt-out and use your own lists. ![Issue Board welcome message](img/issue_board_welcome_message.png) -If you choose to use and add the default lists, they will appear as empty +If you choose to use and create the predefined lists, they will appear as empty because the labels associated to them will not exist up until that moment, -which means the system has no way of populating them automatically. It'll be -the users' job to add individual issues to them. +which means the system has no way of populating them automatically. That's of +course if the predefined labels don't already exist. If any of them does exist, +the list will be created and filled with the issues that have that label. ## Creating a new list @@ -73,7 +76,7 @@ Simply choose the label to create the list from. The new list will be inserted at the end of the lists, before **Done**. Moving and reordering lists is as easy as dragging them around. -To create a list for a label that doesn't exist yet, simply create the label by +To create a list for a label that doesn't yet exist, simply create the label by choosing **Create new label**. The label will be created on-the-fly and it will be immediately added to the dropdown. You can now choose it to create a list. @@ -83,7 +86,7 @@ To delete a list from the Issue Board use the small trash icon that is present in the list's heading. A confirmation dialog will appear for you to confirm. Deleting a list doesn't have any effect in issues and labels, it's just the -list view that is removed. +list view that is removed. You can always add it back later if you need. ## Searching issues in the Backlog list @@ -113,7 +116,7 @@ You can filter by author, assignee, milestone and label. ## Creating workflows -By adding new lists, you can create workflows. As lists in Issue Boards are +By reordering your lists, you can create workflows. As lists in Issue Boards are based on labels, it works out of the box with your existing issues. So if you've already labeled things with 'Backend' and 'Frontend', the issue will appear in the lists as you create them. In addition, this means you can easily move @@ -121,9 +124,10 @@ something between lists by changing a label. A typical workflow of using the Issue Board would be: -1. You have [created labels] so that you can easily categorize your issues. +1. You have [created][create-labels] and [prioritized][label-priority] labels + so that you can easily categorize your issues. 1. You have a bunch of issues (ideally labeled). -1. You visit the Issue Board and start [adding lists](#adding-a-new-list) as to +1. You visit the Issue Board and start [creating lists](#creating-a-new-list) to create a workflow. 1. You move issues around in lists so that your team knows who should be working on what issue. @@ -132,7 +136,7 @@ A typical workflow of using the Issue Board would be: 1. When the issue is finally resolved, the issue is moved to the **Done** list and gets automatically closed. -For instance you can add a list based on the label of 'Frontend' and one for +For instance you can create a list based on the label of 'Frontend' and one for 'Backend'. A designer can start working on an issue by dragging it from **Backlog** to 'Frontend'. That way, everyone knows that this issue is now being worked on by the designers. Then, once they're done, all they have to do is @@ -148,7 +152,7 @@ to another list the label changes and a system not is recorded. ## Permissions [Developers and up](../permissions.md) can use all the functionality of the -Issue Board, that is add/remove lists and drag issues around. +Issue Board, that is create/delete lists and drag issues around. ## Tips @@ -158,13 +162,13 @@ A few things to remember: - Moving an issue between lists removes the label from the list it came from and adds the label from the list it goes to. - When moving a card to **Done**, the label of the list it came from is removed - the issue gets closed. -- An issue can exist in multiple lists if it has more than one labels. + and the issue gets closed. +- An issue can exist in multiple lists if it has more than one label. - Lists are populated with issues automatically if the issues are labeled. -- Clicking on the issue title inside a card will get you to that issue. +- Clicking on the issue title inside a card will take you to that issue. - Clicking on a label inside a card will quickly filter the entire Issue Board and show only the issues from all lists that have that label. -- Issues inside lists are [ordered by priority](labels.md#prioritize-labels). +- Issues inside lists are [ordered by priority][label-priority]. - For performance and visibility reasons, each list shows the first 20 issues by default. If you have more than 20 issues start scrolling down and the next 20 will appear. @@ -173,4 +177,5 @@ A few things to remember: [labels]: ./labels.md [scrum]: https://en.wikipedia.org/wiki/Scrum_(software_development) [kanban]: https://en.wikipedia.org/wiki/Kanban_(development) -[created labels]: ./labels.md#create-new-labels +[create-labels]: ./labels.md#create-new-labels +[label-priority]: ./labels.md#prioritize-labels -- cgit v1.2.1 From 31584d8e5518da596cfc0b963e7a403a461e098f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sat, 20 Aug 2016 18:41:57 +0300 Subject: Add links to landing page and youtube video --- doc/user/project/issue_board.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 33db21d442b..9df9ed9c9da 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -6,6 +6,11 @@ The GitLab Issue Board is a software project management tool used to plan, organize, and visualize a workflow for a feature or product release. It can be seen like a light version of a [Kanban] or a [Scrum] board. +Other interesting links: + +- [GitLab Issue Board landing page on about.gitlab.com][landing] +- [YouTube video introduction to Issue Boards][youtube] + ## Overview The Issue Board builds on GitLab's existing issue tracking functionality and @@ -179,3 +184,5 @@ A few things to remember: [kanban]: https://en.wikipedia.org/wiki/Kanban_(development) [create-labels]: ./labels.md#create-new-labels [label-priority]: ./labels.md#prioritize-labels +[landing]: https://about.gitlab.com/solutions/issueboard +[youtube]: https://www.youtube.com/watch?v=UWsJ8tkHAa8 -- cgit v1.2.1 From 915dda1421d8227c0ba395bfdb04ff915724c4ac Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 22 Aug 2016 17:09:15 +0300 Subject: Split Koding admin/user docs --- doc/README.md | 2 + doc/administration/integration/koding.md | 242 +++++++++++++++++++++ doc/integration/img/koding_build-in-progress.png | Bin 70949 -> 0 bytes doc/integration/img/koding_build-logs.png | Bin 263623 -> 0 bytes doc/integration/img/koding_build-success.png | Bin 304666 -> 0 bytes doc/integration/img/koding_commit-koding.yml.png | Bin 302703 -> 0 bytes .../img/koding_different-stack-on-mr-try.png | Bin 333649 -> 0 bytes doc/integration/img/koding_edit-on-ide.png | Bin 330880 -> 0 bytes doc/integration/img/koding_enable-koding.png | Bin 73499 -> 0 bytes doc/integration/img/koding_landing.png | Bin 268455 -> 0 bytes .../img/koding_open-gitlab-from-koding.png | Bin 32559 -> 0 bytes doc/integration/img/koding_run-in-ide.png | Bin 65465 -> 0 bytes doc/integration/img/koding_run-mr-in-ide.png | Bin 339759 -> 0 bytes doc/integration/img/koding_set-up-ide.png | Bin 207481 -> 0 bytes doc/integration/img/koding_stack-import.png | Bin 500352 -> 0 bytes doc/integration/img/koding_start-build.png | Bin 105253 -> 0 bytes doc/integration/koding-usage.md | 122 ----------- doc/integration/koding.md | 239 -------------------- doc/user/project/img/koding_build-in-progress.png | Bin 0 -> 70949 bytes doc/user/project/img/koding_build-logs.png | Bin 0 -> 263623 bytes doc/user/project/img/koding_build-success.png | Bin 0 -> 304666 bytes doc/user/project/img/koding_commit-koding.yml.png | Bin 0 -> 302703 bytes .../img/koding_different-stack-on-mr-try.png | Bin 0 -> 333649 bytes doc/user/project/img/koding_edit-on-ide.png | Bin 0 -> 330880 bytes doc/user/project/img/koding_enable-koding.png | Bin 0 -> 73499 bytes doc/user/project/img/koding_landing.png | Bin 0 -> 268455 bytes .../project/img/koding_open-gitlab-from-koding.png | Bin 0 -> 32559 bytes doc/user/project/img/koding_run-in-ide.png | Bin 0 -> 65465 bytes doc/user/project/img/koding_run-mr-in-ide.png | Bin 0 -> 339759 bytes doc/user/project/img/koding_set-up-ide.png | Bin 0 -> 207481 bytes doc/user/project/img/koding_stack-import.png | Bin 0 -> 500352 bytes doc/user/project/img/koding_start-build.png | Bin 0 -> 105253 bytes doc/user/project/koding.md | 128 +++++++++++ 33 files changed, 372 insertions(+), 361 deletions(-) create mode 100644 doc/administration/integration/koding.md delete mode 100644 doc/integration/img/koding_build-in-progress.png delete mode 100644 doc/integration/img/koding_build-logs.png delete mode 100644 doc/integration/img/koding_build-success.png delete mode 100644 doc/integration/img/koding_commit-koding.yml.png delete mode 100644 doc/integration/img/koding_different-stack-on-mr-try.png delete mode 100644 doc/integration/img/koding_edit-on-ide.png delete mode 100644 doc/integration/img/koding_enable-koding.png delete mode 100644 doc/integration/img/koding_landing.png delete mode 100644 doc/integration/img/koding_open-gitlab-from-koding.png delete mode 100644 doc/integration/img/koding_run-in-ide.png delete mode 100644 doc/integration/img/koding_run-mr-in-ide.png delete mode 100644 doc/integration/img/koding_set-up-ide.png delete mode 100644 doc/integration/img/koding_stack-import.png delete mode 100644 doc/integration/img/koding_start-build.png delete mode 100644 doc/integration/koding-usage.md delete mode 100644 doc/integration/koding.md create mode 100644 doc/user/project/img/koding_build-in-progress.png create mode 100644 doc/user/project/img/koding_build-logs.png create mode 100644 doc/user/project/img/koding_build-success.png create mode 100644 doc/user/project/img/koding_commit-koding.yml.png create mode 100644 doc/user/project/img/koding_different-stack-on-mr-try.png create mode 100644 doc/user/project/img/koding_edit-on-ide.png create mode 100644 doc/user/project/img/koding_enable-koding.png create mode 100644 doc/user/project/img/koding_landing.png create mode 100644 doc/user/project/img/koding_open-gitlab-from-koding.png create mode 100644 doc/user/project/img/koding_run-in-ide.png create mode 100644 doc/user/project/img/koding_run-mr-in-ide.png create mode 100644 doc/user/project/img/koding_set-up-ide.png create mode 100644 doc/user/project/img/koding_stack-import.png create mode 100644 doc/user/project/img/koding_start-build.png create mode 100644 doc/user/project/koding.md (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index fc51ea911b9..195b7c7af62 100644 --- a/doc/README.md +++ b/doc/README.md @@ -18,6 +18,7 @@ - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. - [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. +- [Koding](user/project/koding.md) Learn how to use Koding, the online IDE. ## Administrator documentation @@ -29,6 +30,7 @@ - [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components. - [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter. - [Issue closing](customization/issue_closing.md) Customize how to close an issue from commit messages. +- [Koding](administration/integration/koding.md) Set up Koding to use with GitLab. - [Libravatar](customization/libravatar.md) Use Libravatar for user avatars. - [Log system](administration/logs.md) Log system. - [Environment Variables](administration/environment_variables.md) to configure GitLab. diff --git a/doc/administration/integration/koding.md b/doc/administration/integration/koding.md new file mode 100644 index 00000000000..a2c358af095 --- /dev/null +++ b/doc/administration/integration/koding.md @@ -0,0 +1,242 @@ +# Koding & GitLab + +> [Introduced][ce-5909] in GitLab 8.11. + +This document will guide you through installing and configuring Koding with +GitLab. + +First of all, to be able to use Koding and GitLab together you will need public +access to your server. This allows you to use single sign-on from GitLab to +Koding and using vms from cloud providers like AWS. Koding has a registry for +VMs, called Kontrol and it runs on the same server as Koding itself, VMs from +cloud providers register themselves to Kontrol via the agent that we put into +provisioned VMs. This agent is called Klient and it provides Koding to access +and manage the target machine. + +Kontrol and Klient are based on another technology called +[Kite](https://github.com/koding/kite), that we have written at Koding. Which is a +microservice framework that allows you to develop microservices easily. + +## Requirements + +### Hardware + +Minimum requirements are; + + - 2 cores CPU + - 3G RAM + - 10G Storage + +If you plan to use AWS to install Koding it is recommended that you use at +least a `c3.xlarge` instance. + +### Software + + - [Git](https://git-scm.com) + - [Docker](https://www.docker.com) + - [docker-compose](https://www.docker.com/products/docker-compose) + +Koding can run on most of the UNIX based operating systems, since it's shipped +as containerized with Docker support, it can work on any operating system that +supports Docker. + +Required services are: + +- **PostgreSQL** - Kontrol and Service DB provider +- **MongoDB** - Main DB provider the application +- **Redis** - In memory DB used by both application and services +- **RabbitMQ** - Message Queue for both application and services + +which are also provided as a Docker container by Koding. + + +## Getting Started with Development Versions + + +### Koding + +You can run `docker-compose` environment for developing koding by +executing commands in the following snippet. + +```bash +git clone https://github.com/koding/koding.git +cd koding +docker-compose up +``` + +This should start koding on `localhost:8090`. + +By default there is no team exists in Koding DB. You'll need to create a team +called `gitlab` which is the default team name for GitLab integration in the +configuration. To make things in order it's recommended to create the `gitlab` +team first thing after setting up Koding. + + +### GitLab + +To install GitLab to your environment for development purposes it's recommended +to use GitLab Development Kit which you can get it from +[here](https://gitlab.com/gitlab-org/gitlab-development-kit). + +After all those steps, gitlab should be running on `localhost:3000` + + +## Integration + +Integration includes following components; + + - Single Sign On with OAuth from GitLab to Koding + - System Hook integration for handling GitLab events on Koding + (`project_created`, `user_joined` etc.) + - Service endpoints for importing/executing stacks from GitLab to Koding + (`Run/Try on IDE (Koding)` buttons on GitLab Projects, Issues, MRs) + +As it's pointed out before, you will need public access to this machine that +you've installed Koding and GitLab on. Better to use a domain but a static IP +is also fine. + +For IP based installation you can use [xip.io](https://xip.io) service which is +free and provides DNS resolution to IP based requests like following; + + - 127.0.0.1.xip.io -> resolves to 127.0.0.1 + - foo.bar.baz.127.0.0.1.xip.io -> resolves to 127.0.0.1 + - and so on... + +As Koding needs subdomains for team names; `foo.127.0.0.1.xip.io` requests for +a running koding instance on `127.0.0.1` server will be handled as `foo` team +requests. + + +### GitLab Side + +You need to enable Koding integration from Settings under Admin Area. To do +that login with an Admin account and do followings; + + - open [http://127.0.0.1:3000/admin/application_settings](http://127.0.0.1:3000/admin/application_settings) + - scroll to bottom of the page until Koding section + - check `Enable Koding` checkbox + - provide GitLab team page for running Koding instance as `Koding URL`* + +* For `Koding URL` you need to provide the gitlab integration enabled team on +your Koding installation. Team called `gitlab` has integration on Koding out +of the box, so if you didn't change anything your team on Koding should be +`gitlab`. + +So, if your Koding is running on `http://1.2.3.4.xip.io:8090` your URL needs +to be `http://gitlab.1.2.3.4.xip.io:8090`. You need to provide the same host +with your Koding installation here. + + +#### Registering Koding for OAuth integration + +We need `Application ID` and `Secret` to enable login to Koding via GitLab +feature and to do that you need to register running Koding as a new application +to your running GitLab application. Follow +[these](http://docs.gitlab.com/ce/integration/oauth_provider.html) steps to +enable this integration. + +Redirect URI should be `http://gitlab.127.0.0.1:8090/-/oauth/gitlab/callback` +which again you need to _replace `127.0.0.1` with your instance public IP._ + +Take a copy of `Application ID` and `Secret` that is generated by the GitLab +application, we will need those on _Koding Part_ of this guide. + + +#### Registering system hooks to Koding (optional) + +Koding can take actions based on the events generated by GitLab application. +This feature is still in progress and only following events are processed by +Koding at the moment; + + - user_create + - user_destroy + +All system events are handled but not implemented on Koding side. + +To enable this feature you need to provide a `URL` and a `Secret Token` to your +GitLab application. Open your admin area on your GitLab app from +[http://127.0.0.1:3000/admin/hooks](http://127.0.0.1:3000/admin/hooks) +and provide `URL` as `http://gitlab.127.0.0.1:8090/-/api/gitlab` which is the +endpoint to handle GitLab events on Koding side. Provide a `Secret Token` and +keep a copy of it, we will need it on _Koding Part_ of this guide. + +_(replace `127.0.0.1` with your instance public IP)_ + + +### Koding Part + +If you followed the steps in GitLab part we should have followings to enable +Koding part integrations; + + - `Application ID` and `Secret` for OAuth integration + - `Secret Token` for system hook integration + - Public address of running GitLab instance + + +#### Start Koding with GitLab URL + +Now we need to configure Koding with all this information to get things ready. +If it's already running please stop koding first. + +##### From command-line + +Replace followings with the ones you got from GitLab part of this guide; + +```bash +cd koding +docker-compose run \ + --service-ports backend \ + /opt/koding/scripts/bootstrap-container build \ + --host=**YOUR_IP**.xip.io \ + --gitlabHost=**GITLAB_IP** \ + --gitlabPort=**GITLAB_PORT** \ + --gitlabToken=**SECRET_TOKEN** \ + --gitlabAppId=**APPLICATION_ID** \ + --gitlabAppSecret=**SECRET** +``` + +##### By updating configuration + +Alternatively you can update `gitlab` section on +`config/credentials.default.coffee` like following; + +``` +gitlab = + host: '**GITLAB_IP**' + port: '**GITLAB_PORT**' + applicationId: '**APPLICATION_ID**' + applicationSecret: '**SECRET**' + team: 'gitlab' + redirectUri: '' + systemHookToken: '**SECRET_TOKEN**' + hooksEnabled: yes +``` + +and start by only providing the `host`; + +```bash +cd koding +docker-compose run \ + --service-ports backend \ + /opt/koding/scripts/bootstrap-container build \ + --host=**YOUR_IP**.xip.io \ +``` + +#### Enable Single Sign On + +Once you restarted your Koding and logged in with your username and password +you need to activate oauth authentication for your user. To do that + + - Navigate to Dashboard on Koding from; + `http://gitlab.**YOUR_IP**.xip.io:8090/Home/my-account` + - Scroll down to Integrations section + - Click on toggle to turn On integration in GitLab integration section + +This will redirect you to your GitLab instance and will ask your permission ( +if you are not logged in to GitLab at this point you will be redirected after +login) once you accept you will be redirected to your Koding instance. + +From now on you can login by using `SIGN IN WITH GITLAB` button on your Login +screen in your Koding instance. + +[ce-5909]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5909 diff --git a/doc/integration/img/koding_build-in-progress.png b/doc/integration/img/koding_build-in-progress.png deleted file mode 100644 index f8cc81834c4..00000000000 Binary files a/doc/integration/img/koding_build-in-progress.png and /dev/null differ diff --git a/doc/integration/img/koding_build-logs.png b/doc/integration/img/koding_build-logs.png deleted file mode 100644 index a04cd5aff99..00000000000 Binary files a/doc/integration/img/koding_build-logs.png and /dev/null differ diff --git a/doc/integration/img/koding_build-success.png b/doc/integration/img/koding_build-success.png deleted file mode 100644 index 2a0dd296480..00000000000 Binary files a/doc/integration/img/koding_build-success.png and /dev/null differ diff --git a/doc/integration/img/koding_commit-koding.yml.png b/doc/integration/img/koding_commit-koding.yml.png deleted file mode 100644 index 3e133c50327..00000000000 Binary files a/doc/integration/img/koding_commit-koding.yml.png and /dev/null differ diff --git a/doc/integration/img/koding_different-stack-on-mr-try.png b/doc/integration/img/koding_different-stack-on-mr-try.png deleted file mode 100644 index fd25e32f648..00000000000 Binary files a/doc/integration/img/koding_different-stack-on-mr-try.png and /dev/null differ diff --git a/doc/integration/img/koding_edit-on-ide.png b/doc/integration/img/koding_edit-on-ide.png deleted file mode 100644 index fd5aaff75f5..00000000000 Binary files a/doc/integration/img/koding_edit-on-ide.png and /dev/null differ diff --git a/doc/integration/img/koding_enable-koding.png b/doc/integration/img/koding_enable-koding.png deleted file mode 100644 index c0ae0ee9918..00000000000 Binary files a/doc/integration/img/koding_enable-koding.png and /dev/null differ diff --git a/doc/integration/img/koding_landing.png b/doc/integration/img/koding_landing.png deleted file mode 100644 index 7c629d9b05e..00000000000 Binary files a/doc/integration/img/koding_landing.png and /dev/null differ diff --git a/doc/integration/img/koding_open-gitlab-from-koding.png b/doc/integration/img/koding_open-gitlab-from-koding.png deleted file mode 100644 index c958cf8f224..00000000000 Binary files a/doc/integration/img/koding_open-gitlab-from-koding.png and /dev/null differ diff --git a/doc/integration/img/koding_run-in-ide.png b/doc/integration/img/koding_run-in-ide.png deleted file mode 100644 index f91ee0f74cc..00000000000 Binary files a/doc/integration/img/koding_run-in-ide.png and /dev/null differ diff --git a/doc/integration/img/koding_run-mr-in-ide.png b/doc/integration/img/koding_run-mr-in-ide.png deleted file mode 100644 index 502817a2a46..00000000000 Binary files a/doc/integration/img/koding_run-mr-in-ide.png and /dev/null differ diff --git a/doc/integration/img/koding_set-up-ide.png b/doc/integration/img/koding_set-up-ide.png deleted file mode 100644 index 7f408c980b5..00000000000 Binary files a/doc/integration/img/koding_set-up-ide.png and /dev/null differ diff --git a/doc/integration/img/koding_stack-import.png b/doc/integration/img/koding_stack-import.png deleted file mode 100644 index 2a4e3c87fc8..00000000000 Binary files a/doc/integration/img/koding_stack-import.png and /dev/null differ diff --git a/doc/integration/img/koding_start-build.png b/doc/integration/img/koding_start-build.png deleted file mode 100644 index 52159440f62..00000000000 Binary files a/doc/integration/img/koding_start-build.png and /dev/null differ diff --git a/doc/integration/koding-usage.md b/doc/integration/koding-usage.md deleted file mode 100644 index bb74badce66..00000000000 --- a/doc/integration/koding-usage.md +++ /dev/null @@ -1,122 +0,0 @@ -# Koding & GitLab - -This document will guide you through using Koding integration on GitLab in -detail. For configuring and installing please follow [this](koding.md) guide. - -You can use Koding integration to run and develop your projects on GitLab. This -will allow you and the users to test your project without leaving the browser. -Koding handles projects as stacks which are basic recipes to define your -environment for your project. With this integration you can automatically -create a proper stack template for your projects. Currently auto-generated -stack templates are designed to work with AWS which requires a valid AWS -credential to be able to use these stacks. You can find more information about -stacks and the other providers that you can use on Koding from -[here](https://www.koding.com/docs). - - -# Enable Integration - -You can enable Koding integration by providing the running Koding instance URL -in Application Settings; - - - Open **Admin area > Settings** (`/admin/application_settings`). - -![Enable Koding](help/integration/img/koding_enable-koding.png) - -Once enabled you will see `Koding` link on your sidebar which leads you to -Koding Landing page - -![Koding Landing](help/integration/img/koding_landing.png) - -You can navigate to running Koding instance from here. For more information and -details about configuring integration please follow [this](koding.md) guide. - - -# Set up Koding on Projects - -Once it's enabled, you will see some integration buttons on Project pages, -Merge Requests etc. To get started working on a specific project you first need -to create a `.koding.yml` file under your project root. You can easily do that -by using `Set Up Koding` button which will be visible on every project's -landing page; - -![Set Up Koding](help/integration/img/koding_set-up-ide.png) - -Once you click this will open a New File page on GitLab with auto-generated -`.koding.yml` content based on your server and repository configuration. - -![Commit .koding.yml](help/integration/img/koding_commit-koding.yml.png) - - -# Run a project on Koding - -If there is `.koding.yml` exists in your project root, you will see -`Run in IDE (Koding)` button in your project landing page. You can initiate the -process from here. - -![Run on Koding](help/integration/img/koding_run-in-ide.png) - -This will open Koding defined in the settings in a new window and will start -importing the project's stack file; - -![Import Stack](help/integration/img/koding_stack-import.png) - -You should see the details of your repository imported into your Koding -instance. Once it's completed it will lead you to the Stack Editor and from -there you can start using your new stack integrated with your project on your -GitLab instance. For details about what's next you can follow -[this](https://www.koding.com/docs/creating-an-aws-stack) guide from 8. step. - -Once stack initialized you will see the `README.md` content from your project -in `Stack Build` wizard, this wizard will let you to build the stack and import -your project into it. **Once it's completed it will automatically open the -related vm instead of importing from scratch** - -![Stack Building](help/integration/img/koding_start-build.png) - -This will take time depending on the required environment. - -![Stack Building in Progress](help/integration/img/koding_build-in-progress.png) - -It usually takes ~4 min. to make it ready with a `t2.nano` instance on given -AWS region. (`t2.nano` is default vm type on auto-generated stack template -which can be manually changed) - -![Stack Building Success](help/integration/img/koding_build-success.png) - -You can check out the `Build Logs` from this success modal as well; - -![Stack Build Logs](help/integration/img/koding_build-logs.png) - -You can now `Start Coding`! - -![Edit On IDE](help/integration/img/koding_edit-on-ide.png) - - -# Try a Merge Request on IDE - -It's also possible to try a change on IDE before merging it. This flow only -enabled if the target project has `.koding.yml` in it's target branch. You -should see the alternative version of `Run in IDE (Koding)` button in merge -request pages as well; - -![Run in IDE on MR](help/integration/img/koding_run-mr-in-ide.png) - -This will again take you to Koding with proper arguments passed, which will -allow Koding to modify the stack template provided by target branch. You can -see the difference; - -![Different Branch for MR](help/integration/img/koding_different-stack-on-mr-try.png) - -The flow for the branch stack is also same with the regular project flow. - - -# Open GitLab from Koding - -Since stacks generated with import flow defined in previous steps, they have -information about the repository they are belonging to. By using this -information you can access to related GitLab page from stacks on your sidebar -on Koding. - -![Open GitLab from Koding](help/integration/img/koding_open-gitlab-from-koding.png) - diff --git a/doc/integration/koding.md b/doc/integration/koding.md deleted file mode 100644 index 53450b6d048..00000000000 --- a/doc/integration/koding.md +++ /dev/null @@ -1,239 +0,0 @@ -# Koding & GitLab - -This document will guide you through installing and configuring Koding with -GitLab. - -First of all, to be able to use Koding and GitLab together you will need public -access to your server. This allows you to use single sign-on from GitLab to -Koding and using vms from cloud providers like AWS. Koding has a registry for -VMs, called Kontrol and it runs on the same server as Koding itself, VMs from -cloud providers register themselves to Kontrol via the agent that we put into -provisioned VMs. This agent is called Klient and it provides Koding to access -and manage the target machine. - -Kontrol and Klient are based on another technology called -[Kite](github.com/koding/kite), that we have written at Koding. Which is a -microservice framework that allows you to develop microservices easily. - - -## Requirements - -### Hardware - -Minimum requirements are; - - - 2 cores CPU - - 3G RAM - - 10G Storage - -If you plan to use AWS to install Koding it is recommended that you use at -least a `c3.xlarge` instance. - -### Software - - - [git](https://git-scm.com) - - [docker](https://www.docker.com) - - [docker-compose](https://www.docker.com/products/docker-compose) - -Koding can run on most of the UNIX based operating systems, since it's shipped -as containerized with Docker support, it can work on any operating system that -supports Docker. - -Required services are; - - - PostgreSQL # Kontrol and Service DB provider - - MongoDB # Main DB provider the application - - Redis # In memory DB used by both application and services - - RabbitMQ # Message Queue for both application and services - -which are also provided as a Docker container by Koding. - - -## Getting Started with Development Versions - - -### Koding - -You can run `docker-compose` environment for developing koding by -executing commands in the following snippet. - -```bash -git clone https://github.com/koding/koding.git -cd koding -docker-compose up -``` - -This should start koding on `localhost:8090`. - -By default there is no team exists in Koding DB. You'll need to create a team -called `gitlab` which is the default team name for GitLab integration in the -configuration. To make things in order it's recommended to create the `gitlab` -team first thing after setting up Koding. - - -### GitLab - -To install GitLab to your environment for development purposes it's recommended -to use GitLab Development Kit which you can get it from -[here](https://gitlab.com/gitlab-org/gitlab-development-kit). - -After all those steps, gitlab should be running on `localhost:3000` - - -## Integration - -Integration includes following components; - - - Single Sign On with OAuth from GitLab to Koding - - System Hook integration for handling GitLab events on Koding - (`project_created`, `user_joined` etc.) - - Service endpoints for importing/executing stacks from GitLab to Koding - (`Run/Try on IDE (Koding)` buttons on GitLab Projects, Issues, MRs) - -As it's pointed out before, you will need public access to this machine that -you've installed Koding and GitLab on. Better to use a domain but a static IP -is also fine. - -For IP based installation you can use [xip.io](https://xip.io) service which is -free and provides DNS resolution to IP based requests like following; - - - 127.0.0.1.xip.io -> resolves to 127.0.0.1 - - foo.bar.baz.127.0.0.1.xip.io -> resolves to 127.0.0.1 - - and so on... - -As Koding needs subdomains for team names; `foo.127.0.0.1.xip.io` requests for -a running koding instance on `127.0.0.1` server will be handled as `foo` team -requests. - - -### GitLab Side - -You need to enable Koding integration from Settings under Admin Area. To do -that login with an Admin account and do followings; - - - open [http://127.0.0.1:3000/admin/application_settings](http://127.0.0.1:3000/admin/application_settings) - - scroll to bottom of the page until Koding section - - check `Enable Koding` checkbox - - provide GitLab team page for running Koding instance as `Koding URL`* - -* For `Koding URL` you need to provide the gitlab integration enabled team on -your Koding installation. Team called `gitlab` has integration on Koding out -of the box, so if you didn't change anything your team on Koding should be -`gitlab`. - -So, if your Koding is running on `http://1.2.3.4.xip.io:8090` your URL needs -to be `http://gitlab.1.2.3.4.xip.io:8090`. You need to provide the same host -with your Koding installation here. - - -#### Registering Koding for OAuth integration - -We need `Application ID` and `Secret` to enable login to Koding via GitLab -feature and to do that you need to register running Koding as a new application -to your running GitLab application. Follow -[these](http://docs.gitlab.com/ce/integration/oauth_provider.html) steps to -enable this integration. - -Redirect URI should be `http://gitlab.127.0.0.1:8090/-/oauth/gitlab/callback` -which again you need to _replace `127.0.0.1` with your instance public IP._ - -Take a copy of `Application ID` and `Secret` that is generated by the GitLab -application, we will need those on _Koding Part_ of this guide. - - -#### Registering system hooks to Koding (optional) - -Koding can take actions based on the events generated by GitLab application. -This feature is still in progress and only following events are processed by -Koding at the moment; - - - user_create - - user_destroy - -All system events are handled but not implemented on Koding side. - -To enable this feature you need to provide a `URL` and a `Secret Token` to your -GitLab application. Open your admin area on your GitLab app from -[http://127.0.0.1:3000/admin/hooks](http://127.0.0.1:3000/admin/hooks) -and provide `URL` as `http://gitlab.127.0.0.1:8090/-/api/gitlab` which is the -endpoint to handle GitLab events on Koding side. Provide a `Secret Token` and -keep a copy of it, we will need it on _Koding Part_ of this guide. - -_(replace `127.0.0.1` with your instance public IP)_ - - -### Koding Part - -If you followed the steps in GitLab part we should have followings to enable -Koding part integrations; - - - `Application ID` and `Secret` for OAuth integration - - `Secret Token` for system hook integration - - Public address of running GitLab instance - - -#### Start Koding with GitLab URL - -Now we need to configure Koding with all this information to get things ready. -If it's already running please stop koding first. - -##### From command-line - -Replace followings with the ones you got from GitLab part of this guide; - -```bash -cd koding -docker-compose run \ - --service-ports backend \ - /opt/koding/scripts/bootstrap-container build \ - --host=**YOUR_IP**.xip.io \ - --gitlabHost=**GITLAB_IP** \ - --gitlabPort=**GITLAB_PORT** \ - --gitlabToken=**SECRET_TOKEN** \ - --gitlabAppId=**APPLICATION_ID** \ - --gitlabAppSecret=**SECRET** -``` - -##### By updating configuration - -Alternatively you can update `gitlab` section on -`config/credentials.default.coffee` like following; - -``` -gitlab = - host: '**GITLAB_IP**' - port: '**GITLAB_PORT**' - applicationId: '**APPLICATION_ID**' - applicationSecret: '**SECRET**' - team: 'gitlab' - redirectUri: '' - systemHookToken: '**SECRET_TOKEN**' - hooksEnabled: yes -``` - -and start by only providing the `host`; - -```bash -cd koding -docker-compose run \ - --service-ports backend \ - /opt/koding/scripts/bootstrap-container build \ - --host=**YOUR_IP**.xip.io \ -``` - -#### Enable Single Sign On - -Once you restarted your Koding and logged in with your username and password -you need to activate oauth authentication for your user. To do that - - - Navigate to Dashboard on Koding from; - `http://gitlab.**YOUR_IP**.xip.io:8090/Home/my-account` - - Scroll down to Integrations section - - Click on toggle to turn On integration in GitLab integration section - -This will redirect you to your GitLab instance and will ask your permission ( -if you are not logged in to GitLab at this point you will be redirected after -login) once you accept you will be redirected to your Koding instance. - -From now on you can login by using `SIGN IN WITH GITLAB` button on your Login -screen in your Koding instance. diff --git a/doc/user/project/img/koding_build-in-progress.png b/doc/user/project/img/koding_build-in-progress.png new file mode 100644 index 00000000000..f8cc81834c4 Binary files /dev/null and b/doc/user/project/img/koding_build-in-progress.png differ diff --git a/doc/user/project/img/koding_build-logs.png b/doc/user/project/img/koding_build-logs.png new file mode 100644 index 00000000000..a04cd5aff99 Binary files /dev/null and b/doc/user/project/img/koding_build-logs.png differ diff --git a/doc/user/project/img/koding_build-success.png b/doc/user/project/img/koding_build-success.png new file mode 100644 index 00000000000..2a0dd296480 Binary files /dev/null and b/doc/user/project/img/koding_build-success.png differ diff --git a/doc/user/project/img/koding_commit-koding.yml.png b/doc/user/project/img/koding_commit-koding.yml.png new file mode 100644 index 00000000000..3e133c50327 Binary files /dev/null and b/doc/user/project/img/koding_commit-koding.yml.png differ diff --git a/doc/user/project/img/koding_different-stack-on-mr-try.png b/doc/user/project/img/koding_different-stack-on-mr-try.png new file mode 100644 index 00000000000..fd25e32f648 Binary files /dev/null and b/doc/user/project/img/koding_different-stack-on-mr-try.png differ diff --git a/doc/user/project/img/koding_edit-on-ide.png b/doc/user/project/img/koding_edit-on-ide.png new file mode 100644 index 00000000000..fd5aaff75f5 Binary files /dev/null and b/doc/user/project/img/koding_edit-on-ide.png differ diff --git a/doc/user/project/img/koding_enable-koding.png b/doc/user/project/img/koding_enable-koding.png new file mode 100644 index 00000000000..c0ae0ee9918 Binary files /dev/null and b/doc/user/project/img/koding_enable-koding.png differ diff --git a/doc/user/project/img/koding_landing.png b/doc/user/project/img/koding_landing.png new file mode 100644 index 00000000000..7c629d9b05e Binary files /dev/null and b/doc/user/project/img/koding_landing.png differ diff --git a/doc/user/project/img/koding_open-gitlab-from-koding.png b/doc/user/project/img/koding_open-gitlab-from-koding.png new file mode 100644 index 00000000000..c958cf8f224 Binary files /dev/null and b/doc/user/project/img/koding_open-gitlab-from-koding.png differ diff --git a/doc/user/project/img/koding_run-in-ide.png b/doc/user/project/img/koding_run-in-ide.png new file mode 100644 index 00000000000..f91ee0f74cc Binary files /dev/null and b/doc/user/project/img/koding_run-in-ide.png differ diff --git a/doc/user/project/img/koding_run-mr-in-ide.png b/doc/user/project/img/koding_run-mr-in-ide.png new file mode 100644 index 00000000000..502817a2a46 Binary files /dev/null and b/doc/user/project/img/koding_run-mr-in-ide.png differ diff --git a/doc/user/project/img/koding_set-up-ide.png b/doc/user/project/img/koding_set-up-ide.png new file mode 100644 index 00000000000..7f408c980b5 Binary files /dev/null and b/doc/user/project/img/koding_set-up-ide.png differ diff --git a/doc/user/project/img/koding_stack-import.png b/doc/user/project/img/koding_stack-import.png new file mode 100644 index 00000000000..2a4e3c87fc8 Binary files /dev/null and b/doc/user/project/img/koding_stack-import.png differ diff --git a/doc/user/project/img/koding_start-build.png b/doc/user/project/img/koding_start-build.png new file mode 100644 index 00000000000..52159440f62 Binary files /dev/null and b/doc/user/project/img/koding_start-build.png differ diff --git a/doc/user/project/koding.md b/doc/user/project/koding.md new file mode 100644 index 00000000000..e54587fab68 --- /dev/null +++ b/doc/user/project/koding.md @@ -0,0 +1,128 @@ +# Koding & GitLab + +> [Introduced][ce-5909] in GitLab 8.11. + +This document will guide you through using Koding integration on GitLab in +detail. For configuring and installing please follow the +[administrator guide](../../administration/integration/koding.md). + +You can use Koding integration to run and develop your projects on GitLab. This +will allow you and the users to test your project without leaving the browser. +Koding handles projects as stacks which are basic recipes to define your +environment for your project. With this integration you can automatically +create a proper stack template for your projects. Currently auto-generated +stack templates are designed to work with AWS which requires a valid AWS +credential to be able to use these stacks. You can find more information about +stacks and the other providers that you can use on Koding following the +[Koding documentation][koding-docs]. + +## Enable Integration + +You can enable Koding integration by providing the running Koding instance URL +in Application Settings under **Admin area > Settings** (`/admin/application_settings`). + +![Enable Koding](img/koding_enable-koding.png) + +Once enabled you will see `Koding` link on your sidebar which leads you to +Koding Landing page. + +![Koding Landing](img/koding_landing.png) + +You can navigate to running Koding instance from here. For more information and +details about configuring the integration, please follow the +[administrator guide](../../administration/integration/koding.md). + +## Set up Koding on Projects + +Once it's enabled, you will see some integration buttons on Project pages, +Merge Requests etc. To get started working on a specific project you first need +to create a `.koding.yml` file under your project root. You can easily do that +by using `Set Up Koding` button which will be visible on every project's +landing page; + +![Set Up Koding](img/koding_set-up-ide.png) + +Once you click this will open a New File page on GitLab with auto-generated +`.koding.yml` content based on your server and repository configuration. + +![Commit .koding.yml](img/koding_commit-koding.yml.png) + + +## Run a project on Koding + +If there is `.koding.yml` exists in your project root, you will see +`Run in IDE (Koding)` button in your project landing page. You can initiate the +process from here. + +![Run on Koding](img/koding_run-in-ide.png) + +This will open Koding defined in the settings in a new window and will start +importing the project's stack file. + +![Import Stack](img/koding_stack-import.png) + +You should see the details of your repository imported into your Koding +instance. Once it's completed it will lead you to the Stack Editor and from +there you can start using your new stack integrated with your project on your +GitLab instance. For details about what's next you can follow +[this guide](https://www.koding.com/docs/creating-an-aws-stack) from step 8. + +Once stack initialized you will see the `README.md` content from your project +in `Stack Build` wizard, this wizard will let you to build the stack and import +your project into it. **Once it's completed it will automatically open the +related vm instead of importing from scratch**. + +![Stack Building](img/koding_start-build.png) + +This will take time depending on the required environment. + +![Stack Building in Progress](img/koding_build-in-progress.png) + +It usually takes ~4 min. to make it ready with a `t2.nano` instance on given +AWS region. (`t2.nano` is default vm type on auto-generated stack template +which can be manually changed). + +![Stack Building Success](img/koding_build-success.png) + +You can check out the `Build Logs` from this success modal as well. + +![Stack Build Logs](img/koding_build-logs.png) + +You can now `Start Coding`! + +![Edit On IDE](img/koding_edit-on-ide.png) + +## Try a Merge Request on IDE + +It's also possible to try a change on IDE before merging it. This flow only +enabled if the target project has `.koding.yml` in it's target branch. You +should see the alternative version of `Run in IDE (Koding)` button in merge +request pages as well; + +![Run in IDE on MR](img/koding_run-mr-in-ide.png) + +This will again take you to Koding with proper arguments passed, which will +allow Koding to modify the stack template provided by target branch. You can +see the difference; + +![Different Branch for MR](img/koding_different-stack-on-mr-try.png) + +The flow for the branch stack is also same with the regular project flow. + +## Open GitLab from Koding + +Since stacks generated with import flow defined in previous steps, they have +information about the repository they are belonging to. By using this +information you can access to related GitLab page from stacks on your sidebar +on Koding. + +![Open GitLab from Koding](img/koding_open-gitlab-from-koding.png) + +## Other links + +- [YouTube video on GitLab + Koding workflow][youtube] +- [Koding documentation][koding-docs] + +[ce-5909]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5909 +[youtube]: https://youtu.be/3wei5yv_Ye8 +[koding-docs]: https://www.koding.com/docs -- cgit v1.2.1 From 21ddda75ac739a89565a2334fdfd77ed104d2fbe Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 22 Aug 2016 10:00:01 -0600 Subject: Add Ruby 2.3 upgrade notes. --- doc/update/8.10-to-8.11.md | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index 253fff50bdd..d423d6131b2 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -20,7 +20,31 @@ cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production ``` -### 3. Get latest code +### 3. Update Ruby + +If you are you running Ruby 2.1.x, you do not _need_ to upgrade Ruby yet, but you should note that support for 2.1.x is deprecated and we will require 2.3.x in 8.13. It's strongly recommended that you upgrade as soon as possible. + +You can check which version you are running with `ruby -v`. + +Download and compile Ruby: + +``bash +mkdir /tmp/ruby && cd /tmp/ruby +curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz +echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum -c - && tar xzf ruby-2.3.1.tar.gz +cd ruby-2.3.1 +./configure --disable-install-rdoc +make +sudo make install +`` + +Install Bundler: + +``bash +sudo gem install bundler --no-ri --no-rdoc +`` + +### 4. Get latest code ```bash sudo -u git -H git fetch --all @@ -41,7 +65,7 @@ For GitLab Enterprise Edition: sudo -u git -H git checkout 8-11-stable-ee ``` -### 4. Update gitlab-shell +### 5. Update gitlab-shell ```bash cd /home/git/gitlab-shell @@ -49,7 +73,7 @@ sudo -u git -H git fetch --all --tags sudo -u git -H git checkout v3.4.0 ``` -### 5. Update gitlab-workhorse +### 6. Update gitlab-workhorse Install and compile gitlab-workhorse. This requires [Go 1.5](https://golang.org/dl) which should already be on your system from @@ -62,7 +86,7 @@ sudo -u git -H git checkout v0.7.8 sudo -u git -H make ``` -### 6. Install libs, migrations, etc. +### 7. Install libs, migrations, etc. ```bash cd /home/git/gitlab @@ -84,7 +108,7 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS ``` -### 7. Update configuration files +### 8. Update configuration files #### New configuration options for `gitlab.yml` @@ -133,12 +157,12 @@ Ensure you're still up-to-date with the latest init script changes: sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab -### 8. Start application +### 9. Start application sudo service gitlab start sudo service nginx restart -### 9. Check application status +### 10. Check application status Check if GitLab and its environment are configured correctly: -- cgit v1.2.1 From dc743a6e1f15c9a17411d2a18e89df30871272a7 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Mon, 22 Aug 2016 10:26:23 -0600 Subject: Appease the linter. --- doc/update/8.10-to-8.11.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index d423d6131b2..1c849ad59a9 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -30,8 +30,8 @@ Download and compile Ruby: ``bash mkdir /tmp/ruby && cd /tmp/ruby -curl -O --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz -echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum -c - && tar xzf ruby-2.3.1.tar.gz +curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz +echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum --check - && tar xzf ruby-2.3.1.tar.gz cd ruby-2.3.1 ./configure --disable-install-rdoc make -- cgit v1.2.1 From b36b885cfd6cc931e701812492d51986797714b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=A1vila=20Santos?= Date: Mon, 22 Aug 2016 18:05:13 +0000 Subject: Fix for update 8.10-to-8.11.md doc. --- doc/update/8.10-to-8.11.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index 1c849ad59a9..98721763566 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -28,7 +28,7 @@ You can check which version you are running with `ruby -v`. Download and compile Ruby: -``bash +```bash mkdir /tmp/ruby && cd /tmp/ruby curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum --check - && tar xzf ruby-2.3.1.tar.gz @@ -36,13 +36,13 @@ cd ruby-2.3.1 ./configure --disable-install-rdoc make sudo make install -`` +``` Install Bundler: -``bash +```bash sudo gem install bundler --no-ri --no-rdoc -`` +``` ### 4. Get latest code -- cgit v1.2.1 From eff3c35410e97d4238ef93816e5164884c8b1369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Mon, 22 Aug 2016 19:57:43 +0000 Subject: Update merge_requests.md with a simpler way to check out a merge request The previous way was put under the "By modifying `.git/config` for a given repository" section. The disadvantage is that one has to modify `.git/config` for each repository that one uses. The new way was put under the "By adding a git alias" section. One has to create this git alias once, and then it will work from any repository, without having to modify `.git/config` over and over again. --- doc/workflow/merge_requests.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/workflow/merge_requests.md b/doc/workflow/merge_requests.md index d2ec56e6504..12ffa916a8f 100644 --- a/doc/workflow/merge_requests.md +++ b/doc/workflow/merge_requests.md @@ -15,6 +15,21 @@ Please note that you need to have builds configured to enable this feature. ## Checkout merge requests locally +### By adding a git alias + +Add the following alias to your `~/.gitconfig`: +``` +[alias] + mr = !sh -c 'git fetch origin merge-requests/$1/head:mr-$1 && git checkout mr-$1' - +``` +Now you can check out a particular merge request from any repository (it will use the `origin` remote) by: +``` +$ git mr 5 +``` +This will fetch the merge request into a local `mr-5` branch and check it out. + +### By modifying `.git/config` for a given repository + Locate the section for your GitLab remote in the `.git/config` file. It looks like this: ``` -- cgit v1.2.1 From 453bf1543e56638117dd73f952be7f7fda285dee Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 20 Aug 2016 09:04:37 +0000 Subject: Fix typo in gitlab_flow.md --- doc/workflow/gitlab_flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/workflow/gitlab_flow.md b/doc/workflow/gitlab_flow.md index 2b2f140f8bf..8119324bb62 100644 --- a/doc/workflow/gitlab_flow.md +++ b/doc/workflow/gitlab_flow.md @@ -89,7 +89,7 @@ In this case the master branch is deployed on staging. When someone wants to dep And going live with code happens by merging the pre-production branch into the production branch. This workflow where commits only flow downstream ensures that everything has been tested on all environments. If you need to cherry-pick a commit with a hotfix it is common to develop it on a feature branch and merge it into master with a merge request, do not delete the feature branch. -If master is good to go (it should be if you a practicing [continuous delivery](http://martinfowler.com/bliki/ContinuousDelivery.html)) you then merge it to the other branches. +If master is good to go (it should be if you are practicing [continuous delivery](http://martinfowler.com/bliki/ContinuousDelivery.html)) you then merge it to the other branches. If this is not possible because more manual testing is required you can send merge requests from the feature branch to the downstream branches. An 'extreme' version of environment branches are setting up an environment for each feature branch as done by [Teatro](https://teatro.io/). -- cgit v1.2.1 From 251ded248dcda8c7a552e52ddb2582ad961e4bc0 Mon Sep 17 00:00:00 2001 From: Sebastiaan Lokhorst Date: Tue, 23 Aug 2016 17:33:59 +0000 Subject: Update Ruby version to 2.3 in Requirements --- doc/install/requirements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index a65ac8a5f79..571f1a38358 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -32,7 +32,7 @@ Please consider using a virtual machine to run GitLab. ## Ruby versions -GitLab requires Ruby (MRI) 2.1.x and currently does not work with versions 2.2 or 2.3. +GitLab requires Ruby (MRI) 2.3. Support for Ruby versions below 2.3 (2.1, 2.2) will stop with GitLab 8.13. You will have to use the standard MRI implementation of Ruby. We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/) but GitLab -- cgit v1.2.1 From d1ed0c76ec7e9ef4ec1ccff2756433997b3a2397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 23 Aug 2016 13:02:16 -0600 Subject: Add new lines after backticks and colons --- doc/workflow/merge_requests.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/workflow/merge_requests.md b/doc/workflow/merge_requests.md index 12ffa916a8f..adee26f0fe9 100644 --- a/doc/workflow/merge_requests.md +++ b/doc/workflow/merge_requests.md @@ -18,14 +18,18 @@ Please note that you need to have builds configured to enable this feature. ### By adding a git alias Add the following alias to your `~/.gitconfig`: + ``` [alias] mr = !sh -c 'git fetch origin merge-requests/$1/head:mr-$1 && git checkout mr-$1' - ``` + Now you can check out a particular merge request from any repository (it will use the `origin` remote) by: + ``` $ git mr 5 ``` + This will fetch the merge request into a local `mr-5` branch and check it out. ### By modifying `.git/config` for a given repository -- cgit v1.2.1 From a7bd1c23dd03f00d10b0ff4db655690283e2f88a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Tue, 23 Aug 2016 13:05:34 -0600 Subject: Modify the alias to allow specifying a remote Now the alias should be used as: git mr upstream 5 To check out a MR number 5 from the upstream remote, into a `mr-upstream-5` local branch. Also clarify that the `5` in the merge request is the number shown in GitLab. --- doc/workflow/merge_requests.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/workflow/merge_requests.md b/doc/workflow/merge_requests.md index adee26f0fe9..91fcfb02d39 100644 --- a/doc/workflow/merge_requests.md +++ b/doc/workflow/merge_requests.md @@ -21,16 +21,16 @@ Add the following alias to your `~/.gitconfig`: ``` [alias] - mr = !sh -c 'git fetch origin merge-requests/$1/head:mr-$1 && git checkout mr-$1' - + mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - ``` -Now you can check out a particular merge request from any repository (it will use the `origin` remote) by: +Now you can check out a particular merge request from any repository and any remote, e.g. to check out a merge request number 5 as shown in GitLab from the `upstream` remote, do: ``` -$ git mr 5 +$ git mr upstream 5 ``` -This will fetch the merge request into a local `mr-5` branch and check it out. +This will fetch the merge request into a local `mr-upstream-5` branch and check it out. ### By modifying `.git/config` for a given repository -- cgit v1.2.1 From 31b2c1ef880349c9579f41e501de0346e59f0a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Dequ=C3=A8nes=20=28Duck=29?= Date: Mon, 22 Aug 2016 12:47:58 +0900 Subject: expose 'only_allow_merge_if_build_succeeds' project setting in the API --- doc/api/projects.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 37d97b2db44..fe3c38750d6 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -84,7 +84,8 @@ Parameters: "star_count": 0, "runners_token": "b8547b1dc37721d05889db52fa2f02", "public_builds": true, - "shared_with_groups": [] + "shared_with_groups": [], + "only_allow_merge_if_build_succeeds": false }, { "id": 6, @@ -144,7 +145,8 @@ Parameters: "star_count": 0, "runners_token": "b8547b1dc37721d05889db52fa2f02", "public_builds": true, - "shared_with_groups": [] + "shared_with_groups": [], + "only_allow_merge_if_build_succeeds": false } ] ``` @@ -280,7 +282,8 @@ Parameters: "group_name": "Gitlab Org", "group_access_level": 10 } - ] + ], + "only_allow_merge_if_build_succeeds": false } ``` @@ -448,6 +451,7 @@ Parameters: - `visibility_level` (optional) - `import_url` (optional) - `public_builds` (optional) +- `only_allow_merge_if_build_succeeds` (optional) ### Create project for user @@ -473,6 +477,7 @@ Parameters: - `visibility_level` (optional) - `import_url` (optional) - `public_builds` (optional) +- `only_allow_merge_if_build_succeeds` (optional) ### Edit project @@ -499,6 +504,7 @@ Parameters: - `public` (optional) - if `true` same as setting visibility_level = 20 - `visibility_level` (optional) - `public_builds` (optional) +- `only_allow_merge_if_build_succeeds` (optional) On success, method returns 200 with the updated project. If parameters are invalid, 400 is returned. @@ -577,7 +583,8 @@ Example response: "forks_count": 0, "star_count": 1, "public_builds": true, - "shared_with_groups": [] + "shared_with_groups": [], + "only_allow_merge_if_build_succeeds": false } ``` @@ -643,7 +650,8 @@ Example response: "forks_count": 0, "star_count": 0, "public_builds": true, - "shared_with_groups": [] + "shared_with_groups": [], + "only_allow_merge_if_build_succeeds": false } ``` @@ -729,7 +737,8 @@ Example response: "star_count": 0, "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b", "public_builds": true, - "shared_with_groups": [] + "shared_with_groups": [], + "only_allow_merge_if_build_succeeds": false } ``` @@ -815,7 +824,8 @@ Example response: "star_count": 0, "runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b", "public_builds": true, - "shared_with_groups": [] + "shared_with_groups": [], + "only_allow_merge_if_build_succeeds": false } ``` -- cgit v1.2.1 From 3ae4e1ebf7826340d0a4a15e350c614b6223f06f Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 24 Aug 2016 15:50:24 +0200 Subject: Use gitlab-workhorse 0.7.11 Versions 0.7.9 and 0.7.10 crash on previously valid 'authBackend' settings. --- doc/install/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index b0ec9b4a961..d4b89fa8345 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -397,7 +397,7 @@ If you are not using Linux you may have to run `gmake` instead of cd /home/git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git cd gitlab-workhorse - sudo -u git -H git checkout v0.7.10 + sudo -u git -H git checkout v0.7.11 sudo -u git -H make ### Initialize Database and Activate Advanced Features -- cgit v1.2.1 From ae4efc8d5e6a195452f0ecf550198575c63a49b9 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 23 Aug 2016 13:56:21 -0400 Subject: docs: update created_at docs for creating issues via API See also #19863. Fixes #18458. --- doc/api/issues.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index a665645ad0e..ff8038c78d1 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -323,7 +323,7 @@ POST /projects/:id/issues | `assignee_id` | integer | no | The ID of a user to assign issue | | `milestone_id` | integer | no | The ID of a milestone to assign issue | | `labels` | string | no | Comma-separated label names for an issue | -| `created_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` | +| `created_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` (requires admin or project owner rights) | | `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` | ```bash @@ -384,7 +384,7 @@ PUT /projects/:id/issues/:issue_id | `milestone_id` | integer | no | The ID of a milestone to assign the issue to | | `labels` | string | no | Comma-separated label names for an issue | | `state_event` | string | no | The state event of an issue. Set `close` to close the issue and `reopen` to reopen it | -| `updated_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` | +| `updated_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` (requires admin or project owner rights) | | `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` | ```bash -- cgit v1.2.1 From a5f3bdc5c862944f755f1e61bf965a54e0a6d95d Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 23 Aug 2016 13:57:34 -0400 Subject: docs: fix table alignment --- doc/api/issues.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index ff8038c78d1..443ba50af73 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -324,7 +324,7 @@ POST /projects/:id/issues | `milestone_id` | integer | no | The ID of a milestone to assign issue | | `labels` | string | no | Comma-separated label names for an issue | | `created_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` (requires admin or project owner rights) | -| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` | +| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` | ```bash curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues?title=Issues%20with%20auth&labels=bug @@ -385,7 +385,7 @@ PUT /projects/:id/issues/:issue_id | `labels` | string | no | Comma-separated label names for an issue | | `state_event` | string | no | The state event of an issue. Set `close` to close the issue and `reopen` to reopen it | | `updated_at` | string | no | Date time string, ISO 8601 formatted, e.g. `2016-03-11T03:45:40Z` (requires admin or project owner rights) | -| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` | +| `due_date` | string | no | Date time string in the format YEAR-MONTH-DAY, e.g. `2016-03-11` | ```bash curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85?state_event=close -- cgit v1.2.1 From e43c4060b67c1996b917bc00afa72122d1d00004 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 2 Aug 2016 13:37:04 -0400 Subject: api: expose web_url for project entities This allows web hooks to have a URL back to entities without having to generate it themselves. --- doc/api/issues.md | 31 +++++++++++++++++++++---------- doc/api/merge_requests.md | 22 +++++++++++++++------- doc/api/project_snippets.md | 3 ++- 3 files changed, 38 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index a665645ad0e..b5730574308 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -79,7 +79,8 @@ Example response: "labels" : [], "subscribed" : false, "user_notes_count": 1, - "due_date": "2016-07-22" + "due_date": "2016-07-22", + "web_url": "http://example.com/example/example/issues/6" } ] ``` @@ -156,7 +157,8 @@ Example response: "created_at" : "2016-01-04T15:31:46.176Z", "subscribed" : false, "user_notes_count": 1, - "due_date": null + "due_date": null, + "web_url": "http://example.com/example/example/issues/1" } ] ``` @@ -235,7 +237,8 @@ Example response: "created_at" : "2016-01-04T15:31:46.176Z", "subscribed" : false, "user_notes_count": 1, - "due_date": "2016-07-22" + "due_date": "2016-07-22", + "web_url": "http://example.com/example/example/issues/1" } ] ``` @@ -299,7 +302,8 @@ Example response: "created_at" : "2016-01-04T15:31:46.176Z", "subscribed": false, "user_notes_count": 1, - "due_date": null + "due_date": null, + "web_url": "http://example.com/example/example/issues/1" } ``` @@ -357,7 +361,8 @@ Example response: "milestone" : null, "subscribed" : true, "user_notes_count": 0, - "due_date": null + "due_date": null, + "web_url": "http://example.com/example/example/issues/14" } ``` @@ -418,7 +423,8 @@ Example response: "milestone" : null, "subscribed" : true, "user_notes_count": 0, - "due_date": "2016-07-22" + "due_date": "2016-07-22", + "web_url": "http://example.com/example/example/issues/15" } ``` @@ -496,7 +502,8 @@ Example response: "avatar_url": "http://www.gravatar.com/avatar/7a190fecbaa68212a4b68aeb6e3acd10?s=80&d=identicon", "web_url": "https://gitlab.example.com/u/solon.cremin" }, - "due_date": null + "due_date": null, + "web_url": "http://example.com/example/example/issues/11" } ``` @@ -551,7 +558,8 @@ Example response: "avatar_url": "http://www.gravatar.com/avatar/7a190fecbaa68212a4b68aeb6e3acd10?s=80&d=identicon", "web_url": "https://gitlab.example.com/u/solon.cremin" }, - "due_date": null + "due_date": null, + "web_url": "http://example.com/example/example/issues/11" } ``` @@ -607,7 +615,8 @@ Example response: "web_url": "https://gitlab.example.com/u/orville" }, "subscribed": false, - "due_date": null + "due_date": null, + "web_url": "http://example.com/example/example/issues/12" } ``` @@ -693,7 +702,9 @@ Example response: "subscribed": true, "user_notes_count": 7, "upvotes": 0, - "downvotes": 0 + "downvotes": 0, + "due_date": null, + "web_url": "http://example.com/example/example/issues/110" }, "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ci/issues/10", "body": "Vel voluptas atque dicta mollitia adipisci qui at.", diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 3e88a758936..f275762da3e 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -70,7 +70,8 @@ Parameters: "subscribed" : false, "user_notes_count": 1, "should_remove_source_branch": true, - "force_remove_source_branch": false + "force_remove_source_branch": false, + "web_url": "http://example.com/example/example/merge_requests/1" } ] ``` @@ -136,7 +137,8 @@ Parameters: "subscribed" : true, "user_notes_count": 1, "should_remove_source_branch": true, - "force_remove_source_branch": false + "force_remove_source_branch": false, + "web_url": "http://example.com/example/example/merge_requests/1" } ``` @@ -239,6 +241,7 @@ Parameters: "user_notes_count": 1, "should_remove_source_branch": true, "force_remove_source_branch": false, + "web_url": "http://example.com/example/example/merge_requests/1", "changes": [ { "old_path": "VERSION", @@ -321,7 +324,8 @@ Parameters: "subscribed" : true, "user_notes_count": 0, "should_remove_source_branch": true, - "force_remove_source_branch": false + "force_remove_source_branch": false, + "web_url": "http://example.com/example/example/merge_requests/1" } ``` @@ -395,7 +399,8 @@ Parameters: "subscribed" : true, "user_notes_count": 1, "should_remove_source_branch": true, - "force_remove_source_branch": false + "force_remove_source_branch": false, + "web_url": "http://example.com/example/example/merge_requests/1" } ``` @@ -496,7 +501,8 @@ Parameters: "subscribed" : true, "user_notes_count": 1, "should_remove_source_branch": true, - "force_remove_source_branch": false + "force_remove_source_branch": false, + "web_url": "http://example.com/example/example/merge_requests/1" } ``` @@ -565,7 +571,8 @@ Parameters: "subscribed" : true, "user_notes_count": 1, "should_remove_source_branch": true, - "force_remove_source_branch": false + "force_remove_source_branch": false, + "web_url": "http://example.com/example/example/merge_requests/1" } ``` @@ -886,7 +893,8 @@ Example response: "subscribed": true, "user_notes_count": 7, "should_remove_source_branch": true, - "force_remove_source_branch": false + "force_remove_source_branch": false, + "web_url": "http://example.com/example/example/merge_requests/1" }, "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ci/merge_requests/7", "body": "Et voluptas laudantium minus nihil recusandae ut accusamus earum aut non.", diff --git a/doc/api/project_snippets.md b/doc/api/project_snippets.md index a7acf37b5bc..c6685f54a9d 100644 --- a/doc/api/project_snippets.md +++ b/doc/api/project_snippets.md @@ -53,7 +53,8 @@ Parameters: }, "expires_at": null, "updated_at": "2012-06-28T10:52:04Z", - "created_at": "2012-06-28T10:52:04Z" + "created_at": "2012-06-28T10:52:04Z", + "web_url": "http://example.com/example/example/snippets/1" } ``` -- cgit v1.2.1 From f413d7ed8014601497834e5093a1892dd616875b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 23 Aug 2016 14:51:05 -0400 Subject: docs: document other project webhook fields --- doc/api/projects.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 37d97b2db44..0905bdea714 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -914,7 +914,10 @@ Parameters: "push_events": true, "issues_events": true, "merge_requests_events": true, + "tag_push_events": true, "note_events": true, + "build_events": true, + "pipeline_events": true, "enable_ssl_verification": true, "created_at": "2012-10-12T17:04:47Z" } @@ -937,6 +940,8 @@ Parameters: - `merge_requests_events` - Trigger hook on merge_requests events - `tag_push_events` - Trigger hook on push_tag events - `note_events` - Trigger hook on note events +- `build_events` - Trigger hook on build events +- `pipeline_events` - Trigger hook on pipeline events - `enable_ssl_verification` - Do SSL verification when triggering the hook ### Edit project hook @@ -957,6 +962,8 @@ Parameters: - `merge_requests_events` - Trigger hook on merge_requests events - `tag_push_events` - Trigger hook on push_tag events - `note_events` - Trigger hook on note events +- `build_events` - Trigger hook on build events +- `pipeline_events` - Trigger hook on pipeline events - `enable_ssl_verification` - Do SSL verification when triggering the hook ### Delete project hook -- cgit v1.2.1 From 99c2f3b3c534386d1d8258fea23d3991695ff4fe Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 23 Aug 2016 14:54:44 -0400 Subject: api: expose wiki_page_events project hook field in the API --- doc/api/projects.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 0905bdea714..156deca932b 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -918,6 +918,7 @@ Parameters: "note_events": true, "build_events": true, "pipeline_events": true, + "wiki_page_events": true, "enable_ssl_verification": true, "created_at": "2012-10-12T17:04:47Z" } @@ -942,6 +943,7 @@ Parameters: - `note_events` - Trigger hook on note events - `build_events` - Trigger hook on build events - `pipeline_events` - Trigger hook on pipeline events +- `wiki_page_events` - Trigger hook on wiki page events - `enable_ssl_verification` - Do SSL verification when triggering the hook ### Edit project hook @@ -964,6 +966,7 @@ Parameters: - `note_events` - Trigger hook on note events - `build_events` - Trigger hook on build events - `pipeline_events` - Trigger hook on pipeline events +- `wiki_page_events` - Trigger hook on wiki page events - `enable_ssl_verification` - Do SSL verification when triggering the hook ### Delete project hook -- cgit v1.2.1 From bba85773519e972d036a933b1f054b6c76050c5f Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Tue, 26 Jul 2016 16:48:51 -0500 Subject: Add two factor recovery endpoint to internal API --- doc/README.md | 1 + doc/user/account/security.md | 3 ++ doc/user/account/two_factor_authentication.md | 68 +++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 doc/user/account/security.md create mode 100644 doc/user/account/two_factor_authentication.md (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 195b7c7af62..047035dfb09 100644 --- a/doc/README.md +++ b/doc/README.md @@ -2,6 +2,7 @@ ## User documentation +- [Account Security](user/account/security.md) Securing your account via two-factor authentication, etc. - [API](api/README.md) Automate GitLab via a simple and powerful API. - [CI/CD](ci/README.md) GitLab Continuous Integration (CI) and Continuous Delivery (CD) getting started, `.gitlab-ci.yml` options, and examples. - [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab. diff --git a/doc/user/account/security.md b/doc/user/account/security.md new file mode 100644 index 00000000000..816094bf8d2 --- /dev/null +++ b/doc/user/account/security.md @@ -0,0 +1,3 @@ +# Account Security + +- [Two-Factor Authentication](two_factor_authentication.md) diff --git a/doc/user/account/two_factor_authentication.md b/doc/user/account/two_factor_authentication.md new file mode 100644 index 00000000000..881358ed94d --- /dev/null +++ b/doc/user/account/two_factor_authentication.md @@ -0,0 +1,68 @@ +# Two-Factor Authentication + +## Recovery options + +If you lose your code generation device (such as your mobile phone) and you need +to disable two-factor authentication on your account, you have several options. + +### Use a saved recovery code + +When you enabled two-factor authentication for your account, a series of +recovery codes were generated. If you saved those codes somewhere safe, you +may use one to sign in. + +First, enter your username/email and password on the GitLab sign in page. When +prompted for a two-factor code, enter one of the recovery codes you saved +previously. + +> **Note:** Once a particular recovery code has been used, it cannot be used again. + You may still use the other saved recovery codes at a later time. + +### Generate new recovery codes using SSH + +It's not uncommon for users to forget to save the recovery codes when enabling +two-factor authentication. If you have an SSH key added to your GitLab account, +you can generate a new set of recovery codes using SSH. + +Run `ssh git@gitlab.example.com 2fa_recovery_codes`. You will be prompted to +confirm that you wish to generate new codes. If you choose to continue, any +previously saved codes will be invalidated. + +```bash +$ ssh git@gitlab.example.com 2fa_recovery_codes +Are you sure you want to generate new two-factor recovery codes? +Any existing recovery codes you saved will be invalidated. (yes/no) +yes + +Your two-factor authentication recovery codes are: + +119135e5a3ebce8e +11f6v2a498810dcd +3924c7ab2089c902 +e79a3398bfe4f224 +34bd7b74adbc8861 +f061691d5107df1a +169bf32a18e63e7f +b510e7422e81c947 +20dbed24c5e74663 +df9d3b9403b9c9f0 + +During sign in, use one of the codes above when prompted for +your two-factor code. Then, visit your Profile Settings and add +a new device so you do not lose access to your account again. +``` + +Next, go to the GitLab sign in page and enter your username/email and password. +When prompted for a two-factor code, enter one of the recovery codes obtained +from the command line output. + +> **Note:** After signing in, you should immediately visit your **Profile Settings + -> Account** to set up two-factor authentication with a new device. + +### Ask a GitLab administrator to disable two-factor on your account + +If the above two methods are not possible, you may ask a GitLab global +administrator to disable two-factor authentication for your account. Please +be aware that this will temporarily leave your account in a less secure state. +You should sign in and re-enable two-factor authentication as soon as possible +after the administrator disables it. -- cgit v1.2.1 From 89fcdbe84c8591b72a2730658ece24f94551a1e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Steinblock?= Date: Thu, 25 Aug 2016 04:56:48 +0000 Subject: removed redundant word --- doc/workflow/merge_requests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/workflow/merge_requests.md b/doc/workflow/merge_requests.md index 91fcfb02d39..334a119e522 100644 --- a/doc/workflow/merge_requests.md +++ b/doc/workflow/merge_requests.md @@ -53,7 +53,7 @@ It should look like this: fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* ``` -Now you can fetch all the merge requests requests: +Now you can fetch all the merge requests: ``` $ git fetch origin -- cgit v1.2.1 From 44eb3197a9c30503a00384b3d688b64558b80397 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Tue, 23 Aug 2016 16:37:14 +0100 Subject: Handle non-UTF-8 conflicts gracefully These can't be resolved in the UI because if they aren't in a UTF-8 compatible encoding, they can't be rendered as JSON. Even if they could, we would be implicitly changing the file encoding anyway, which seems like a bad idea. --- doc/user/project/merge_requests/resolve_conflicts.md | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/user/project/merge_requests/resolve_conflicts.md b/doc/user/project/merge_requests/resolve_conflicts.md index 44b76ffc8e6..4d7225bd820 100644 --- a/doc/user/project/merge_requests/resolve_conflicts.md +++ b/doc/user/project/merge_requests/resolve_conflicts.md @@ -26,6 +26,7 @@ this is similar to performing `git checkout feature; git merge master` locally. GitLab allows resolving conflicts in a file where all of the below are true: - The file is text, not binary +- The file is in a UTF-8 compatible encoding - The file does not already contain conflict markers - The file, with conflict markers added, is not over 200 KB in size - The file exists under the same path in both branches -- cgit v1.2.1 From cad63d4045623391d5e36ff541d531b6dfae7d81 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 25 Aug 2016 10:21:51 +0200 Subject: Use new image for Issue Board page [ci skip] --- doc/user/project/img/issue_board.png | Bin 200614 -> 275093 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'doc') diff --git a/doc/user/project/img/issue_board.png b/doc/user/project/img/issue_board.png index accd0900cbb..63c269f6dbc 100644 Binary files a/doc/user/project/img/issue_board.png and b/doc/user/project/img/issue_board.png differ -- cgit v1.2.1 From 4c8e9a8d27c34fe97216e12d17782f982818fb5c Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Thu, 18 Aug 2016 15:00:20 +0200 Subject: Remove gitorious --- doc/workflow/gitlab_flow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/workflow/gitlab_flow.md b/doc/workflow/gitlab_flow.md index 8119324bb62..7c0eb90d540 100644 --- a/doc/workflow/gitlab_flow.md +++ b/doc/workflow/gitlab_flow.md @@ -115,7 +115,7 @@ In this flow it is not common to have a production branch (or git flow master br Merge or pull requests are created in a git management application and ask an assigned person to merge two branches. Tools such as GitHub and Bitbucket choose the name pull request since the first manual action would be to pull the feature branch. -Tools such as GitLab and Gitorious choose the name merge request since that is the final action that is requested of the assignee. +Tools such as GitLab and others choose the name merge request since that is the final action that is requested of the assignee. In this article we'll refer to them as merge requests. If you work on a feature branch for more than a few hours it is good to share the intermediate result with the rest of the team. -- cgit v1.2.1 From 01a1e3925acf01b925ad3b8ca370db30384111d8 Mon Sep 17 00:00:00 2001 From: Miroslav Meca Date: Thu, 25 Aug 2016 12:01:52 +0000 Subject: Update projects.md The wrong example for "Branches". Added option parameters in protect branch section. Here is reason: https://gitlab.com/gitlab-org/gitlab-ee/commit/3ab07b8aae8dae43cfa3aae1306c59ea264a8594 Maybe this section could/should be deleted. Because in file repositories.md it had been deleted: https://gitlab.com/gitlab-org/gitlab-ee/commit/8f3701eff005aeedcebff8ce02074f5056a369b3 --- doc/api/projects.md | 54 ++++++++++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 30 deletions(-) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 0e4806e31c5..eacdb1e1ee6 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -998,6 +998,8 @@ is available before it is returned in the JSON response or an empty response is ## Branches +For more information please consult the [Branches](branches.md) documentation. + ### List branches Lists all branches of a project. @@ -1016,56 +1018,46 @@ Parameters: "name": "async", "commit": { "id": "a2b702edecdf41f07b42653eb1abe30ce98b9fca", - "parents": [ - { - "id": "3f94fc7c85061973edc9906ae170cc269b07ca55" - } + "parent_ids": [ + "3f94fc7c85061973edc9906ae170cc269b07ca55" ], - "tree": "c68537c6534a02cc2b176ca1549f4ffa190b58ee", "message": "give Caolan credit where it's due (up top)", - "author": { - "name": "Jeremy Ashkenas", - "email": "jashkenas@example.com" - }, - "committer": { - "name": "Jeremy Ashkenas", - "email": "jashkenas@example.com" - }, + "author_name": "Jeremy Ashkenas", + "author_email": "jashkenas@example.com", "authored_date": "2010-12-08T21:28:50+00:00", + "committer_name": "Jeremy Ashkenas", + "committer_email": "jashkenas@example.com", "committed_date": "2010-12-08T21:28:50+00:00" }, - "protected": false + "protected": false, + "developers_can_push": false, + "developers_can_merge": false }, { "name": "gh-pages", "commit": { "id": "101c10a60019fe870d21868835f65c25d64968fc", - "parents": [ - { - "id": "9c15d2e26945a665131af5d7b6d30a06ba338aaa" - } + "parent_ids": [ + "9c15d2e26945a665131af5d7b6d30a06ba338aaa" ], - "tree": "fb5cc9d45da3014b17a876ad539976a0fb9b352a", "message": "Underscore.js 1.5.2", - "author": { - "name": "Jeremy Ashkenas", - "email": "jashkenas@example.com" - }, - "committer": { - "name": "Jeremy Ashkenas", - "email": "jashkenas@example.com" - }, + "author_name": "Jeremy Ashkenas", + "author_email": "jashkenas@example.com", "authored_date": "2013-09-07T12:58:21+00:00", + "committer_name": "Jeremy Ashkenas", + "committer_email": "jashkenas@example.com", "committed_date": "2013-09-07T12:58:21+00:00" }, - "protected": false + "protected": false, + "developers_can_push": false, + "developers_can_merge": false } ] ``` -### List single branch +### Single branch -Lists a specific branch of a project. +A specific branch of a project. ``` GET /projects/:id/repository/branches/:branch @@ -1075,6 +1067,8 @@ Parameters: - `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project - `branch` (required) - The name of the branch. +- `developers_can_push` - Flag if developers can push to the branch. +- `developers_can_merge` - Flag if developers can merge to the branch. ### Protect single branch -- cgit v1.2.1 From 3eb4c74f88dfb316d695dc9396b88555bf314189 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Wed, 24 Aug 2016 15:19:36 -0300 Subject: Update Issue board documentation --- doc/user/project/issue_board.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/user/project/issue_board.md b/doc/user/project/issue_board.md index 9df9ed9c9da..cac926b3e28 100644 --- a/doc/user/project/issue_board.md +++ b/doc/user/project/issue_board.md @@ -31,10 +31,9 @@ Below is a table of the definitions used for GitLab's Issue Board. There are three types of lists, the ones you create based on your labels, and two default: -- **Backlog** (default): shows all issues that do not fall in one of the other - lists. Always appears on the very left. -- **Done** (default): shows all closed issues. Always appears on the very right. -- Label list: a list based on a label. It shows all issues with that label. +- **Backlog** (default): shows all opened issues that do not fall in one of the other lists. Always appears on the very left. +- **Done** (default): shows all closed issues that do not fall in one of the other lists. Always appears on the very right. +- Label list: a list based on a label. It shows all opened or closed issues with that label. ![GitLab Issue Board](img/issue_board.png) -- cgit v1.2.1 From cb5e6fe71e95d61cead3dd7985a044b383529413 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 25 Aug 2016 15:36:56 +0200 Subject: Fix markdown link in doc_styleguide.md [ci skip] --- doc/development/doc_styleguide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index 927a1872413..dc7d832ce3a 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -6,7 +6,7 @@ it organized and easy to find. ## Location and naming of documents >**Note:** -These guidelines derive from the discussion taken place in issue [#3349](ce-3349). +These guidelines derive from the discussion taken place in issue [#3349][ce-3349]. The documentation hierarchy can be vastly improved by providing a better layout and organization of directories. -- cgit v1.2.1 From 9a6b7da91adce3cf8021a872e870ad828998cfb1 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Thu, 25 Aug 2016 17:56:03 +0200 Subject: Fix wrong Koding link --- doc/README.md | 1 - doc/integration/README.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/README.md b/doc/README.md index 047035dfb09..254394eb63e 100644 --- a/doc/README.md +++ b/doc/README.md @@ -19,7 +19,6 @@ - [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects. - [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project. - [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN. -- [Koding](user/project/koding.md) Learn how to use Koding, the online IDE. ## Administrator documentation diff --git a/doc/integration/README.md b/doc/integration/README.md index 70895abbcad..c2fd299db07 100644 --- a/doc/integration/README.md +++ b/doc/integration/README.md @@ -15,7 +15,7 @@ See the documentation below for details on how to configure these services. - [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages - [reCAPTCHA](recaptcha.md) Configure GitLab to use Google reCAPTCHA for new users - [Akismet](akismet.md) Configure Akismet to stop spam -- [Koding](koding.md) Configure Koding to use IDE integration +- [Koding](../administration/integration/koding.md) Configure Koding to use IDE integration GitLab Enterprise Edition contains [advanced Jenkins support][jenkins]. -- cgit v1.2.1 From 1aed63dad2fc87ec04cbef86627507348a2eca47 Mon Sep 17 00:00:00 2001 From: "Federico \"Lox" Date: Thu, 25 Aug 2016 21:01:43 +0000 Subject: Fix `Stack Build` wizard description in koding.md --- doc/user/project/koding.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/user/project/koding.md b/doc/user/project/koding.md index e54587fab68..c56a1efe3c2 100644 --- a/doc/user/project/koding.md +++ b/doc/user/project/koding.md @@ -68,7 +68,7 @@ GitLab instance. For details about what's next you can follow [this guide](https://www.koding.com/docs/creating-an-aws-stack) from step 8. Once stack initialized you will see the `README.md` content from your project -in `Stack Build` wizard, this wizard will let you to build the stack and import +in `Stack Build` wizard, this wizard will let you build the stack and import your project into it. **Once it's completed it will automatically open the related vm instead of importing from scratch**. -- cgit v1.2.1 From 1fc0d4f4b50a9aeae73a0b0a9a4641e57786e6b3 Mon Sep 17 00:00:00 2001 From: Jake Romer Date: Fri, 26 Aug 2016 06:12:30 +0000 Subject: Clarify blank line rule in newlines_styleguide.md To clarify what's meant by "from a logical perspective" here, I consulted Python's PEP8 style guide, which provides some helpfully precise language: > Extra blank lines may be used (sparingly) to separate groups of > related functions. Blank lines may be omitted between a bunch of > related one-liners (e.g. a set of dummy implementations). https://www.python.org/dev/peps/pep-0008/#blank-lines I adapted this passage to the existing language for the newline rule. --- doc/development/newlines_styleguide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/development/newlines_styleguide.md b/doc/development/newlines_styleguide.md index e03adcaadea..32aac2529a4 100644 --- a/doc/development/newlines_styleguide.md +++ b/doc/development/newlines_styleguide.md @@ -2,7 +2,7 @@ This style guide recommends best practices for newlines in Ruby code. -## Rule: separate code with newlines only when it makes sense from logic perspectice +## Rule: separate code with newlines only to group together related logic ```ruby # bad -- cgit v1.2.1 From c40fd0b1c2aa5d3354fd50e37a4fe22483df2042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20=C3=98ivind=20Bj=C3=B8rnsen?= Date: Fri, 26 Aug 2016 07:24:13 +0000 Subject: docs: make sure to update 8.10-to-8.11 workhorse version too (see !5983) --- doc/update/8.10-to-8.11.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/8.10-to-8.11.md b/doc/update/8.10-to-8.11.md index 98721763566..b058f8e2a03 100644 --- a/doc/update/8.10-to-8.11.md +++ b/doc/update/8.10-to-8.11.md @@ -82,7 +82,7 @@ GitLab 8.1. ```bash cd /home/git/gitlab-workhorse sudo -u git -H git fetch --all -sudo -u git -H git checkout v0.7.8 +sudo -u git -H git checkout v0.7.11 sudo -u git -H make ``` -- cgit v1.2.1 From 40884010ad48c83a91ece50c17eaa78f3c7c9a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 25 Aug 2016 21:23:23 +0000 Subject: doc: fix (batches) being treated as link reference rather than text --- doc/ci/pipelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/pipelines.md b/doc/ci/pipelines.md index 20cd88c8d20..ca9b986a060 100644 --- a/doc/ci/pipelines.md +++ b/doc/ci/pipelines.md @@ -5,7 +5,7 @@ Introduced in GitLab 8.8. ## Pipelines -A pipeline is a group of [builds] that get executed in [stages] (batches). All +A pipeline is a group of [builds] that get executed in [stages] \(batches). All of the builds in a stage are executed in parallel (if there are enough concurrent [runners]), and if they all succeed, the pipeline moves on to the next stage. If one of the builds fails, the next stage is not (usually) -- cgit v1.2.1 From aeb280b0ccb7186b75cf73fcd2e051c5ed661443 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Thu, 25 Aug 2016 09:19:14 -0500 Subject: Fix markdown help references --- doc/development/doc_styleguide.md | 2 +- doc/user/markdown.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index dc7d832ce3a..8bf24f70a9a 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -422,7 +422,7 @@ curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --data "domain [cURL]: http://curl.haxx.se/ "cURL website" [single spaces]: http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html -[gfm]: http://docs.gitlab.com/ce/markdown/markdown.html#newlines "GitLab flavored markdown documentation" +[gfm]: http://docs.gitlab.com/ce/user/markdown.html#newlines "GitLab flavored markdown documentation" [doc-restart]: ../administration/restart_gitlab.md "GitLab restart documentation" [ce-3349]: https://gitlab.com/gitlab-org/gitlab-ce/issues/3349 "Documentation restructure" [graffle]: https://gitlab.com/gitlab-org/gitlab-design/blob/d8d39f4a87b90fb9ae89ca12dc565347b4900d5e/production/resources/gitlab-map.graffle diff --git a/doc/user/markdown.md b/doc/user/markdown.md index 7fe96e67dbb..c7fda8a497f 100644 --- a/doc/user/markdown.md +++ b/doc/user/markdown.md @@ -66,7 +66,7 @@ dependency to do so. Please see the [github-markup gem readme](https://github.co ## Newlines > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#newlines +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#newlines GFM honors the markdown specification in how [paragraphs and line breaks are handled](https://daringfireball.net/projects/markdown/syntax#p). @@ -86,7 +86,7 @@ Sugar is sweet ## Multiple underscores in words > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#multiple-underscores-in-words +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#multiple-underscores-in-words It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words: @@ -101,7 +101,7 @@ do_this_and_do_that_and_another_thing ## URL auto-linking > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#url-auto-linking +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#url-auto-linking GFM will autolink almost any URL you copy and paste into your text: @@ -122,7 +122,7 @@ GFM will autolink almost any URL you copy and paste into your text: ## Multiline Blockquote > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#multiline-blockquote +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#multiline-blockquote On top of standard Markdown [blockquotes](#blockquotes), which require prepending `>` to quoted lines, GFM supports multiline blockquotes fenced by >>>: @@ -156,7 +156,7 @@ you can quote that without having to manually prepend `>` to every line! ## Code and Syntax Highlighting > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#code-and-syntax-highlighting +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#code-and-syntax-highlighting _GitLab uses the [Rouge Ruby library][rouge] for syntax highlighting. For a list of supported languages visit the Rouge website._ @@ -226,7 +226,7 @@ But let's throw in a tag. ## Inline Diff > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#inline-diff +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#inline-diff With inline diffs tags you can display {+ additions +} or [- deletions -]. @@ -242,7 +242,7 @@ However the wrapping tags cannot be mixed as such: ## Emoji > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#emoji +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#emoji Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you: @@ -307,7 +307,7 @@ GFM also recognizes certain cross-project references: ## Task Lists > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#task-lists +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#task-lists You can add task lists to issues, merge requests and comments. To create a task list, add a specially-formatted Markdown list, like so: @@ -330,7 +330,7 @@ Task lists can only be created in descriptions, not in titles. Task item state c ## Videos > If this is not rendered correctly, see -https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md#videos +https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md#videos Image tags with a video extension are automatically converted to a video player. @@ -780,7 +780,7 @@ A link starting with a `/` is relative to the wiki root. - The [Markdown Syntax Guide](https://daringfireball.net/projects/markdown/syntax) at Daring Fireball is an excellent resource for a detailed explanation of standard markdown. - [Dillinger.io](http://dillinger.io) is a handy tool for testing standard markdown. -[markdown.md]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/markdown/markdown.md +[markdown.md]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/user/markdown.md [rouge]: http://rouge.jneen.net/ "Rouge website" [redcarpet]: https://github.com/vmg/redcarpet "Redcarpet website" [^1]: This link will be broken if you see this document from the Help page or docs.gitlab.com -- cgit v1.2.1 From 804479755968072086494c4d9381b45a3057ab7f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Sat, 27 Aug 2016 20:52:13 +0200 Subject: Clarify steps when changing a document's location [ci skip] --- doc/development/doc_styleguide.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index dc7d832ce3a..4fe69e63d4f 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -222,18 +222,26 @@ For example, if you were to move `doc/workflow/lfs/lfs_administration.md` to ``` 1. Find and replace any occurrences of the old location with the new one. - A quick way to find them is to use `grep`: + A quick way to find them is to use `grep`. First go to the root directory + where you cloned the `gitlab-ce` repository and then do: ``` - grep -nR "lfs_administration.md" doc/ + grep -nR "workflow/lfs/lfs_administration" app/ doc/ spec/ + grep -nR "lfs/lfs_administration" app/ doc/ spec/ ``` - The above command will search in the `doc/` directory for - `lfs_administration.md` recursively and will print the file and the line - where this file is mentioned. Note that we used just the filename - (`lfs_administration.md`) and not the whole the relative path - (`workflow/lfs/lfs_administration.md`). - +Things to note: + +- Since we also use inline documentation, except for the documentation itself, + the document might also be referenced in the views of GitLab (`app/`) which will + render when visiting `/help`, and sometimes in the testing suite (`spec/`). +- The above `grep` command will search in the `app/`, `doc/` and `spec/` + directories for `workflow/lfs/lfs_administration` and `lfs/lfs_administration` + recursively and will print the file and the line where this file is mentioned. + You may ask why the two greps. Since we use relative paths to link to + documentation, sometimes it might be useful to search a path deeper. +- The `*.md` extension is not used when a document is linked to GitLab's + built-in help page, that's why we omit it in `grep`. ## Configuration documentation for source and Omnibus installations -- cgit v1.2.1 From 173e0a7c7cc1a6f81f3ef3e9395051ca11294a4e Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 29 Aug 2016 09:35:19 +0200 Subject: Update documentation about hidden keys in CI YAML --- doc/ci/yaml/README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index e7850aa2c9d..58d5306f12a 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -39,7 +39,7 @@ If you want a quick introduction to GitLab CI, follow our - [before_script and after_script](#before_script-and-after_script) - [Git Strategy](#git-strategy) - [Shallow cloning](#shallow-cloning) -- [Hidden jobs](#hidden-jobs) +- [Hidden keys](#hidden-keys) - [Special YAML features](#special-yaml-features) - [Anchors](#anchors) - [Validate the .gitlab-ci.yml](#validate-the-gitlab-ci-yml) @@ -934,24 +934,27 @@ variables: GIT_DEPTH: "3" ``` -## Hidden jobs +## Hidden keys >**Note:** Introduced in GitLab 8.6 and GitLab Runner v1.1.1. -Jobs that start with a dot (`.`) will be not processed by GitLab CI. You can +Keys that start with a dot (`.`) will be not processed by GitLab CI. You can use this feature to ignore jobs, or use the -[special YAML features](#special-yaml-features) and transform the hidden jobs +[special YAML features](#special-yaml-features) and transform the hidden keys into templates. -In the following example, `.job_name` will be ignored: +In the following example, `.key_name` will be ignored: ```yaml -.job_name: +.key_name: script: - rake spec ``` +Hidden keys can be hashes like normal CI jobs, but you are also allowed to use +different types of structures to leverage special YAML features. + ## Special YAML features It's possible to use special YAML features like anchors (`&`), aliases (`*`) @@ -967,7 +970,7 @@ Introduced in GitLab 8.6 and GitLab Runner v1.1.1. YAML also has a handy feature called 'anchors', which let you easily duplicate content across your document. Anchors can be used to duplicate/inherit -properties, and is a perfect example to be used with [hidden jobs](#hidden-jobs) +properties, and is a perfect example to be used with [hidden keys](#hidden-keys) to provide templates for your jobs. The following example uses anchors and map merging. It will create two jobs, @@ -975,7 +978,7 @@ The following example uses anchors and map merging. It will create two jobs, having their own custom `script` defined: ```yaml -.job_template: &job_definition # Hidden job that defines an anchor named 'job_definition' +.job_template: &job_definition # Hidden key that defines an anchor named 'job_definition' image: ruby:2.1 services: - postgres @@ -1081,7 +1084,7 @@ test:mysql: - ruby ``` -You can see that the hidden jobs are conveniently used as templates. +You can see that the hidden keys are conveniently used as templates. ## Validate the .gitlab-ci.yml -- cgit v1.2.1 From e8b66d4bc70f33139f51a1154b2c2090cc6a814b Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 22 Aug 2016 09:59:15 +0200 Subject: Fix due date example in slash commands documentation --- doc/user/project/slash_commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/user/project/slash_commands.md b/doc/user/project/slash_commands.md index 11e1574f772..cfdf04a32a3 100644 --- a/doc/user/project/slash_commands.md +++ b/doc/user/project/slash_commands.md @@ -26,5 +26,5 @@ do. | `/done` | Mark todo as done | | `/subscribe` | Subscribe | | `/unsubscribe` | Unsubscribe | -| `/due ` | Set due date | +| /due in 2 days | this Friday | December 31st | Set due date | | `/remove_due_date` | Remove due date | -- cgit v1.2.1 From 700ffcf16cd6816fa0e4c65c0d40136d6f29fd36 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 29 Aug 2016 10:16:09 +0200 Subject: Add angle brackets around due date in slash cmds docs --- doc/user/project/slash_commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/user/project/slash_commands.md b/doc/user/project/slash_commands.md index cfdf04a32a3..1792a0c501d 100644 --- a/doc/user/project/slash_commands.md +++ b/doc/user/project/slash_commands.md @@ -26,5 +26,5 @@ do. | `/done` | Mark todo as done | | `/subscribe` | Subscribe | | `/unsubscribe` | Unsubscribe | -| /due in 2 days | this Friday | December 31st | Set due date | +| /due <in 2 days | this Friday | December 31st> | Set due date | | `/remove_due_date` | Remove due date | -- cgit v1.2.1 From d30d9928132adede3ca189dad8d2afa066a7abf1 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 29 Aug 2016 22:08:02 +0200 Subject: Use `git grep` instead of `grep` [ci skip] --- doc/development/doc_styleguide.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index 4fe69e63d4f..066d29caf19 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -222,12 +222,12 @@ For example, if you were to move `doc/workflow/lfs/lfs_administration.md` to ``` 1. Find and replace any occurrences of the old location with the new one. - A quick way to find them is to use `grep`. First go to the root directory + A quick way to find them is to use `git grep`. First go to the root directory where you cloned the `gitlab-ce` repository and then do: ``` - grep -nR "workflow/lfs/lfs_administration" app/ doc/ spec/ - grep -nR "lfs/lfs_administration" app/ doc/ spec/ + git grep -n "workflow/lfs/lfs_administration" + git grep -n "lfs/lfs_administration" ``` Things to note: @@ -235,13 +235,13 @@ Things to note: - Since we also use inline documentation, except for the documentation itself, the document might also be referenced in the views of GitLab (`app/`) which will render when visiting `/help`, and sometimes in the testing suite (`spec/`). -- The above `grep` command will search in the `app/`, `doc/` and `spec/` - directories for `workflow/lfs/lfs_administration` and `lfs/lfs_administration` - recursively and will print the file and the line where this file is mentioned. +- The above `git grep` command will search recursively in the directory you run + it in for `workflow/lfs/lfs_administration` and `lfs/lfs_administration` + and will print the file and the line where this file is mentioned. You may ask why the two greps. Since we use relative paths to link to documentation, sometimes it might be useful to search a path deeper. - The `*.md` extension is not used when a document is linked to GitLab's - built-in help page, that's why we omit it in `grep`. + built-in help page, that's why we omit it in `git grep`. ## Configuration documentation for source and Omnibus installations -- cgit v1.2.1 From 475afd37b656fa87e8f528670091a1923e391cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 30 Jul 2015 12:38:21 +0000 Subject: Updated Bitbucket OmniAuth documentation --- doc/integration/bitbucket.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md index 2eb6266ebe7..0078f4e15b2 100644 --- a/doc/integration/bitbucket.md +++ b/doc/integration/bitbucket.md @@ -7,7 +7,7 @@ Bitbucket will generate an application ID and secret key for you to use. 1. Sign in to Bitbucket. -1. Navigate to your individual user settings or a team's settings, depending on how you want the application registered. It does not matter if the application is registered as an individual or a team - that is entirely up to you. +1. Navigate to your individual user settings (Manage account) or a team's settings (Manage team), depending on how you want the application registered. It does not matter if the application is registered as an individual or a team - that is entirely up to you. 1. Select "OAuth" in the left menu. @@ -16,9 +16,17 @@ Bitbucket will generate an application ID and secret key for you to use. 1. Provide the required details. - Name: This can be anything. Consider something like `'s GitLab` or `'s GitLab` or something else descriptive. - Application description: Fill this in if you wish. + - Callback URL: leave blank. - URL: The URL to your GitLab installation. 'https://gitlab.company.com' + +1. Grant at least the following permissions. + - Account: Email + - Repositories: Read + 1. Select "Save". +1. Select your newly created OAuth consumer. + 1. You should now see a Key and Secret in the list of OAuth customers. Keep this page open as you continue configuration. @@ -62,7 +70,7 @@ Bitbucket will generate an application ID and secret key for you to use. app_secret: 'YOUR_APP_SECRET' } ``` -1. Change 'YOUR_APP_ID' to the key from the Bitbucket application page from step 7. +1. Change 'YOUR_KEY' to the key from the Bitbucket application page from step 7. 1. Change 'YOUR_APP_SECRET' to the secret from the Bitbucket application page from step 7. @@ -137,4 +145,4 @@ To allow GitLab to connect to Bitbucket over SSH, you need to add 'bitbucket.org 1. Restart GitLab to allow it to find the new public key. -You should now see the "Import projects from Bitbucket" option on the New Project page enabled. +You should now see the "Import projects from Bitbucket" option on the New Project page enabled. \ No newline at end of file -- cgit v1.2.1 From c6d27652923ca287ab1ef29de3e2f4ab9117b121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 30 Jul 2015 12:55:25 +0000 Subject: Updated Bitbucket OmniAuth documentation for omnibus package --- doc/integration/bitbucket.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md index 0078f4e15b2..94c845c29a4 100644 --- a/doc/integration/bitbucket.md +++ b/doc/integration/bitbucket.md @@ -92,7 +92,7 @@ Bitbucket doesn't allow OAuth applications to clone repositories over HTTPS, and ### Step 1: Public key -To be able to access repositories on Bitbucket, GitLab will automatically register your public key with Bitbucket as a deploy key for the repositories to be imported. Your public key needs to be at `~/.ssh/bitbucket_rsa.pub`, which will expand to `/home/git/.ssh/bitbucket_rsa.pub` in most configurations. +To be able to access repositories on Bitbucket, GitLab will automatically register your public key with Bitbucket as a deploy key for the repositories to be imported. Your public key needs to be at `~/.ssh/bitbucket_rsa.pub`, which will expand to `/var/opt/gitlab/.ssh/bitbucket_rsa` for omnibus package and to `/home/git/.ssh/bitbucket_rsa.pub` for installations from source. If you have that file in place, you're all set and should see the "Import projects from Bitbucket" option enabled. If you don't, do the following: @@ -102,12 +102,20 @@ If you have that file in place, you're all set and should see the "Import projec sudo -u git -H ssh-keygen ``` - When asked `Enter file in which to save the key` specify the correct path, eg. `/home/git/.ssh/bitbucket_rsa`. + When asked `Enter file in which to save the key` specify the correct path, eg. `/var/opt/gitlab/.ssh/bitbucket_rsa` or `/home/git/.ssh/bitbucket_rsa`. Make sure to use an **empty passphrase**. 1. Configure SSH client to use your new key: Open the SSH configuration file of the git user. + + For omnibus package: + + ```sh + sudo editor /var/opt/gitlab/.ssh/config + ``` + + For installations from source: ```sh sudo editor /home/git/.ssh/config -- cgit v1.2.1 From 8c101f9f860e03be20a90cafdcd19f897e47f62d Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 30 Aug 2016 13:43:09 +0200 Subject: Mention that the `:id` of a project can also be `NAMESPACE/PROJECT_NAME` [ci skip] --- doc/api/commits.md | 14 +++++++------- doc/api/projects.md | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/doc/api/commits.md b/doc/api/commits.md index 5c98c5d7565..55d0de7afd9 100644 --- a/doc/api/commits.md +++ b/doc/api/commits.md @@ -10,7 +10,7 @@ GET /projects/:id/repository/commits | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project | +| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `ref_name` | string | no | The name of a repository branch or tag or if not given the default branch | | `since` | string | no | Only commits after or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | | `until` | string | no | Only commits before or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | @@ -58,7 +58,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project | +| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit hash or name of a repository branch or tag | ```bash @@ -102,7 +102,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project | +| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit hash or name of a repository branch or tag | ```bash @@ -138,7 +138,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project | +| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit hash or name of a repository branch or tag | ```bash @@ -187,7 +187,7 @@ POST /projects/:id/repository/commits/:sha/comments | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project | +| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit SHA or name of a repository branch or tag | | `note` | string | yes | The text of the comment | | `path` | string | no | The file path relative to the repository | @@ -232,7 +232,7 @@ GET /projects/:id/repository/commits/:sha/statuses | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project +| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit SHA | `ref_name`| string | no | The name of a repository branch or tag or, if not given, the default branch | `stage` | string | no | Filter by [build stage](../ci/yaml/README.md#stages), e.g., `test` @@ -306,7 +306,7 @@ POST /projects/:id/statuses/:sha | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project +| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit SHA | `state` | string | yes | The state of the status. Can be one of the following: `pending`, `running`, `success`, `failed`, `canceled` | `ref` | string | no | The `ref` (branch or tag) to which the status refers diff --git a/doc/api/projects.md b/doc/api/projects.md index 0e4806e31c5..22c3d416107 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -489,7 +489,7 @@ PUT /projects/:id Parameters: -- `id` (required) - The ID of a project +- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of a project - `name` (optional) - project name - `path` (optional) - repository name for project - `description` (optional) - short project description @@ -519,7 +519,7 @@ POST /projects/fork/:id Parameters: -- `id` (required) - The ID of the project to be forked +- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked ### Star a project @@ -532,7 +532,7 @@ POST /projects/:id/star | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of the project | +| `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME | ```bash curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" @@ -599,7 +599,7 @@ DELETE /projects/:id/star | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of the project | +| `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME | ```bash curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" @@ -670,7 +670,7 @@ POST /projects/:id/archive | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of the project | +| `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME | ```bash curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/archive" @@ -757,7 +757,7 @@ POST /projects/:id/unarchive | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of the project | +| `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME | ```bash curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/unarchive" @@ -839,7 +839,7 @@ DELETE /projects/:id Parameters: -- `id` (required) - The ID of a project +- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked ## Uploads @@ -853,7 +853,7 @@ POST /projects/:id/uploads Parameters: -- `id` (required) - The ID of the project +- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked - `file` (required) - The file to be uploaded ```json @@ -882,7 +882,7 @@ POST /projects/:id/share Parameters: -- `id` (required) - The ID of a project +- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked - `group_id` (required) - The ID of a group - `group_access` (required) - Level of permissions for sharing @@ -1114,7 +1114,7 @@ POST /projects/:id/fork/:forked_from_id Parameters: -- `id` (required) - The ID of the project +- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked - `forked_from_id:` (required) - The ID of the project that was forked from ### Delete an existing forked from relationship @@ -1125,7 +1125,7 @@ DELETE /projects/:id/fork Parameter: -- `id` (required) - The ID of the project +- `id` (required) - The ID or NAMESPACE/PROJECT_NAME of the project to be forked ## Search for projects by name -- cgit v1.2.1 From 74abc527ecaf6a2e94cab4c36221ee921cedda82 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 30 Aug 2016 13:49:17 +0200 Subject: Create bitmaps during 'git gc' --- doc/install/installation.md | 4 + doc/update/8.11-to-8.12.md | 198 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 doc/update/8.11-to-8.12.md (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index d4b89fa8345..f012c9cd51b 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -331,6 +331,10 @@ sudo usermod -aG redis git # Disable 'git gc --auto' because GitLab already runs 'git gc' when needed sudo -u git -H git config --global gc.auto 0 + # Enable packfile bitmaps + sudo -u git -H git config --global repack.writeBitmaps true + + # Configure Redis connection settings sudo -u git -H cp config/resque.yml.example config/resque.yml diff --git a/doc/update/8.11-to-8.12.md b/doc/update/8.11-to-8.12.md new file mode 100644 index 00000000000..544a80662d3 --- /dev/null +++ b/doc/update/8.11-to-8.12.md @@ -0,0 +1,198 @@ +# From 8.11 to 8.12 + +Make sure you view this update guide from the tag (version) of GitLab you would +like to install. In most cases this should be the highest numbered production +tag (without rc in it). You can select the tag in the version dropdown at the +top left corner of GitLab (below the menu bar). + +If the highest number stable branch is unclear please check the +[GitLab Blog](https://about.gitlab.com/blog/archives.html) for installation +guide links by version. + +### 1. Stop server + + sudo service gitlab stop + +### 2. Backup + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production +``` + +### 3. Update Ruby + +If you are you running Ruby 2.1.x, you do not _need_ to upgrade Ruby yet, but you should note that support for 2.1.x is deprecated and we will require 2.3.x in 8.13. It's strongly recommended that you upgrade as soon as possible. + +You can check which version you are running with `ruby -v`. + +Download and compile Ruby: + +```bash +mkdir /tmp/ruby && cd /tmp/ruby +curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz +echo 'c39b4001f7acb4e334cb60a0f4df72d434bef711 ruby-2.3.1.tar.gz' | shasum --check - && tar xzf ruby-2.3.1.tar.gz +cd ruby-2.3.1 +./configure --disable-install-rdoc +make +sudo make install +``` + +Install Bundler: + +```bash +sudo gem install bundler --no-ri --no-rdoc +``` + +### 4. Get latest code + +```bash +sudo -u git -H git fetch --all +sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically +``` + +For GitLab Community Edition: + +```bash +sudo -u git -H git checkout 8-12-stable +``` + +OR + +For GitLab Enterprise Edition: + +```bash +sudo -u git -H git checkout 8-12-stable-ee +``` + +### 5. Update gitlab-shell + +```bash +cd /home/git/gitlab-shell +sudo -u git -H git fetch --all --tags +sudo -u git -H git checkout v3.4.0 +``` + +### 6. Update gitlab-workhorse + +Install and compile gitlab-workhorse. This requires +[Go 1.5](https://golang.org/dl) which should already be on your system from +GitLab 8.1. + +```bash +cd /home/git/gitlab-workhorse +sudo -u git -H git fetch --all +sudo -u git -H git checkout v0.7.8 +sudo -u git -H make +``` + +### 7. Install libs, migrations, etc. + +```bash +cd /home/git/gitlab + +# MySQL installations (note: the line below states '--without postgres') +sudo -u git -H bundle install --without postgres development test --deployment + +# PostgreSQL installations (note: the line below states '--without mysql') +sudo -u git -H bundle install --without mysql development test --deployment + +# Optional: clean up old gems +sudo -u git -H bundle clean + +# Run database migrations +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production + +# Clean up assets and cache +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production + +``` + +### 8. Update configuration files + +#### New configuration options for `gitlab.yml` + +There are new configuration options available for [`gitlab.yml`](config/gitlab.yml.example). View them with the command below and apply them manually to your current `gitlab.yml`: + +```sh +git diff origin/8-11-stable:config/gitlab.yml.example origin/8-12-stable:config/gitlab.yml.example +``` + +#### Git configuration + +```sh +# Enable packfile bitmaps +sudo -u git -H git config --global repack.writeBitmaps true +``` + +#### Nginx configuration + +Ensure you're still up-to-date with the latest NGINX configuration changes: + +```sh +# For HTTPS configurations +git diff origin/8-11-stable:lib/support/nginx/gitlab-ssl origin/8-12-stable:lib/support/nginx/gitlab-ssl + +# For HTTP configurations +git diff origin/8-11-stable:lib/support/nginx/gitlab origin/8-12-stable:lib/support/nginx/gitlab +``` + +If you are using Apache instead of NGINX please see the updated [Apache templates]. +Also note that because Apache does not support upstreams behind Unix sockets you +will need to let gitlab-workhorse listen on a TCP port. You can do this +via [/etc/default/gitlab]. + +[Apache templates]: https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache +[/etc/default/gitlab]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-12-stable/lib/support/init.d/gitlab.default.example#L38 + +#### SMTP configuration + +If you're installing from source and use SMTP to deliver mail, you will need to add the following line +to config/initializers/smtp_settings.rb: + +```ruby +ActionMailer::Base.delivery_method = :smtp +``` + +See [smtp_settings.rb.sample] as an example. + +[smtp_settings.rb.sample]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-12-stable/config/initializers/smtp_settings.rb.sample#L13? + +#### Init script + +Ensure you're still up-to-date with the latest init script changes: + + sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab + +### 9. Start application + + sudo service gitlab start + sudo service nginx restart + +### 10. Check application status + +Check if GitLab and its environment are configured correctly: + + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +To make sure you didn't miss anything run a more thorough check: + + 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 (8.11) + +### 1. Revert the code to the previous version + +Follow the [upgrade guide from 8.9 to 8.11](8.9-to-8.11.md), except for the +database migration (the backup is already migrated to the previous version). + +### 2. Restore from the backup + +```bash +cd /home/git/gitlab +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production +``` + +If you have more than one backup `*.tar` file(s) please add `BACKUP=timestamp_of_backup` to the command above. -- cgit v1.2.1 From 2fb28dddfc7848a90294c2008b5d672a305a8596 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 30 Aug 2016 15:42:40 +0200 Subject: Refactor Bitbucket integration documentation --- doc/integration/bitbucket.md | 190 ++++++++++++++++++++++++++----------------- doc/integration/omniauth.md | 4 +- 2 files changed, 119 insertions(+), 75 deletions(-) (limited to 'doc') diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md index 94c845c29a4..16e54102113 100644 --- a/doc/integration/bitbucket.md +++ b/doc/integration/bitbucket.md @@ -1,127 +1,155 @@ -# Integrate your server with Bitbucket +# Integrate your GitLab server with Bitbucket -Import projects from Bitbucket and login to your GitLab instance with your Bitbucket account. +Import projects from Bitbucket and login to your GitLab instance with your +Bitbucket account. -To enable the Bitbucket OmniAuth provider you must register your application with Bitbucket. -Bitbucket will generate an application ID and secret key for you to use. +## Overview -1. Sign in to Bitbucket. +You can set up Bitbucket as an OAuth provider so that you can use your +credentials to authenticate into GitLab or import your projects from Bitbucket. -1. Navigate to your individual user settings (Manage account) or a team's settings (Manage team), depending on how you want the application registered. It does not matter if the application is registered as an individual or a team - that is entirely up to you. +- To use Bitbucket as an OmniAuth provider, follow the [Bitbucket OmniAuth + provider](#bitbucket-omniauth-provider) section. +- To import projects from Bitbucket, follow both the + [Bitbucket OmniAuth provider](#bitbucket-omniauth-provider) and + [Bitbucket project import](#bitbucket-project-import) sections. -1. Select "OAuth" in the left menu. +## Bitbucket OmniAuth provider + +> **Note:** +Make sure to first follow the [Initial OmniAuth configuration][init-oauth] +before proceeding with setting up the Bitbucket integration. + +To enable the Bitbucket OmniAuth provider you must register your application +with Bitbucket. Bitbucket will generate an application ID and secret key for +you to use. +1. Sign in to Bitbucket. +1. Navigate to your individual user settings (Manage account) or a team's + settings (Manage team), depending on how you want the application registered. + It does not matter if the application is registered as an individual or a + team - that is entirely up to you. +1. Select "OAuth" in the left menu. 1. Select "Add consumer". +1. Provide the required details: -1. Provide the required details. - - Name: This can be anything. Consider something like `'s GitLab` or `'s GitLab` or something else descriptive. - - Application description: Fill this in if you wish. - - Callback URL: leave blank. - - URL: The URL to your GitLab installation. 'https://gitlab.company.com' + | Item | Description | + | :--- | :---------- | + | **Name** | This can be anything. Consider something like `'s GitLab` or `'s GitLab` or something else descriptive. | + | **Application description** | Fill this in if you wish. | + | **Callback URL** | Leave blank. | + | **URL** | The URL to your GitLab installation, e.g., `https://gitlab.example.com`. | -1. Grant at least the following permissions. - - Account: Email - - Repositories: Read - -1. Select "Save". +1. Grant at least the following permissions: -1. Select your newly created OAuth consumer. + ``` + Account: Email + Repositories: Read + ``` +1. Select "Save". +1. Select your newly created OAuth consumer. 1. You should now see a Key and Secret in the list of OAuth customers. Keep this page open as you continue configuration. - 1. On your GitLab server, open the configuration file. For omnibus package: ```sh - sudo editor /etc/gitlab/gitlab.rb + sudo editor /etc/gitlab/gitlab.rb ``` For installations from source: ```sh - cd /home/git/gitlab + cd /home/git/gitlab - sudo -u git -H editor config/gitlab.yml + sudo -u git -H editor config/gitlab.yml ``` 1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. - 1. Add the provider configuration: For omnibus package: ```ruby - gitlab_rails['omniauth_providers'] = [ - { - "name" => "bitbucket", - "app_id" => "YOUR_KEY", - "app_secret" => "YOUR_APP_SECRET", - "url" => "https://bitbucket.org/" - } - ] + gitlab_rails['omniauth_providers'] = [ + { + "name" => "bitbucket", + "app_id" => "YOUR_KEY", + "app_secret" => "YOUR_APP_SECRET", + "url" => "https://bitbucket.org/" + } + ] ``` For installation from source: - ``` - - { name: 'bitbucket', app_id: 'YOUR_KEY', + ```yaml + - { name: 'bitbucket', + app_id: 'YOUR_KEY', app_secret: 'YOUR_APP_SECRET' } ``` 1. Change 'YOUR_KEY' to the key from the Bitbucket application page from step 7. - 1. Change 'YOUR_APP_SECRET' to the secret from the Bitbucket application page from step 7. - 1. Save the configuration file. - -1. If you're using the omnibus package, reconfigure GitLab (```gitlab-ctl reconfigure```). - 1. Restart GitLab for the changes to take effect. -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 the user to sign in and authorize the GitLab application. -If everything goes well the user will be returned to GitLab and will be signed in. +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 +the user to sign in and authorize the GitLab application. If everything goes +well the user will be returned to GitLab and will be signed in. ## Bitbucket project import -To allow projects to be imported directly into GitLab, Bitbucket requires two extra setup steps compared to GitHub and GitLab.com. +To allow projects to be imported directly into GitLab, Bitbucket requires two +extra setup steps compared to [GitHub](github.md) and [GitLab.com](gitlab.md). -Bitbucket doesn't allow OAuth applications to clone repositories over HTTPS, and instead requires GitLab to use SSH and identify itself using your GitLab server's SSH key. +Bitbucket doesn't allow OAuth applications to clone repositories over HTTPS, and +instead requires GitLab to use SSH and identify itself using your GitLab +server's SSH key. -### Step 1: Public key +To be able to access repositories on Bitbucket, GitLab will automatically +register your public key with Bitbucket as a deploy key for the repositories to +be imported. Your public key needs to be at `~/.ssh/bitbucket_rsa` which +translates to `/var/opt/gitlab/.ssh/bitbucket_rsa` for Omnibus packages and to +`/home/git/.ssh/bitbucket_rsa.pub` for installations from source. -To be able to access repositories on Bitbucket, GitLab will automatically register your public key with Bitbucket as a deploy key for the repositories to be imported. Your public key needs to be at `~/.ssh/bitbucket_rsa.pub`, which will expand to `/var/opt/gitlab/.ssh/bitbucket_rsa` for omnibus package and to `/home/git/.ssh/bitbucket_rsa.pub` for installations from source. +--- -If you have that file in place, you're all set and should see the "Import projects from Bitbucket" option enabled. If you don't, do the following: +Below are the steps that will allow GitLab to be able to import your projects +from Bitbucket. -1. Create a new SSH key: +1. Make sure you [have enabled the Bitbucket OAuth support](#bitbucket-omniauth-provider). +1. Create a new SSH key with an **empty passphrase**: ```sh sudo -u git -H ssh-keygen ``` - When asked `Enter file in which to save the key` specify the correct path, eg. `/var/opt/gitlab/.ssh/bitbucket_rsa` or `/home/git/.ssh/bitbucket_rsa`. - Make sure to use an **empty passphrase**. + When asked to 'Enter file in which to save the key' enter: + `/var/opt/gitlab/.ssh/bitbucket_rsa` for Omnibus packages or + `/home/git/.ssh/bitbucket_rsa` for installations from source. The name is + important so make sure to get it right. -1. Configure SSH client to use your new key: + > **Warning:** + This key must NOT be associated with ANY existing Bitbucket accounts. If it + is, the import will fail with an `Access denied! Please verify you can add + deploy keys to this repository.` error. + +1. Next, you need to to configure the SSH client to use your new key. Open the + SSH configuration file of the `git` user: - Open the SSH configuration file of the git user. - - For omnibus package: - - ```sh - sudo editor /var/opt/gitlab/.ssh/config ``` - - For installations from source: + # For Omnibus packages + sudo editor /var/opt/gitlab/.ssh/config - ```sh - sudo editor /home/git/.ssh/config + # For installations from source + sudo editor /home/git/.ssh/config ``` - Add a host configuration for `bitbucket.org`. +1. Add a host configuration for `bitbucket.org`: ```sh Host bitbucket.org @@ -129,28 +157,44 @@ If you have that file in place, you're all set and should see the "Import projec User git ``` -### Step 2: Known hosts - -To allow GitLab to connect to Bitbucket over SSH, you need to add 'bitbucket.org' to your GitLab server's known SSH hosts. Take the following steps to do so: - -1. Manually connect to 'bitbucket.org' over SSH, while logged in as the `git` account that GitLab will use: +1. Save the file and exit. +1. Manually connect to `bitbucket.org` over SSH, while logged in as the `git` + user that GitLab will use: ```sh sudo -u git -H ssh bitbucket.org ``` -1. Verify the RSA key fingerprint you'll see in the response matches the one in the [Bitbucket documentation](https://confluence.atlassian.com/display/BITBUCKET/Use+the+SSH+protocol+with+Bitbucket#UsetheSSHprotocolwithBitbucket-KnownhostorBitbucket'spublickeyfingerprints) (the specific IP address doesn't matter): + That step is performed because GitLab needs to connect to Bitbucket over SSH, + in order to add `bitbucket.org` to your GitLab server's known SSH hosts. + +1. Verify the RSA key fingerprint you'll see in the response matches the one + in the [Bitbucket documentation][bitbucket-docs] (the specific IP address + doesn't matter): ```sh - The authenticity of host 'bitbucket.org (207.223.240.182)' can't be established. - RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40. + The authenticity of host 'bitbucket.org (104.192.143.1)' can't be established. + RSA key fingerprint is SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A. Are you sure you want to continue connecting (yes/no)? ``` -1. If the fingerprint matches, type `yes` to continue connecting and have 'bitbucket.org' be added to your known hosts. +1. If the fingerprint matches, type `yes` to continue connecting and have + `bitbucket.org` be added to your known SSH hosts. After confirming you should + see a permission denied message. If you see an authentication successful + message you have done something wrong. The key you are using has already been + added to a Bitbucket account and will cause the import script to fail. Ensure + the key you are using CANNOT authenticate with Bitbucket. +1. Restart GitLab to allow it to find the new public key. -1. Your GitLab server is now able to connect to Bitbucket over SSH. +Your GitLab server is now able to connect to Bitbucket over SSH. You should be +able to see the "Import projects from Bitbucket" option on the New Project page +enabled. -1. Restart GitLab to allow it to find the new public key. +## Acknowledgemts + +Special thanks to the writer behind the following article: + +- http://stratus3d.com/blog/2015/09/06/migrating-from-bitbucket-to-local-gitlab-server/ -You should now see the "Import projects from Bitbucket" option on the New Project page enabled. \ No newline at end of file +[init-oauth]: omniauth.md#initial-omniauth-configuration +[bitbucket-docs]: https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html#UsetheSSHprotocolwithBitbucketCloud-KnownhostorBitbucket%27spublickeyfingerprints diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md index 46b260e7033..8a55fce96fe 100644 --- a/doc/integration/omniauth.md +++ b/doc/integration/omniauth.md @@ -102,8 +102,8 @@ To change these settings: block_auto_created_users: true ``` -Now we can choose one or more of the Supported Providers listed above to continue -the configuration process. +Now we can choose one or more of the [Supported Providers](#supported-providers) +listed above to continue the configuration process. ## Enable OmniAuth for an Existing User -- cgit v1.2.1 From 8fe7817e4d1ec0d97a3d924e2263c9de939efa92 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 30 Aug 2016 17:52:14 +0200 Subject: More Bitbucket integration refactoring --- doc/integration/bitbucket.md | 89 ++++++++++++--------- doc/integration/img/bitbucket_oauth_keys.png | Bin 0 -> 12073 bytes .../img/bitbucket_oauth_settings_page.png | Bin 0 -> 82818 bytes 3 files changed, 50 insertions(+), 39 deletions(-) create mode 100644 doc/integration/img/bitbucket_oauth_keys.png create mode 100644 doc/integration/img/bitbucket_oauth_settings_page.png (limited to 'doc') diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md index 16e54102113..556d71b8b76 100644 --- a/doc/integration/bitbucket.md +++ b/doc/integration/bitbucket.md @@ -1,14 +1,15 @@ # Integrate your GitLab server with Bitbucket -Import projects from Bitbucket and login to your GitLab instance with your -Bitbucket account. +Import projects from Bitbucket.org and login to your GitLab instance with your +Bitbucket.org account. ## Overview -You can set up Bitbucket as an OAuth provider so that you can use your -credentials to authenticate into GitLab or import your projects from Bitbucket. +You can set up Bitbucket.org as an OAuth provider so that you can use your +credentials to authenticate into GitLab or import your projects from +Bitbucket.org. -- To use Bitbucket as an OmniAuth provider, follow the [Bitbucket OmniAuth +- To use Bitbucket.org as an OmniAuth provider, follow the [Bitbucket OmniAuth provider](#bitbucket-omniauth-provider) section. - To import projects from Bitbucket, follow both the [Bitbucket OmniAuth provider](#bitbucket-omniauth-provider) and @@ -21,16 +22,16 @@ Make sure to first follow the [Initial OmniAuth configuration][init-oauth] before proceeding with setting up the Bitbucket integration. To enable the Bitbucket OmniAuth provider you must register your application -with Bitbucket. Bitbucket will generate an application ID and secret key for +with Bitbucket.org. Bitbucket will generate an application ID and secret key for you to use. -1. Sign in to Bitbucket. -1. Navigate to your individual user settings (Manage account) or a team's - settings (Manage team), depending on how you want the application registered. +1. Sign in to [Bitbucket.org](https://bitbucket.org). +1. Navigate to your individual user settings (**Bitbucket settings**) or a team's + settings (**Manage team**), depending on how you want the application registered. It does not matter if the application is registered as an individual or a - team - that is entirely up to you. -1. Select "OAuth" in the left menu. -1. Select "Add consumer". + team, that is entirely up to you. +1. Select **OAuth** in the left menu under "Access Management". +1. Select **Add consumer**. 1. Provide the required details: | Item | Description | @@ -40,66 +41,74 @@ you to use. | **Callback URL** | Leave blank. | | **URL** | The URL to your GitLab installation, e.g., `https://gitlab.example.com`. | -1. Grant at least the following permissions: + And grant at least the following permissions: ``` Account: Email - Repositories: Read + Repositories: Read, Admin ``` -1. Select "Save". -1. Select your newly created OAuth consumer. -1. You should now see a Key and Secret in the list of OAuth customers. - Keep this page open as you continue configuration. -1. On your GitLab server, open the configuration file. + >**Note:** + It may seem a little odd to giving GitLab admin permissions to repositories, + but this is needed in order for GitLab to be able to clone the repositories. - For omnibus package: + ![Bitbucket OAuth settings page](img/bitbucket_oauth_settings_page.png) - ```sh - sudo editor /etc/gitlab/gitlab.rb - ``` +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 + the configuration. - For installations from source: + ![Bitbucket OAuth key](img/bitbucket_oauth_keys.png) - ```sh - cd /home/git/gitlab +1. On your GitLab server, open the configuration file: - sudo -u git -H editor config/gitlab.yml ``` + # For Omnibus packages + sudo editor /etc/gitlab/gitlab.rb -1. See [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) for initial settings. -1. Add the provider configuration: + # For installations from source + sudo -u git -H editor /home/git/gitlab/config/gitlab.yml + ``` + +1. Follow the [Initial OmniAuth Configuration](omniauth.md#initial-omniauth-configuration) + for initial settings. +1. Add the Bitbucket provider configuration: - For omnibus package: + For Omnibus packages: ```ruby gitlab_rails['omniauth_providers'] = [ { "name" => "bitbucket", - "app_id" => "YOUR_KEY", - "app_secret" => "YOUR_APP_SECRET", + "app_id" => "BITBUCKET_APP_KEY", + "app_secret" => "BITBUCKET_APP_SECRET", "url" => "https://bitbucket.org/" } ] ``` - For installation from source: + For installations from source: ```yaml - { name: 'bitbucket', - app_id: 'YOUR_KEY', - app_secret: 'YOUR_APP_SECRET' } + app_id: 'BITBUCKET_APP_KEY', + app_secret: 'BITBUCKET_APP_SECRET' } ``` -1. Change 'YOUR_KEY' to the key from the Bitbucket application page from step 7. -1. Change 'YOUR_APP_SECRET' to the secret from the Bitbucket application page from step 7. + --- + + Where `BITBUCKET_APP_KEY` is the Key and `BITBUCKET_APP_SECRET` the Secret + from the Bitbucket application page. + 1. Save the configuration file. -1. Restart GitLab for the changes to take effect. +1. [Reconfigure][] or [restart GitLab][] for the changes to take effect if you + installed GitLab via Omnibus or from source respectively. 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 the user to sign in and authorize the GitLab application. If everything goes -well the user will be returned to GitLab and will be signed in. +well, the user will be returned to GitLab and will be signed in. ## Bitbucket project import @@ -198,3 +207,5 @@ Special thanks to the writer behind the following article: [init-oauth]: omniauth.md#initial-omniauth-configuration [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 diff --git a/doc/integration/img/bitbucket_oauth_keys.png b/doc/integration/img/bitbucket_oauth_keys.png new file mode 100644 index 00000000000..3fb2f7524a3 Binary files /dev/null and b/doc/integration/img/bitbucket_oauth_keys.png differ diff --git a/doc/integration/img/bitbucket_oauth_settings_page.png b/doc/integration/img/bitbucket_oauth_settings_page.png new file mode 100644 index 00000000000..a3047712d8c Binary files /dev/null and b/doc/integration/img/bitbucket_oauth_settings_page.png differ -- cgit v1.2.1 From 0227e98d0db2eb7fc6a35ddfcd3a0581ab550948 Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Wed, 24 Aug 2016 17:36:58 -0500 Subject: Added CHANGELOG, documentation, and API functionality --- doc/api/projects.md | 3 +++ doc/workflow/project_features.md | 8 ++++++++ 2 files changed, 11 insertions(+) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 3136c493b48..671b4ba7a7a 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -452,6 +452,7 @@ Parameters: - `import_url` (optional) - `public_builds` (optional) - `only_allow_merge_if_build_succeeds` (optional) +- `enable_lfs` (optional) ### Create project for user @@ -478,6 +479,7 @@ Parameters: - `import_url` (optional) - `public_builds` (optional) - `only_allow_merge_if_build_succeeds` (optional) +- `enable_lfs` (optional) ### Edit project @@ -505,6 +507,7 @@ Parameters: - `visibility_level` (optional) - `public_builds` (optional) - `only_allow_merge_if_build_succeeds` (optional) +- `enable_lfs` (optional) On success, method returns 200 with the updated project. If parameters are invalid, 400 is returned. diff --git a/doc/workflow/project_features.md b/doc/workflow/project_features.md index a523b3facbe..6790c06f325 100644 --- a/doc/workflow/project_features.md +++ b/doc/workflow/project_features.md @@ -33,3 +33,11 @@ Snippets are little bits of code or text. This is a nice place to put code or text that is used semi-regularly within the project, but does not belong in source control. For example, a specific config file that is used by > the team that is only valid for the people that work on the code. + +## LFS + +>**Note:** Project specific LFS setting was added on 8.12 and is available only to admins. + +Git Large File Storage allows you to easily manage large binary files with Git. +With this setting admins can keep better control of which projects are allowed +to use LFS, thus allowing for better storage usage control. -- cgit v1.2.1 From cf37d623e197dae5cc7efb021c1b1d85ca9674ee Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Tue, 30 Aug 2016 17:17:45 -0500 Subject: Renamed `enable_lfs` to `lfs_enabled` for the Project field, and related fixes. --- doc/api/projects.md | 6 +++--- doc/workflow/project_features.md | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/api/projects.md b/doc/api/projects.md index 671b4ba7a7a..0d5aa61aa74 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -452,7 +452,7 @@ Parameters: - `import_url` (optional) - `public_builds` (optional) - `only_allow_merge_if_build_succeeds` (optional) -- `enable_lfs` (optional) +- `lfs_enabled` (optional) ### Create project for user @@ -479,7 +479,7 @@ Parameters: - `import_url` (optional) - `public_builds` (optional) - `only_allow_merge_if_build_succeeds` (optional) -- `enable_lfs` (optional) +- `lfs_enabled` (optional) ### Edit project @@ -507,7 +507,7 @@ Parameters: - `visibility_level` (optional) - `public_builds` (optional) - `only_allow_merge_if_build_succeeds` (optional) -- `enable_lfs` (optional) +- `lfs_enabled` (optional) On success, method returns 200 with the updated project. If parameters are invalid, 400 is returned. diff --git a/doc/workflow/project_features.md b/doc/workflow/project_features.md index 6790c06f325..f19e7df8c9a 100644 --- a/doc/workflow/project_features.md +++ b/doc/workflow/project_features.md @@ -32,12 +32,12 @@ Snippets are little bits of code or text. This is a nice place to put code or text that is used semi-regularly within the project, but does not belong in source control. -For example, a specific config file that is used by > the team that is only valid for the people that work on the code. +For example, a specific config file that is used by the team that is only valid for the people that work on the code. -## LFS +## Git LFS ->**Note:** Project specific LFS setting was added on 8.12 and is available only to admins. +>**Note:** Project-specific LFS setting was added on 8.12 and is available only to admins. Git Large File Storage allows you to easily manage large binary files with Git. -With this setting admins can keep better control of which projects are allowed -to use LFS, thus allowing for better storage usage control. +With this setting admins can better control which projects are allowed to use +LFS. -- cgit v1.2.1 From 727dff3f158b9ef852b2b014d4efe0abd69a23d0 Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Fri, 26 Aug 2016 09:37:57 +0530 Subject: Don't expose a user's private token in the `/api/v3/user` API. - This would allow anyone with a personal access token (even a read-only token, once scopes are implemented) to escalate their access by obtaining the private token. --- doc/api/users.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/users.md b/doc/api/users.md index 7e848586dbd..54f7a2a2ace 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -310,8 +310,7 @@ GET /user "can_create_group": true, "can_create_project": true, "two_factor_enabled": true, - "external": false, - "private_token": "dd34asd13as" + "external": false } ``` -- cgit v1.2.1 From 036cc8c27e8340a3eed63444bd3f42f86037f350 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Fri, 15 Jul 2016 16:21:53 +0200 Subject: API: Expose issue#confidential --- doc/api/issues.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/api/issues.md b/doc/api/issues.md index b194799ccbf..eed0d2fce51 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -80,7 +80,8 @@ Example response: "subscribed" : false, "user_notes_count": 1, "due_date": "2016-07-22", - "web_url": "http://example.com/example/example/issues/6" + "web_url": "http://example.com/example/example/issues/6", + "confidential": false } ] ``` @@ -158,7 +159,8 @@ Example response: "subscribed" : false, "user_notes_count": 1, "due_date": null, - "web_url": "http://example.com/example/example/issues/1" + "web_url": "http://example.com/example/example/issues/1", + "confidential": false } ] ``` @@ -238,7 +240,8 @@ Example response: "subscribed" : false, "user_notes_count": 1, "due_date": "2016-07-22", - "web_url": "http://example.com/example/example/issues/1" + "web_url": "http://example.com/example/example/issues/1", + "confidential": false } ] ``` @@ -303,7 +306,8 @@ Example response: "subscribed": false, "user_notes_count": 1, "due_date": null, - "web_url": "http://example.com/example/example/issues/1" + "web_url": "http://example.com/example/example/issues/1", + "confidential": false } ``` @@ -324,6 +328,7 @@ POST /projects/:id/issues | `id` | integer | yes | The ID of a project | | `title` | string | yes | The title of an issue | | `description` | string | no | The description of an issue | +| `confidential` | boolean | no | Set an issue to be confidential. Default is `false`. | | `assignee_id` | integer | no | The ID of a user to assign issue | | `milestone_id` | integer | no | The ID of a milestone to assign issue | | `labels` | string | no | Comma-separated label names for an issue | @@ -362,7 +367,8 @@ Example response: "subscribed" : true, "user_notes_count": 0, "due_date": null, - "web_url": "http://example.com/example/example/issues/14" + "web_url": "http://example.com/example/example/issues/14", + "confidential": false } ``` @@ -385,6 +391,7 @@ PUT /projects/:id/issues/:issue_id | `issue_id` | integer | yes | The ID of a project's issue | | `title` | string | no | The title of an issue | | `description` | string | no | The description of an issue | +| `confidential` | boolean | no | Updates an issue to be confidential | | `assignee_id` | integer | no | The ID of a user to assign the issue to | | `milestone_id` | integer | no | The ID of a milestone to assign the issue to | | `labels` | string | no | Comma-separated label names for an issue | @@ -424,7 +431,8 @@ Example response: "subscribed" : true, "user_notes_count": 0, "due_date": "2016-07-22", - "web_url": "http://example.com/example/example/issues/15" + "web_url": "http://example.com/example/example/issues/15", + "confidential": false } ``` @@ -503,7 +511,8 @@ Example response: "web_url": "https://gitlab.example.com/u/solon.cremin" }, "due_date": null, - "web_url": "http://example.com/example/example/issues/11" + "web_url": "http://example.com/example/example/issues/11", + "confidential": false } ``` @@ -559,7 +568,8 @@ Example response: "web_url": "https://gitlab.example.com/u/solon.cremin" }, "due_date": null, - "web_url": "http://example.com/example/example/issues/11" + "web_url": "http://example.com/example/example/issues/11", + "confidential": false } ``` @@ -616,7 +626,8 @@ Example response: }, "subscribed": false, "due_date": null, - "web_url": "http://example.com/example/example/issues/12" + "web_url": "http://example.com/example/example/issues/12", + "confidential": false } ``` @@ -704,7 +715,8 @@ Example response: "upvotes": 0, "downvotes": 0, "due_date": null, - "web_url": "http://example.com/example/example/issues/110" + "web_url": "http://example.com/example/example/issues/110", + "confidential": false }, "target_url": "https://gitlab.example.com/gitlab-org/gitlab-ci/issues/10", "body": "Vel voluptas atque dicta mollitia adipisci qui at.", -- cgit v1.2.1 From 5ebc787ca02e018b0344bd4e4fc2a6ac9f6f1677 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 31 Aug 2016 16:42:36 +0200 Subject: Final piece of search-and-replace --- doc/update/8.11-to-8.12.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/update/8.11-to-8.12.md b/doc/update/8.11-to-8.12.md index 544a80662d3..aac19897f9e 100644 --- a/doc/update/8.11-to-8.12.md +++ b/doc/update/8.11-to-8.12.md @@ -185,7 +185,7 @@ If all items are green, then congratulations, the upgrade is complete! ### 1. Revert the code to the previous version -Follow the [upgrade guide from 8.9 to 8.11](8.9-to-8.11.md), except for the +Follow the [upgrade guide from 8.10 to 8.11](8.10-to-8.11.md), except for the database migration (the backup is already migrated to the previous version). ### 2. Restore from the backup -- cgit v1.2.1 From 9c3db830c033750c19197fe6a3f15a7705e2aa3b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 23 Aug 2016 13:29:59 -0400 Subject: entities: expose {,merge_commit_}sha in MergeRequest Fixes #20456. --- doc/api/merge_requests.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index f4760ceac7c..494040a1ce8 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -68,6 +68,8 @@ Parameters: "merge_when_build_succeeds": true, "merge_status": "can_be_merged", "subscribed" : false, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": null, "user_notes_count": 1, "should_remove_source_branch": true, "force_remove_source_branch": false, @@ -135,6 +137,8 @@ Parameters: "merge_when_build_succeeds": true, "merge_status": "can_be_merged", "subscribed" : true, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": "9999999999999999999999999999999999999999", "user_notes_count": 1, "should_remove_source_branch": true, "force_remove_source_branch": false, @@ -238,6 +242,8 @@ Parameters: "merge_when_build_succeeds": true, "merge_status": "can_be_merged", "subscribed" : true, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": null, "user_notes_count": 1, "should_remove_source_branch": true, "force_remove_source_branch": false, @@ -322,6 +328,8 @@ Parameters: "merge_when_build_succeeds": true, "merge_status": "can_be_merged", "subscribed" : true, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": null, "user_notes_count": 0, "should_remove_source_branch": true, "force_remove_source_branch": false, @@ -397,6 +405,8 @@ Parameters: "merge_when_build_succeeds": true, "merge_status": "can_be_merged", "subscribed" : true, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": null, "user_notes_count": 1, "should_remove_source_branch": true, "force_remove_source_branch": false, @@ -499,6 +509,8 @@ Parameters: "merge_when_build_succeeds": true, "merge_status": "can_be_merged", "subscribed" : true, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": "9999999999999999999999999999999999999999", "user_notes_count": 1, "should_remove_source_branch": true, "force_remove_source_branch": false, @@ -569,6 +581,8 @@ Parameters: "merge_when_build_succeeds": true, "merge_status": "can_be_merged", "subscribed" : true, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": null, "user_notes_count": 1, "should_remove_source_branch": true, "force_remove_source_branch": false, @@ -724,7 +738,9 @@ Example response: }, "merge_when_build_succeeds": false, "merge_status": "cannot_be_merged", - "subscribed": true + "subscribed": true, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": null } ``` @@ -798,7 +814,9 @@ Example response: }, "merge_when_build_succeeds": false, "merge_status": "cannot_be_merged", - "subscribed": false + "subscribed": false, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": null } ``` @@ -891,6 +909,8 @@ Example response: "merge_when_build_succeeds": false, "merge_status": "unchecked", "subscribed": true, + "sha": "8888888888888888888888888888888888888888", + "merge_commit_sha": null, "user_notes_count": 7, "should_remove_source_branch": true, "force_remove_source_branch": false, -- cgit v1.2.1 From 90c0fdfc9da36c29fe5093b78e0581c19c2279b5 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 31 Aug 2016 17:12:37 +0200 Subject: More changes suggested by Robert --- doc/install/installation.md | 1 - doc/update/8.11-to-8.12.md | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index f012c9cd51b..2d0932d4f04 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -334,7 +334,6 @@ sudo usermod -aG redis git # Enable packfile bitmaps sudo -u git -H git config --global repack.writeBitmaps true - # Configure Redis connection settings sudo -u git -H cp config/resque.yml.example config/resque.yml diff --git a/doc/update/8.11-to-8.12.md b/doc/update/8.11-to-8.12.md index aac19897f9e..953e9d7e74c 100644 --- a/doc/update/8.11-to-8.12.md +++ b/doc/update/8.11-to-8.12.md @@ -105,7 +105,6 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production # Clean up assets and cache sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production - ``` ### 8. Update configuration files @@ -120,8 +119,10 @@ git diff origin/8-11-stable:config/gitlab.yml.example origin/8-12-stable:config/ #### Git configuration +Configure Git to generate packfile bitmaps (introduced in Git 2.0) on +the GitLab server during `git gc`. + ```sh -# Enable packfile bitmaps sudo -u git -H git config --global repack.writeBitmaps true ``` -- cgit v1.2.1 From 636dbc85e24600849de9dd09c4854edf4adfe807 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Wed, 31 Aug 2016 17:40:54 +0200 Subject: The ID of a project can be also a string [ci skip] --- doc/api/commits.md | 14 +++++++------- doc/api/projects.md | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/api/commits.md b/doc/api/commits.md index 55d0de7afd9..682151d4b1d 100644 --- a/doc/api/commits.md +++ b/doc/api/commits.md @@ -10,7 +10,7 @@ GET /projects/:id/repository/commits | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user +| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `ref_name` | string | no | The name of a repository branch or tag or if not given the default branch | | `since` | string | no | Only commits after or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | | `until` | string | no | Only commits before or in this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | @@ -58,7 +58,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user +| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit hash or name of a repository branch or tag | ```bash @@ -102,7 +102,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user +| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit hash or name of a repository branch or tag | ```bash @@ -138,7 +138,7 @@ Parameters: | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user +| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit hash or name of a repository branch or tag | ```bash @@ -187,7 +187,7 @@ POST /projects/:id/repository/commits/:sha/comments | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user +| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit SHA or name of a repository branch or tag | | `note` | string | yes | The text of the comment | | `path` | string | no | The file path relative to the repository | @@ -232,7 +232,7 @@ GET /projects/:id/repository/commits/:sha/statuses | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user +| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit SHA | `ref_name`| string | no | The name of a repository branch or tag or, if not given, the default branch | `stage` | string | no | Filter by [build stage](../ci/yaml/README.md#stages), e.g., `test` @@ -306,7 +306,7 @@ POST /projects/:id/statuses/:sha | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user +| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `sha` | string | yes | The commit SHA | `state` | string | yes | The state of the status. Can be one of the following: `pending`, `running`, `success`, `failed`, `canceled` | `ref` | string | no | The `ref` (branch or tag) to which the status refers diff --git a/doc/api/projects.md b/doc/api/projects.md index 0d5aa61aa74..a62aaee14d7 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -535,7 +535,7 @@ POST /projects/:id/star | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME | +| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | ```bash curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" @@ -602,7 +602,7 @@ DELETE /projects/:id/star | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME | +| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | ```bash curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/5/star" @@ -673,7 +673,7 @@ POST /projects/:id/archive | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME | +| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | ```bash curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/archive" @@ -760,7 +760,7 @@ POST /projects/:id/unarchive | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | -| `id` | integer | yes | The ID of the project or NAMESPACE/PROJECT_NAME | +| `id` | integer/string | yes | The ID of the project or NAMESPACE/PROJECT_NAME | ```bash curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/unarchive" -- cgit v1.2.1 From 9d4af1b14068aa77848b982372ddf9e11567ae5f Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 30 Aug 2016 16:47:44 -0300 Subject: Add BroadcastMessage API documentation --- doc/api/broadcast_messages.md | 158 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 doc/api/broadcast_messages.md (limited to 'doc') diff --git a/doc/api/broadcast_messages.md b/doc/api/broadcast_messages.md new file mode 100644 index 00000000000..c3a9207a3ae --- /dev/null +++ b/doc/api/broadcast_messages.md @@ -0,0 +1,158 @@ +# Broadcast Messages + +> **Note:** This feature was introduced in GitLab 8.12. + +The broadcast message API is only accessible to administrators. All requests by +guests will respond with `401 Unauthorized`, and all requests by normal users +will respond with `403 Forbidden`. + +## Get all broadcast messages + +``` +GET /broadcast_messages +``` + +```bash +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/broadcast_messages +``` + +Example response: + +```json +[ + { + "message":"Example broadcast message", + "starts_at":"2016-08-24T23:21:16.078Z", + "ends_at":"2016-08-26T23:21:16.080Z", + "color":"#E75E40", + "font":"#FFFFFF", + "id":1, + "active": false + } +] +``` + +## Get a specific broadcast message + +``` +GET /broadcast_messages/:id +``` + +| Attribute | Type | Required | Description | +| ----------- | -------- | -------- | ------------------------- | +| `id` | integer | yes | Broadcast message ID | + +```bash +curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/broadcast_messages/1 +``` + +Example response: + +```json +{ + "message":"Deploy in progress", + "starts_at":"2016-08-24T23:21:16.078Z", + "ends_at":"2016-08-26T23:21:16.080Z", + "color":"#cecece", + "font":"#FFFFFF", + "id":1, + "active":false +} +``` + +## Create a broadcast message + +Responds with `400 Bad request` when the `message` parameter is missing or the +`color` or `font` values are invalid, and `201 Created` when the broadcast +message was successfully created. + +``` +POST /broadcast_messages +``` + +| Attribute | Type | Required | Description | +| ----------- | -------- | -------- | ---------------------------------------------------- | +| `message` | string | yes | Message to display | +| `starts_at` | datetime | no | Starting time (defaults to current time) | +| `ends_at` | datetime | no | Ending time (defaults to one hour from current time) | +| `color` | string | no | Background color hex code | +| `font` | string | no | Foreground color hex code | + +```bash +curl --data "message=Deploy in progress&color=#cecece" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/broadcast_messages +``` + +Example response: + +```json +{ + "message":"Deploy in progress", + "starts_at":"2016-08-26T00:41:35.060Z", + "ends_at":"2016-08-26T01:41:35.060Z", + "color":"#cecece", + "font":"#FFFFFF", + "id":1, + "active": true +} +``` + +## Update a broadcast message + +``` +PUT /broadcast_messages/:id +``` + +| Attribute | Type | Required | Description | +| ----------- | -------- | -------- | ------------------------- | +| `id` | integer | yes | Broadcast message ID | +| `message` | string | no | Message to display | +| `starts_at` | datetime | no | Starting time | +| `ends_at` | datetime | no | Ending time | +| `color` | string | no | Background color hex code | +| `font` | string | no | Foreground color hex code | + +```bash +curl --request PUT --data "message=Update message&color=#000" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/broadcast_messages/1 +``` + +Example response: + +```json +{ + "message":"Update message", + "starts_at":"2016-08-26T00:41:35.060Z", + "ends_at":"2016-08-26T01:41:35.060Z", + "color":"#000", + "font":"#FFFFFF", + "id":1, + "active": true +} +``` + +## Delete a broadcast message + +``` +DELETE /broadcast_messages/:id +``` + +| Attribute | Type | Required | Description | +| ----------- | -------- | -------- | ------------------------- | +| `id` | integer | yes | Broadcast message ID | + +```bash +curl --request DELETE --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/broadcast_messages/1 +``` + +Example response: + +```json +{ + "message":"Update message", + "starts_at":"2016-08-26T00:41:35.060Z", + "ends_at":"2016-08-26T01:41:35.060Z", + "color":"#000", + "font":"#FFFFFF", + "id":1, + "active": true +} +``` -- cgit v1.2.1 From 892dea67717c0efbd6a28f7639f34535ec0a8747 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Mon, 1 Aug 2016 19:31:21 -0300 Subject: Project tools visibility level --- doc/user/permissions.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/user/permissions.md b/doc/user/permissions.md index 66542861781..1498cb361c8 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -104,6 +104,15 @@ will find the option to flag the user as external. By default new users are not set as external users. This behavior can be changed by an administrator under **Admin > Application Settings**. +## Project features + +Project features like wiki and issues can be hidden from users depending on +which visibility level you select on project settings. + +- Disabled: disabled for everyone +- Only team members: only team members will see even if your project is public or internal +- Everyone with access: everyone can see depending on your project visibility level + ## GitLab CI GitLab CI permissions rely on the role the user has in GitLab. There are four -- cgit v1.2.1 From dd0431c5f7c93a2f9cee6766c9c8f3b0536022e9 Mon Sep 17 00:00:00 2001 From: Ruben Davila Date: Thu, 1 Sep 2016 12:33:37 -0500 Subject: Some minor updates for upgrade guides for 8.12. --- doc/install/installation.md | 4 ++-- doc/update/8.11-to-8.12.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/install/installation.md b/doc/install/installation.md index 2d0932d4f04..9522c3e7170 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -268,9 +268,9 @@ sudo usermod -aG redis git ### Clone the Source # Clone GitLab repository - sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-11-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-12-stable gitlab -**Note:** You can change `8-11-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +**Note:** You can change `8-12-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ### Configure It diff --git a/doc/update/8.11-to-8.12.md b/doc/update/8.11-to-8.12.md index 953e9d7e74c..c8ca42f97bc 100644 --- a/doc/update/8.11-to-8.12.md +++ b/doc/update/8.11-to-8.12.md @@ -82,7 +82,7 @@ GitLab 8.1. ```bash cd /home/git/gitlab-workhorse sudo -u git -H git fetch --all -sudo -u git -H git checkout v0.7.8 +sudo -u git -H git checkout v0.7.11 sudo -u git -H make ``` -- cgit v1.2.1 From 3ef2c38b63031984c2a284a983bce805c5a0181a Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 2 Sep 2016 08:55:54 +0200 Subject: Change the inline code to codeblocks for the new features doc guideline [ci skip] --- doc/development/doc_styleguide.md | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/development/doc_styleguide.md b/doc/development/doc_styleguide.md index 37bb59e112c..39b801f761d 100644 --- a/doc/development/doc_styleguide.md +++ b/doc/development/doc_styleguide.md @@ -155,15 +155,30 @@ Inside the document: - Every piece of documentation that comes with a new feature should declare the GitLab version that feature got introduced. Right below the heading add a - note: `> Introduced in GitLab 8.3.`. + note: + + ``` + > Introduced in GitLab 8.3. + ``` + - If possible every feature should have a link to the MR that introduced it. The above note would be then transformed to: - `> [Introduced][ce-1242] in GitLab 8.3.`, where - the [link identifier](#links) is named after the repository (CE) and the MR - number. -- If the feature is only in GitLab EE, don't forget to mention it, like: - `> Introduced in GitLab EE 8.3.`. Otherwise, leave - this mention out. + + ``` + > [Introduced][ce-1242] in GitLab 8.3. + ``` + + , where the [link identifier](#links) is named after the repository (CE) and + the MR number. + +- If the feature is only in GitLab Enterprise Edition, don't forget to mention + it, like: + + ``` + > Introduced in GitLab Enterprise Edition 8.3. + ``` + + Otherwise, leave this mention out. ## References -- cgit v1.2.1 From 619b350279c6e3a987cefce935fdaf7ab13632ff Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Tue, 23 Aug 2016 15:18:42 +0000 Subject: Update memory requirements --- doc/install/requirements.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 571f1a38358..b499d3422d1 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -63,24 +63,24 @@ If you have enough RAM memory and a recent CPU the speed of GitLab is mainly lim ### Memory -You need at least 2GB of addressable memory (RAM + swap) to install and use GitLab! +You need at least 4GB of addressable memory (RAM + swap) to install and use GitLab! The operating system and any other running applications will also be using memory -so keep in mind that you need at least 2GB available before running GitLab. With +so keep in mind that you need at least 4GB available before running GitLab. With less memory GitLab will give strange errors during the reconfigure run and 500 errors during usage. -- 512MB RAM + 1.5GB of swap is the absolute minimum but we strongly **advise against** this amount of memory. See the unicorn worker section below for more advice. -- 1GB RAM + 1GB swap supports up to 100 users but it will be very slow -- **2GB RAM** is the **recommended** memory size for all installations and supports up to 100 users -- 4GB RAM supports up to 1,000 users -- 8GB RAM supports up to 2,000 users -- 16GB RAM supports up to 4,000 users -- 32GB RAM supports up to 8,000 users -- 64GB RAM supports up to 16,000 users -- 128GB RAM supports up to 32,000 users +- 1GB RAM + 3GB of swap is the absolute minimum but we strongly **advise against** this amount of memory. See the unicorn worker section below for more advice. +- 2GB RAM + 2GB swap supports up to 100 users but it will be very slow +- **4GB RAM** is the **recommended** memory size for all installations and supports up to 100 users +- 8GB RAM supports up to 1,000 users +- 16GB RAM supports up to 2,000 users +- 32GB RAM supports up to 4,000 users +- 64GB RAM supports up to 8,000 users +- 128GB RAM supports up to 16,000 users +- 256GB RAM supports up to 32,000 users - More users? Run it on [multiple application servers](https://about.gitlab.com/high-availability/) -We recommend having at least 1GB of swap on your server, even if you currently have +We recommend having at least 2GB of swap on your server, even if you currently have enough available RAM. Having swap will help reduce the chance of errors occurring if your available memory changes. @@ -113,10 +113,10 @@ It's possible to increase the amount of unicorn workers and this will usually he For most instances we recommend using: CPU cores + 1 = unicorn workers. So for a machine with 2 cores, 3 unicorn workers is ideal. -For all machines that have 1GB and up we recommend a minimum of three unicorn workers. -If you have a 512MB machine with a magnetic (non-SSD) swap drive we recommend to configure only one Unicorn worker to prevent excessive swapping. +For all machines that have 2GB and up we recommend a minimum of three unicorn workers. +If you have a 1GB machine with a magnetic (non-SSD) swap drive we recommend to configure only one Unicorn worker to prevent excessive swapping. With one Unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). -If you have a 512MB machine with a SSD drive you can use two Unicorn workers, this will allow HTTP access although it will be slow due to swapping. +If you have a 1GB machine with a SSD drive you can use two Unicorn workers, this will allow HTTP access although it will be slow due to swapping. To change the Unicorn workers when you have the Omnibus package please see [the Unicorn settings in the Omnibus GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/unicorn.md#unicorn-settings). -- cgit v1.2.1 From a3828abb63306967c8e2d1c3602b8b7d953b74a0 Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Thu, 1 Sep 2016 09:08:25 +0200 Subject: Change minimum Unicorns required to two --- doc/install/requirements.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index b499d3422d1..04907249f5c 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -114,9 +114,7 @@ For most instances we recommend using: CPU cores + 1 = unicorn workers. So for a machine with 2 cores, 3 unicorn workers is ideal. For all machines that have 2GB and up we recommend a minimum of three unicorn workers. -If you have a 1GB machine with a magnetic (non-SSD) swap drive we recommend to configure only one Unicorn worker to prevent excessive swapping. -With one Unicorn worker only git over ssh access will work because the git over HTTP access requires two running workers (one worker to receive the user request and one worker for the authorization check). -If you have a 1GB machine with a SSD drive you can use two Unicorn workers, this will allow HTTP access although it will be slow due to swapping. +If you have a 1GB machine we recommend to configure only two Unicorn worker to prevent excessive swapping. To change the Unicorn workers when you have the Omnibus package please see [the Unicorn settings in the Omnibus GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/unicorn.md#unicorn-settings). -- cgit v1.2.1 From 04a5a88f61c61fa916d151da9505be7292b7c7d9 Mon Sep 17 00:00:00 2001 From: Ahmad Sherif Date: Thu, 1 Sep 2016 09:24:47 +0200 Subject: Fix a typo --- doc/install/requirements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 04907249f5c..9799e0a3730 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -114,7 +114,7 @@ For most instances we recommend using: CPU cores + 1 = unicorn workers. So for a machine with 2 cores, 3 unicorn workers is ideal. For all machines that have 2GB and up we recommend a minimum of three unicorn workers. -If you have a 1GB machine we recommend to configure only two Unicorn worker to prevent excessive swapping. +If you have a 1GB machine we recommend to configure only two Unicorn workers to prevent excessive swapping. To change the Unicorn workers when you have the Omnibus package please see [the Unicorn settings in the Omnibus GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/unicorn.md#unicorn-settings). -- cgit v1.2.1 From 05c22ca3e0a4db1cd4b23376bb2b61cc0e877eff Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Wed, 22 Jun 2016 22:56:15 +0200 Subject: Add documentation on template dropdowns --- doc/gitlab-basics/add-file.md | 16 +++++++++++++--- doc/gitlab-basics/basicsimages/file_button.png | Bin 0 -> 14131 bytes doc/gitlab-basics/basicsimages/first_file.png | Bin 0 -> 25748 bytes doc/gitlab-basics/basicsimages/mit_license.png | Bin 0 -> 101405 bytes 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 doc/gitlab-basics/basicsimages/file_button.png create mode 100644 doc/gitlab-basics/basicsimages/first_file.png create mode 100644 doc/gitlab-basics/basicsimages/mit_license.png (limited to 'doc') diff --git a/doc/gitlab-basics/add-file.md b/doc/gitlab-basics/add-file.md index 57136ac5c39..e1e55a43de4 100644 --- a/doc/gitlab-basics/add-file.md +++ b/doc/gitlab-basics/add-file.md @@ -26,6 +26,16 @@ Add a commit message based on what you just added and then click on "commit chan ![Commit changes](basicsimages/commit_changes.png) -### Note -Besides its regular files, every directory needs a README.md or README.html file which works like an index, telling -what the directory is about. It's the first document you'll find when you open a directory. +# On a new project + +When starting a new project, there are some common files which the new project might need too. Therefor a message will be displayed by GitLab to make this easy for you. + +![First file for your project](basicsimages/first_file.png) + +When clicking on either `LICENSE` or `.gitignore`, a dropdown will be displayed to provide you with a template which might be suitable for your project. + +![MIT license selected](basicsimages/mit_license.png) + +The license, changelog, contribution guide, or `.gitlab-ci.yml` file could also be added through a button on the project page. In the example below the license has already been created, which creates a link to the license itself. + +![New file button](basicsimages/file_button.png) diff --git a/doc/gitlab-basics/basicsimages/file_button.png b/doc/gitlab-basics/basicsimages/file_button.png new file mode 100644 index 00000000000..4efc51cc423 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/file_button.png differ diff --git a/doc/gitlab-basics/basicsimages/first_file.png b/doc/gitlab-basics/basicsimages/first_file.png new file mode 100644 index 00000000000..67190c58823 Binary files /dev/null and b/doc/gitlab-basics/basicsimages/first_file.png differ diff --git a/doc/gitlab-basics/basicsimages/mit_license.png b/doc/gitlab-basics/basicsimages/mit_license.png new file mode 100644 index 00000000000..3695a11e34c Binary files /dev/null and b/doc/gitlab-basics/basicsimages/mit_license.png differ -- cgit v1.2.1 From 8ab659aa5d09b2da1cf68ac6c149d0225690d6a2 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Fri, 22 Jul 2016 08:30:33 +0200 Subject: Correct spelling of therefore [ci skip] --- doc/gitlab-basics/add-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/gitlab-basics/add-file.md b/doc/gitlab-basics/add-file.md index e1e55a43de4..27591a4a15a 100644 --- a/doc/gitlab-basics/add-file.md +++ b/doc/gitlab-basics/add-file.md @@ -28,7 +28,7 @@ Add a commit message based on what you just added and then click on "commit chan # On a new project -When starting a new project, there are some common files which the new project might need too. Therefor a message will be displayed by GitLab to make this easy for you. +When starting a new project, there are some common files which the new project might need too. Therefore a message will be displayed by GitLab to make this easy for you. ![First file for your project](basicsimages/first_file.png) -- cgit v1.2.1 From 30b56b160b854baf03bfacd80c0e87d62716dd0f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 2 Sep 2016 13:11:57 +0200 Subject: Move web_editor doc to new location --- .../img/web_editor_new_branch_dropdown.png | Bin 0 -> 20436 bytes .../repository/img/web_editor_new_branch_page.png | Bin 0 -> 11245 bytes .../img/web_editor_new_directory_dialog.png | Bin 0 -> 13339 bytes .../img/web_editor_new_directory_dropdown.png | Bin 0 -> 20007 bytes .../img/web_editor_new_file_dropdown.png | Bin 0 -> 20680 bytes .../repository/img/web_editor_new_file_editor.png | Bin 0 -> 66261 bytes .../repository/img/web_editor_new_push_widget.png | Bin 0 -> 7076 bytes .../repository/img/web_editor_new_tag_dropdown.png | Bin 0 -> 20080 bytes .../repository/img/web_editor_new_tag_page.png | Bin 0 -> 36610 bytes .../img/web_editor_start_new_merge_request.png | Bin 0 -> 8596 bytes .../img/web_editor_upload_file_dialog.png | Bin 0 -> 21502 bytes .../img/web_editor_upload_file_dropdown.png | Bin 0 -> 20651 bytes doc/user/project/repository/web_editor.md | 151 ++++++++++++++++++++ doc/workflow/README.md | 2 +- .../img/web_editor_new_branch_dropdown.png | Bin 20436 -> 0 bytes doc/workflow/img/web_editor_new_branch_page.png | Bin 11245 -> 0 bytes .../img/web_editor_new_directory_dialog.png | Bin 13339 -> 0 bytes .../img/web_editor_new_directory_dropdown.png | Bin 20007 -> 0 bytes doc/workflow/img/web_editor_new_file_dropdown.png | Bin 20680 -> 0 bytes doc/workflow/img/web_editor_new_file_editor.png | Bin 66261 -> 0 bytes doc/workflow/img/web_editor_new_push_widget.png | Bin 7076 -> 0 bytes doc/workflow/img/web_editor_new_tag_dropdown.png | Bin 20080 -> 0 bytes doc/workflow/img/web_editor_new_tag_page.png | Bin 36610 -> 0 bytes .../img/web_editor_start_new_merge_request.png | Bin 8596 -> 0 bytes doc/workflow/img/web_editor_upload_file_dialog.png | Bin 21502 -> 0 bytes .../img/web_editor_upload_file_dropdown.png | Bin 20651 -> 0 bytes doc/workflow/web_editor.md | 152 +-------------------- 27 files changed, 153 insertions(+), 152 deletions(-) create mode 100644 doc/user/project/repository/img/web_editor_new_branch_dropdown.png create mode 100644 doc/user/project/repository/img/web_editor_new_branch_page.png create mode 100644 doc/user/project/repository/img/web_editor_new_directory_dialog.png create mode 100644 doc/user/project/repository/img/web_editor_new_directory_dropdown.png create mode 100644 doc/user/project/repository/img/web_editor_new_file_dropdown.png create mode 100644 doc/user/project/repository/img/web_editor_new_file_editor.png create mode 100644 doc/user/project/repository/img/web_editor_new_push_widget.png create mode 100644 doc/user/project/repository/img/web_editor_new_tag_dropdown.png create mode 100644 doc/user/project/repository/img/web_editor_new_tag_page.png create mode 100644 doc/user/project/repository/img/web_editor_start_new_merge_request.png create mode 100644 doc/user/project/repository/img/web_editor_upload_file_dialog.png create mode 100644 doc/user/project/repository/img/web_editor_upload_file_dropdown.png create mode 100644 doc/user/project/repository/web_editor.md delete mode 100644 doc/workflow/img/web_editor_new_branch_dropdown.png delete mode 100644 doc/workflow/img/web_editor_new_branch_page.png delete mode 100644 doc/workflow/img/web_editor_new_directory_dialog.png delete mode 100644 doc/workflow/img/web_editor_new_directory_dropdown.png delete mode 100644 doc/workflow/img/web_editor_new_file_dropdown.png delete mode 100644 doc/workflow/img/web_editor_new_file_editor.png delete mode 100644 doc/workflow/img/web_editor_new_push_widget.png delete mode 100644 doc/workflow/img/web_editor_new_tag_dropdown.png delete mode 100644 doc/workflow/img/web_editor_new_tag_page.png delete mode 100644 doc/workflow/img/web_editor_start_new_merge_request.png delete mode 100644 doc/workflow/img/web_editor_upload_file_dialog.png delete mode 100644 doc/workflow/img/web_editor_upload_file_dropdown.png (limited to 'doc') diff --git a/doc/user/project/repository/img/web_editor_new_branch_dropdown.png b/doc/user/project/repository/img/web_editor_new_branch_dropdown.png new file mode 100644 index 00000000000..a8e635d2faf Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_branch_dropdown.png differ diff --git a/doc/user/project/repository/img/web_editor_new_branch_page.png b/doc/user/project/repository/img/web_editor_new_branch_page.png new file mode 100644 index 00000000000..7f36b7faf63 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_branch_page.png differ diff --git a/doc/user/project/repository/img/web_editor_new_directory_dialog.png b/doc/user/project/repository/img/web_editor_new_directory_dialog.png new file mode 100644 index 00000000000..d16e3c67116 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_directory_dialog.png differ diff --git a/doc/user/project/repository/img/web_editor_new_directory_dropdown.png b/doc/user/project/repository/img/web_editor_new_directory_dropdown.png new file mode 100644 index 00000000000..c8d77b16ee8 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_directory_dropdown.png differ diff --git a/doc/user/project/repository/img/web_editor_new_file_dropdown.png b/doc/user/project/repository/img/web_editor_new_file_dropdown.png new file mode 100644 index 00000000000..3fcb91c9b93 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_file_dropdown.png differ diff --git a/doc/user/project/repository/img/web_editor_new_file_editor.png b/doc/user/project/repository/img/web_editor_new_file_editor.png new file mode 100644 index 00000000000..21c340b9288 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_file_editor.png differ diff --git a/doc/user/project/repository/img/web_editor_new_push_widget.png b/doc/user/project/repository/img/web_editor_new_push_widget.png new file mode 100644 index 00000000000..c7738a4c930 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_push_widget.png differ diff --git a/doc/user/project/repository/img/web_editor_new_tag_dropdown.png b/doc/user/project/repository/img/web_editor_new_tag_dropdown.png new file mode 100644 index 00000000000..ac7415009b3 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_tag_dropdown.png differ diff --git a/doc/user/project/repository/img/web_editor_new_tag_page.png b/doc/user/project/repository/img/web_editor_new_tag_page.png new file mode 100644 index 00000000000..231e1a13fc0 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_new_tag_page.png differ diff --git a/doc/user/project/repository/img/web_editor_start_new_merge_request.png b/doc/user/project/repository/img/web_editor_start_new_merge_request.png new file mode 100644 index 00000000000..2755501dfd1 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_start_new_merge_request.png differ diff --git a/doc/user/project/repository/img/web_editor_upload_file_dialog.png b/doc/user/project/repository/img/web_editor_upload_file_dialog.png new file mode 100644 index 00000000000..9d6d8250bbe Binary files /dev/null and b/doc/user/project/repository/img/web_editor_upload_file_dialog.png differ diff --git a/doc/user/project/repository/img/web_editor_upload_file_dropdown.png b/doc/user/project/repository/img/web_editor_upload_file_dropdown.png new file mode 100644 index 00000000000..6b5205b05ec Binary files /dev/null and b/doc/user/project/repository/img/web_editor_upload_file_dropdown.png differ diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md new file mode 100644 index 00000000000..ee8e7862572 --- /dev/null +++ b/doc/user/project/repository/web_editor.md @@ -0,0 +1,151 @@ +# GitLab Web Editor + +Sometimes it's easier to make quick changes directly from the GitLab interface +than to clone the project and use the Git command line tool. In this feature +highlight we look at how you can create a new file, directory, branch or +tag from the file browser. All of these actions are available from a single +dropdown menu. + +## Create a file + +From a project's files page, click the '+' button to the right of the branch selector. +Choose **New file** from the dropdown. + +![New file dropdown menu](img/web_editor_new_file_dropdown.png) + +--- + +Enter a file name in the **File name** box. Then, add file content in the editor +area. Add a descriptive commit message and choose a branch. The branch field +will default to the branch you were viewing in the file browser. If you enter +a new branch name, a checkbox will appear allowing you to start a new merge +request after you commit the changes. + +When you are satisfied with your new file, click **Commit Changes** at the bottom. + +![Create file editor](img/web_editor_new_file_editor.png) + +## Upload a file + +The ability to create a file is great when the content is text. However, this +doesn't work well for binary data such as images, PDFs or other file types. In +this case you need to upload a file. + +From a project's files page, click the '+' button to the right of the branch +selector. Choose **Upload file** from the dropdown. + +![Upload file dropdown menu](img/web_editor_upload_file_dropdown.png) + +--- + +Once the upload dialog pops up there are two ways to upload your file. Either +drag and drop a file on the pop up or use the **click to upload** link. A file +preview will appear once you have selected a file to upload. + +Enter a commit message, choose a branch, and click **Upload file** when you are +ready. + +![Upload file dialog](img/web_editor_upload_file_dialog.png) + +## Create a directory + +To keep files in the repository organized it is often helpful to create a new +directory. + +From a project's files page, click the '+' button to the right of the branch selector. +Choose **New directory** from the dropdown. + +![New directory dropdown](img/web_editor_new_directory_dropdown.png) + +--- + +In the new directory dialog enter a directory name, a commit message and choose +the target branch. Click **Create directory** to finish. + +![New directory dialog](img/web_editor_new_directory_dialog.png) + +## Create a new branch + +There are multiple ways to create a branch from GitLab's web interface. + +### Create a new branch from an issue + +> [Introduced][ce-2808] in GitLab 8.6. + +In case your development workflow dictates to have an issue for every merge +request, you can quickly create a branch right on the issue page which will be +tied with the issue itself. You can see a **New Branch** button after the issue +description, unless there is already a branch with the same name or a referenced +merge request. + +![New Branch Button](img/new_branch_from_issue.png) + +Once you click it, a new branch will be created that diverges from the default +branch of your project, by default `master`. The branch name will be based on +the title of the issue and as suffix it will have its ID. Thus, the example +screenshot above will yield a branch named +`2-et-cum-et-sed-expedita-repellat-consequatur-ut-assumenda-numquam-rerum`. + +After the branch is created, you can edit files in the repository to fix +the issue. When a merge request is created based on the newly created branch, +the description field will automatically display the [issue closing pattern] +`Closes #ID`, where `ID` the ID of the issue. This will close the issue once the +merge request is merged. + +### Create a new branch from a project's dashboard + +If you want to make changes to several files before creating a new merge +request, you can create a new branch up front. From a project's files page, +choose **New branch** from the dropdown. + +![New branch dropdown](img/web_editor_new_branch_dropdown.png) + +--- + +Enter a new **Branch name**. Optionally, change the **Create from** field +to choose which branch, tag or commit SHA this new branch will originate from. +This field will autocomplete if you start typing an existing branch or tag. +Click **Create branch** and you will be returned to the file browser on this new +branch. + +![New branch page](img/web_editor_new_branch_page.png) + +--- + +You can now make changes to any files, as needed. When you're ready to merge +the changes back to master you can use the widget at the top of the screen. +This widget only appears for a period of time after you create the branch or +modify files. + +![New push widget](img/web_editor_new_push_widget.png) + +## Create a new tag + +Tags are useful for marking major milestones such as production releases, +release candidates, and more. You can create a tag from a branch or a commit +SHA. From a project's files page, choose **New tag** from the dropdown. + +![New tag dropdown](img/web_editor_new_tag_dropdown.png) + +--- + +Give the tag a name such as `v1.0.0`. Choose the branch or SHA from which you +would like to create this new tag. You can optionally add a message and +release notes. The release notes section supports markdown format and you can +also upload an attachment. Click **Create tag** and you will be taken to the tag +list page. + +![New tag page](img/web_editor_new_tag_page.png) + +## Tips + +When creating or uploading a new file, or creating a new directory, you can +trigger a new merge request rather than committing directly to master. Enter +a new branch name in the **Target branch** field. You will notice a checkbox +appear that is labeled **Start a new merge request with these changes**. After +you commit the changes you will be taken to a new merge request form. + +![Start a new merge request with these changes](img/web_editor_start_new_merge_request.png) + +[ce-2808]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2808 +[issue closing pattern]: ../customization/issue_closing.md diff --git a/doc/workflow/README.md b/doc/workflow/README.md index 0cf56449de2..fe13bd757c5 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -18,7 +18,7 @@ - [Slash commands](../user/project/slash_commands.md) - [Sharing a project with a group](share_with_group.md) - [Share projects with other groups](share_projects_with_other_groups.md) -- [Web Editor](web_editor.md) +- [Web Editor](../user/project/repository/web_editor.md) - [Releases](releases.md) - [Milestones](milestones.md) - [Merge Requests](merge_requests.md) diff --git a/doc/workflow/img/web_editor_new_branch_dropdown.png b/doc/workflow/img/web_editor_new_branch_dropdown.png deleted file mode 100644 index a8e635d2faf..00000000000 Binary files a/doc/workflow/img/web_editor_new_branch_dropdown.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_new_branch_page.png b/doc/workflow/img/web_editor_new_branch_page.png deleted file mode 100644 index 7f36b7faf63..00000000000 Binary files a/doc/workflow/img/web_editor_new_branch_page.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_new_directory_dialog.png b/doc/workflow/img/web_editor_new_directory_dialog.png deleted file mode 100644 index d16e3c67116..00000000000 Binary files a/doc/workflow/img/web_editor_new_directory_dialog.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_new_directory_dropdown.png b/doc/workflow/img/web_editor_new_directory_dropdown.png deleted file mode 100644 index c8d77b16ee8..00000000000 Binary files a/doc/workflow/img/web_editor_new_directory_dropdown.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_new_file_dropdown.png b/doc/workflow/img/web_editor_new_file_dropdown.png deleted file mode 100644 index 3fcb91c9b93..00000000000 Binary files a/doc/workflow/img/web_editor_new_file_dropdown.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_new_file_editor.png b/doc/workflow/img/web_editor_new_file_editor.png deleted file mode 100644 index 21c340b9288..00000000000 Binary files a/doc/workflow/img/web_editor_new_file_editor.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_new_push_widget.png b/doc/workflow/img/web_editor_new_push_widget.png deleted file mode 100644 index c7738a4c930..00000000000 Binary files a/doc/workflow/img/web_editor_new_push_widget.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_new_tag_dropdown.png b/doc/workflow/img/web_editor_new_tag_dropdown.png deleted file mode 100644 index ac7415009b3..00000000000 Binary files a/doc/workflow/img/web_editor_new_tag_dropdown.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_new_tag_page.png b/doc/workflow/img/web_editor_new_tag_page.png deleted file mode 100644 index 231e1a13fc0..00000000000 Binary files a/doc/workflow/img/web_editor_new_tag_page.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_start_new_merge_request.png b/doc/workflow/img/web_editor_start_new_merge_request.png deleted file mode 100644 index 2755501dfd1..00000000000 Binary files a/doc/workflow/img/web_editor_start_new_merge_request.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_upload_file_dialog.png b/doc/workflow/img/web_editor_upload_file_dialog.png deleted file mode 100644 index 9d6d8250bbe..00000000000 Binary files a/doc/workflow/img/web_editor_upload_file_dialog.png and /dev/null differ diff --git a/doc/workflow/img/web_editor_upload_file_dropdown.png b/doc/workflow/img/web_editor_upload_file_dropdown.png deleted file mode 100644 index 6b5205b05ec..00000000000 Binary files a/doc/workflow/img/web_editor_upload_file_dropdown.png and /dev/null differ diff --git a/doc/workflow/web_editor.md b/doc/workflow/web_editor.md index ee8e7862572..595c7da155b 100644 --- a/doc/workflow/web_editor.md +++ b/doc/workflow/web_editor.md @@ -1,151 +1 @@ -# GitLab Web Editor - -Sometimes it's easier to make quick changes directly from the GitLab interface -than to clone the project and use the Git command line tool. In this feature -highlight we look at how you can create a new file, directory, branch or -tag from the file browser. All of these actions are available from a single -dropdown menu. - -## Create a file - -From a project's files page, click the '+' button to the right of the branch selector. -Choose **New file** from the dropdown. - -![New file dropdown menu](img/web_editor_new_file_dropdown.png) - ---- - -Enter a file name in the **File name** box. Then, add file content in the editor -area. Add a descriptive commit message and choose a branch. The branch field -will default to the branch you were viewing in the file browser. If you enter -a new branch name, a checkbox will appear allowing you to start a new merge -request after you commit the changes. - -When you are satisfied with your new file, click **Commit Changes** at the bottom. - -![Create file editor](img/web_editor_new_file_editor.png) - -## Upload a file - -The ability to create a file is great when the content is text. However, this -doesn't work well for binary data such as images, PDFs or other file types. In -this case you need to upload a file. - -From a project's files page, click the '+' button to the right of the branch -selector. Choose **Upload file** from the dropdown. - -![Upload file dropdown menu](img/web_editor_upload_file_dropdown.png) - ---- - -Once the upload dialog pops up there are two ways to upload your file. Either -drag and drop a file on the pop up or use the **click to upload** link. A file -preview will appear once you have selected a file to upload. - -Enter a commit message, choose a branch, and click **Upload file** when you are -ready. - -![Upload file dialog](img/web_editor_upload_file_dialog.png) - -## Create a directory - -To keep files in the repository organized it is often helpful to create a new -directory. - -From a project's files page, click the '+' button to the right of the branch selector. -Choose **New directory** from the dropdown. - -![New directory dropdown](img/web_editor_new_directory_dropdown.png) - ---- - -In the new directory dialog enter a directory name, a commit message and choose -the target branch. Click **Create directory** to finish. - -![New directory dialog](img/web_editor_new_directory_dialog.png) - -## Create a new branch - -There are multiple ways to create a branch from GitLab's web interface. - -### Create a new branch from an issue - -> [Introduced][ce-2808] in GitLab 8.6. - -In case your development workflow dictates to have an issue for every merge -request, you can quickly create a branch right on the issue page which will be -tied with the issue itself. You can see a **New Branch** button after the issue -description, unless there is already a branch with the same name or a referenced -merge request. - -![New Branch Button](img/new_branch_from_issue.png) - -Once you click it, a new branch will be created that diverges from the default -branch of your project, by default `master`. The branch name will be based on -the title of the issue and as suffix it will have its ID. Thus, the example -screenshot above will yield a branch named -`2-et-cum-et-sed-expedita-repellat-consequatur-ut-assumenda-numquam-rerum`. - -After the branch is created, you can edit files in the repository to fix -the issue. When a merge request is created based on the newly created branch, -the description field will automatically display the [issue closing pattern] -`Closes #ID`, where `ID` the ID of the issue. This will close the issue once the -merge request is merged. - -### Create a new branch from a project's dashboard - -If you want to make changes to several files before creating a new merge -request, you can create a new branch up front. From a project's files page, -choose **New branch** from the dropdown. - -![New branch dropdown](img/web_editor_new_branch_dropdown.png) - ---- - -Enter a new **Branch name**. Optionally, change the **Create from** field -to choose which branch, tag or commit SHA this new branch will originate from. -This field will autocomplete if you start typing an existing branch or tag. -Click **Create branch** and you will be returned to the file browser on this new -branch. - -![New branch page](img/web_editor_new_branch_page.png) - ---- - -You can now make changes to any files, as needed. When you're ready to merge -the changes back to master you can use the widget at the top of the screen. -This widget only appears for a period of time after you create the branch or -modify files. - -![New push widget](img/web_editor_new_push_widget.png) - -## Create a new tag - -Tags are useful for marking major milestones such as production releases, -release candidates, and more. You can create a tag from a branch or a commit -SHA. From a project's files page, choose **New tag** from the dropdown. - -![New tag dropdown](img/web_editor_new_tag_dropdown.png) - ---- - -Give the tag a name such as `v1.0.0`. Choose the branch or SHA from which you -would like to create this new tag. You can optionally add a message and -release notes. The release notes section supports markdown format and you can -also upload an attachment. Click **Create tag** and you will be taken to the tag -list page. - -![New tag page](img/web_editor_new_tag_page.png) - -## Tips - -When creating or uploading a new file, or creating a new directory, you can -trigger a new merge request rather than committing directly to master. Enter -a new branch name in the **Target branch** field. You will notice a checkbox -appear that is labeled **Start a new merge request with these changes**. After -you commit the changes you will be taken to a new merge request form. - -![Start a new merge request with these changes](img/web_editor_start_new_merge_request.png) - -[ce-2808]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2808 -[issue closing pattern]: ../customization/issue_closing.md +This document was moved to [user/project/repository/web_editor](../user/project/repository/web_editor.md). -- cgit v1.2.1 From 8e6e3423c3ad7ca6e70576713aa890dc8444f1bb Mon Sep 17 00:00:00 2001 From: Gustav Trenwith Date: Fri, 2 Sep 2016 11:20:43 +0000 Subject: Update README.md --- doc/ci/ssh_keys/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/ssh_keys/README.md b/doc/ci/ssh_keys/README.md index 7c0fb225dac..4041cc41853 100644 --- a/doc/ci/ssh_keys/README.md +++ b/doc/ci/ssh_keys/README.md @@ -30,7 +30,8 @@ This is the universal solution which works with any type of executor ## SSH keys when using the Docker executor You will first need to create an SSH key pair. For more information, follow the -instructions to [generate an SSH key](../../ssh/README.md). +instructions to [generate an SSH key](../../ssh/README.md). Do not add a comment +to the ssh key, or the `before_script` will prompt for a passphrase. Then, create a new **Secret Variable** in your project settings on GitLab following **Settings > Variables**. As **Key** add the name `SSH_PRIVATE_KEY` -- cgit v1.2.1 From 7c89308ae4891085d59c6f85da77c5c13e0bd233 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Fri, 2 Sep 2016 13:28:17 +0200 Subject: Move docs for template dropdowns to the new location --- doc/gitlab-basics/add-file.md | 14 ------------ doc/gitlab-basics/basicsimages/file_button.png | Bin 14131 -> 0 bytes doc/gitlab-basics/basicsimages/first_file.png | Bin 25748 -> 0 bytes doc/gitlab-basics/basicsimages/mit_license.png | Bin 101405 -> 0 bytes .../img/web_editor_template_dropdown_buttons.png | Bin 0 -> 14131 bytes .../web_editor_template_dropdown_first_file.png | Bin 0 -> 25748 bytes .../web_editor_template_dropdown_mit_license.png | Bin 0 -> 85413 bytes doc/user/project/repository/web_editor.md | 24 +++++++++++++++++++++ 8 files changed, 24 insertions(+), 14 deletions(-) delete mode 100644 doc/gitlab-basics/basicsimages/file_button.png delete mode 100644 doc/gitlab-basics/basicsimages/first_file.png delete mode 100644 doc/gitlab-basics/basicsimages/mit_license.png create mode 100644 doc/user/project/repository/img/web_editor_template_dropdown_buttons.png create mode 100644 doc/user/project/repository/img/web_editor_template_dropdown_first_file.png create mode 100644 doc/user/project/repository/img/web_editor_template_dropdown_mit_license.png (limited to 'doc') diff --git a/doc/gitlab-basics/add-file.md b/doc/gitlab-basics/add-file.md index 27591a4a15a..ff10a98e8f5 100644 --- a/doc/gitlab-basics/add-file.md +++ b/doc/gitlab-basics/add-file.md @@ -25,17 +25,3 @@ Add all the information that you'd like to include in your file: Add a commit message based on what you just added and then click on "commit changes": ![Commit changes](basicsimages/commit_changes.png) - -# On a new project - -When starting a new project, there are some common files which the new project might need too. Therefore a message will be displayed by GitLab to make this easy for you. - -![First file for your project](basicsimages/first_file.png) - -When clicking on either `LICENSE` or `.gitignore`, a dropdown will be displayed to provide you with a template which might be suitable for your project. - -![MIT license selected](basicsimages/mit_license.png) - -The license, changelog, contribution guide, or `.gitlab-ci.yml` file could also be added through a button on the project page. In the example below the license has already been created, which creates a link to the license itself. - -![New file button](basicsimages/file_button.png) diff --git a/doc/gitlab-basics/basicsimages/file_button.png b/doc/gitlab-basics/basicsimages/file_button.png deleted file mode 100644 index 4efc51cc423..00000000000 Binary files a/doc/gitlab-basics/basicsimages/file_button.png and /dev/null differ diff --git a/doc/gitlab-basics/basicsimages/first_file.png b/doc/gitlab-basics/basicsimages/first_file.png deleted file mode 100644 index 67190c58823..00000000000 Binary files a/doc/gitlab-basics/basicsimages/first_file.png and /dev/null differ diff --git a/doc/gitlab-basics/basicsimages/mit_license.png b/doc/gitlab-basics/basicsimages/mit_license.png deleted file mode 100644 index 3695a11e34c..00000000000 Binary files a/doc/gitlab-basics/basicsimages/mit_license.png and /dev/null differ diff --git a/doc/user/project/repository/img/web_editor_template_dropdown_buttons.png b/doc/user/project/repository/img/web_editor_template_dropdown_buttons.png new file mode 100644 index 00000000000..4efc51cc423 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_template_dropdown_buttons.png differ diff --git a/doc/user/project/repository/img/web_editor_template_dropdown_first_file.png b/doc/user/project/repository/img/web_editor_template_dropdown_first_file.png new file mode 100644 index 00000000000..67190c58823 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_template_dropdown_first_file.png differ diff --git a/doc/user/project/repository/img/web_editor_template_dropdown_mit_license.png b/doc/user/project/repository/img/web_editor_template_dropdown_mit_license.png new file mode 100644 index 00000000000..47719113805 Binary files /dev/null and b/doc/user/project/repository/img/web_editor_template_dropdown_mit_license.png differ diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md index ee8e7862572..7c041d019bb 100644 --- a/doc/user/project/repository/web_editor.md +++ b/doc/user/project/repository/web_editor.md @@ -25,6 +25,29 @@ When you are satisfied with your new file, click **Commit Changes** at the botto ![Create file editor](img/web_editor_new_file_editor.png) +### Template dropdowns + +When starting a new project, there are some common files which the new project +might need too. Therefore a message will be displayed by GitLab to make this +easy for you. + +![First file for your project](img/web_editor_template_dropdown_first_file.png) + +When clicking on either `LICENSE` or `.gitignore`, a dropdown will be displayed +to provide you with a template which might be suitable for your project. + +![MIT license selected](img/web_editor_template_dropdown_mit_license.png) + +The license, changelog, contribution guide, or `.gitlab-ci.yml` file could also +be added through a button on the project page. In the example below the license +has already been created, which creates a link to the license itself. + +![New file button](img/web_editor_template_dropdown_buttons.png) + +>**Note:** +The **Set up CI** button will not appear on an empty repository. You have to at +least add a file in order for the button to show up. + ## Upload a file The ability to create a file is great when the content is text. However, this @@ -147,5 +170,6 @@ you commit the changes you will be taken to a new merge request form. ![Start a new merge request with these changes](img/web_editor_start_new_merge_request.png) +![New file button](basicsimages/file_button.png) [ce-2808]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2808 [issue closing pattern]: ../customization/issue_closing.md -- cgit v1.2.1 From 61fbe7efe9972bf43287d7ca76d7ec63fd5798a5 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Sat, 3 Sep 2016 09:57:52 +0200 Subject: Add link on API docs index page [ci skip] --- doc/api/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api/README.md b/doc/api/README.md index 3e79cce0120..96d94e08487 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -11,9 +11,10 @@ following locations: - [Award Emoji](award_emoji.md) - [Branches](branches.md) - [Builds](builds.md) -- [Build triggers](build_triggers.md) +- [Build Triggers](build_triggers.md) - [Build Variables](build_variables.md) - [Commits](commits.md) +- [Deployments](deployments.md) - [Deploy Keys](deploy_keys.md) - [Groups](groups.md) - [Group Access Requests](access_requests.md) -- cgit v1.2.1 From de4c0c2e710e4511ad5781bb2d2ab2e0f85dc2f5 Mon Sep 17 00:00:00 2001 From: Gustav Trenwith Date: Mon, 5 Sep 2016 06:32:26 +0000 Subject: Update README.md --- doc/ci/ssh_keys/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/ssh_keys/README.md b/doc/ci/ssh_keys/README.md index 4041cc41853..b858029d25e 100644 --- a/doc/ci/ssh_keys/README.md +++ b/doc/ci/ssh_keys/README.md @@ -31,7 +31,7 @@ This is the universal solution which works with any type of executor You will first need to create an SSH key pair. For more information, follow the instructions to [generate an SSH key](../../ssh/README.md). Do not add a comment -to the ssh key, or the `before_script` will prompt for a passphrase. +to the SSH key, or the `before_script` will prompt for a passphrase. Then, create a new **Secret Variable** in your project settings on GitLab following **Settings > Variables**. As **Key** add the name `SSH_PRIVATE_KEY` -- cgit v1.2.1 From 7973a22ff4f3ca4d34f69864e2438f1e44c1cfe2 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 12:13:11 +0200 Subject: Move `workflow/merge_requests.md` to `user/project/merge_requests.md` --- doc/user/project/merge_requests.md | 90 ++++++++++++++++++++ .../project/merge_requests/img/commit_compare.png | Bin 0 -> 65010 bytes .../merge_requests/img/merge_request_diff.png | Bin 0 -> 103239 bytes .../img/merge_request_diff_without_whitespace.png | Bin 0 -> 71896 bytes .../img/only_allow_merge_if_build_succeeds.png | Bin 0 -> 17552 bytes doc/user/project/merge_requests/img/versions.png | Bin 0 -> 100566 bytes doc/workflow/README.md | 2 +- doc/workflow/merge_requests.md | 91 +-------------------- doc/workflow/merge_requests/commit_compare.png | Bin 65010 -> 0 bytes doc/workflow/merge_requests/merge_request_diff.png | Bin 103239 -> 0 bytes .../merge_request_diff_without_whitespace.png | Bin 71896 -> 0 bytes .../only_allow_merge_if_build_succeeds.png | Bin 17552 -> 0 bytes doc/workflow/merge_requests/versions.png | Bin 100566 -> 0 bytes 13 files changed, 92 insertions(+), 91 deletions(-) create mode 100644 doc/user/project/merge_requests.md create mode 100644 doc/user/project/merge_requests/img/commit_compare.png create mode 100644 doc/user/project/merge_requests/img/merge_request_diff.png create mode 100644 doc/user/project/merge_requests/img/merge_request_diff_without_whitespace.png create mode 100644 doc/user/project/merge_requests/img/only_allow_merge_if_build_succeeds.png create mode 100644 doc/user/project/merge_requests/img/versions.png delete mode 100644 doc/workflow/merge_requests/commit_compare.png delete mode 100644 doc/workflow/merge_requests/merge_request_diff.png delete mode 100644 doc/workflow/merge_requests/merge_request_diff_without_whitespace.png delete mode 100644 doc/workflow/merge_requests/only_allow_merge_if_build_succeeds.png delete mode 100644 doc/workflow/merge_requests/versions.png (limited to 'doc') diff --git a/doc/user/project/merge_requests.md b/doc/user/project/merge_requests.md new file mode 100644 index 00000000000..ecccc96582c --- /dev/null +++ b/doc/user/project/merge_requests.md @@ -0,0 +1,90 @@ +# Merge Requests + +Merge requests allow you to exchange changes you made to source code + +## Only allow merge requests to be merged if the build succeeds + +You can prevent merge requests from being merged if their build did not succeed +in the project settings page. + +![only_allow_merge_if_build_succeeds](merge_requests/img/only_allow_merge_if_build_succeeds.png) + +Navigate to project settings page and select the `Only allow merge requests to be merged if the build succeeds` check box. + +Please note that you need to have builds configured to enable this feature. + +## Checkout merge requests locally + +### By adding a git alias + +Add the following alias to your `~/.gitconfig`: + +``` +[alias] + mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - +``` + +Now you can check out a particular merge request from any repository and any remote, e.g. to check out a merge request number 5 as shown in GitLab from the `upstream` remote, do: + +``` +$ git mr upstream 5 +``` + +This will fetch the merge request into a local `mr-upstream-5` branch and check it out. + +### By modifying `.git/config` for a given repository + +Locate the section for your GitLab remote in the `.git/config` file. It looks like this: + +``` +[remote "origin"] + url = https://gitlab.com/gitlab-org/gitlab-ce.git + fetch = +refs/heads/*:refs/remotes/origin/* +``` + +Now add the line `fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*` to this section. + +It should look like this: + +``` +[remote "origin"] + url = https://gitlab.com/gitlab-org/gitlab-ce.git + fetch = +refs/heads/*:refs/remotes/origin/* + fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* +``` + +Now you can fetch all the merge requests: + +``` +$ git fetch origin +From https://gitlab.com/gitlab-org/gitlab-ce.git + * [new ref] refs/merge-requests/1/head -> origin/merge-requests/1 + * [new ref] refs/merge-requests/2/head -> origin/merge-requests/2 +... +``` + +To check out a particular merge request: + +``` +$ git checkout origin/merge-requests/1 +``` + +## Ignore whitespace changes in Merge Request diff view + +![MR diff](merge_requests/img/merge_request_diff.png) + +If you click the "Hide whitespace changes" button, you can see the diff without whitespace changes. + +![MR diff without whitespace](merge_requests/img/merge_request_diff_without_whitespace.png) + +It is also working on commits compare view. + +![Commit Compare](merge_requests/img/commit_compare.png) + +## Merge Requests versions + +Every time you push to merge request branch, a new version of merge request diff +is created. When you visit the merge request page you see latest version of changes. +However you can select an older one from version dropdown + +![Merge Request Versions](merge_requests/img/versions.png) diff --git a/doc/user/project/merge_requests/img/commit_compare.png b/doc/user/project/merge_requests/img/commit_compare.png new file mode 100644 index 00000000000..0e4a2b23c04 Binary files /dev/null and b/doc/user/project/merge_requests/img/commit_compare.png differ diff --git a/doc/user/project/merge_requests/img/merge_request_diff.png b/doc/user/project/merge_requests/img/merge_request_diff.png new file mode 100644 index 00000000000..3ebbfb75ea3 Binary files /dev/null and b/doc/user/project/merge_requests/img/merge_request_diff.png differ diff --git a/doc/user/project/merge_requests/img/merge_request_diff_without_whitespace.png b/doc/user/project/merge_requests/img/merge_request_diff_without_whitespace.png new file mode 100644 index 00000000000..a0db535019c Binary files /dev/null and b/doc/user/project/merge_requests/img/merge_request_diff_without_whitespace.png differ diff --git a/doc/user/project/merge_requests/img/only_allow_merge_if_build_succeeds.png b/doc/user/project/merge_requests/img/only_allow_merge_if_build_succeeds.png new file mode 100644 index 00000000000..18bebf5fe92 Binary files /dev/null and b/doc/user/project/merge_requests/img/only_allow_merge_if_build_succeeds.png differ diff --git a/doc/user/project/merge_requests/img/versions.png b/doc/user/project/merge_requests/img/versions.png new file mode 100644 index 00000000000..c0a6dfe6806 Binary files /dev/null and b/doc/user/project/merge_requests/img/versions.png differ diff --git a/doc/workflow/README.md b/doc/workflow/README.md index 0cf56449de2..d626b1311a2 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -21,7 +21,7 @@ - [Web Editor](web_editor.md) - [Releases](releases.md) - [Milestones](milestones.md) -- [Merge Requests](merge_requests.md) +- [Merge Requests](../user/project/merge_requests.md) - [Revert changes](revert_changes.md) - [Cherry-pick changes](cherry_pick_changes.md) - ["Work In Progress" Merge Requests](wip_merge_requests.md) diff --git a/doc/workflow/merge_requests.md b/doc/workflow/merge_requests.md index 40a5e4476be..a68bb8b27ca 100644 --- a/doc/workflow/merge_requests.md +++ b/doc/workflow/merge_requests.md @@ -1,90 +1 @@ -# Merge Requests - -Merge requests allow you to exchange changes you made to source code - -## Only allow merge requests to be merged if the build succeeds - -You can prevent merge requests from being merged if their build did not succeed -in the project settings page. - -![only_allow_merge_if_build_succeeds](merge_requests/only_allow_merge_if_build_succeeds.png) - -Navigate to project settings page and select the `Only allow merge requests to be merged if the build succeeds` check box. - -Please note that you need to have builds configured to enable this feature. - -## Checkout merge requests locally - -### By adding a git alias - -Add the following alias to your `~/.gitconfig`: - -``` -[alias] - mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - -``` - -Now you can check out a particular merge request from any repository and any remote, e.g. to check out a merge request number 5 as shown in GitLab from the `upstream` remote, do: - -``` -$ git mr upstream 5 -``` - -This will fetch the merge request into a local `mr-upstream-5` branch and check it out. - -### By modifying `.git/config` for a given repository - -Locate the section for your GitLab remote in the `.git/config` file. It looks like this: - -``` -[remote "origin"] - url = https://gitlab.com/gitlab-org/gitlab-ce.git - fetch = +refs/heads/*:refs/remotes/origin/* -``` - -Now add the line `fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*` to this section. - -It should look like this: - -``` -[remote "origin"] - url = https://gitlab.com/gitlab-org/gitlab-ce.git - fetch = +refs/heads/*:refs/remotes/origin/* - fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* -``` - -Now you can fetch all the merge requests: - -``` -$ git fetch origin -From https://gitlab.com/gitlab-org/gitlab-ce.git - * [new ref] refs/merge-requests/1/head -> origin/merge-requests/1 - * [new ref] refs/merge-requests/2/head -> origin/merge-requests/2 -... -``` - -To check out a particular merge request: - -``` -$ git checkout origin/merge-requests/1 -``` - -## Ignore whitespace changes in Merge Request diff view - -![MR diff](merge_requests/merge_request_diff.png) - -If you click the "Hide whitespace changes" button, you can see the diff without whitespace changes. - -![MR diff without whitespace](merge_requests/merge_request_diff_without_whitespace.png) - -It is also working on commits compare view. - -![Commit Compare](merge_requests/commit_compare.png) - -## Merge Requests versions - -Every time you push to merge request branch, a new version of merge request diff -is created. When you visit the merge request page you see latest version of changes. -However you can select an older one from version dropdown - -![Merge Request Versions](merge_requests/versions.png) +This document was moved to [user/project/merge_requests](../user/project/merge_requests.md). diff --git a/doc/workflow/merge_requests/commit_compare.png b/doc/workflow/merge_requests/commit_compare.png deleted file mode 100644 index 0e4a2b23c04..00000000000 Binary files a/doc/workflow/merge_requests/commit_compare.png and /dev/null differ diff --git a/doc/workflow/merge_requests/merge_request_diff.png b/doc/workflow/merge_requests/merge_request_diff.png deleted file mode 100644 index 3ebbfb75ea3..00000000000 Binary files a/doc/workflow/merge_requests/merge_request_diff.png and /dev/null differ diff --git a/doc/workflow/merge_requests/merge_request_diff_without_whitespace.png b/doc/workflow/merge_requests/merge_request_diff_without_whitespace.png deleted file mode 100644 index a0db535019c..00000000000 Binary files a/doc/workflow/merge_requests/merge_request_diff_without_whitespace.png and /dev/null differ diff --git a/doc/workflow/merge_requests/only_allow_merge_if_build_succeeds.png b/doc/workflow/merge_requests/only_allow_merge_if_build_succeeds.png deleted file mode 100644 index 18bebf5fe92..00000000000 Binary files a/doc/workflow/merge_requests/only_allow_merge_if_build_succeeds.png and /dev/null differ diff --git a/doc/workflow/merge_requests/versions.png b/doc/workflow/merge_requests/versions.png deleted file mode 100644 index c0a6dfe6806..00000000000 Binary files a/doc/workflow/merge_requests/versions.png and /dev/null differ -- cgit v1.2.1 From cd93b90f85b197dc0b386bbcaa027beaa93e3410 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 12:36:14 +0200 Subject: Move authorization_for_merge_requests.md to new location --- .../authorization_for_merge_requests.md | 40 +++++++++++++++++++++ doc/workflow/authorization_for_merge_requests.md | 41 +--------------------- 2 files changed, 41 insertions(+), 40 deletions(-) create mode 100644 doc/user/project/merge_requests/authorization_for_merge_requests.md (limited to 'doc') diff --git a/doc/user/project/merge_requests/authorization_for_merge_requests.md b/doc/user/project/merge_requests/authorization_for_merge_requests.md new file mode 100644 index 00000000000..d1d6d94ec11 --- /dev/null +++ b/doc/user/project/merge_requests/authorization_for_merge_requests.md @@ -0,0 +1,40 @@ +# Authorization for Merge requests + +There are two main ways to have a merge request flow with GitLab: working with protected branches in a single repository, or working with forks of an authoritative project. + +## Protected branch flow + +With the protected branch flow everybody works within the same GitLab project. + +The project maintainers get Master access and the regular developers get Developer access. + +The maintainers mark the authoritative branches as 'Protected'. + +The developers push feature branches to the project and create merge requests to have their feature branches reviewed and merged into one of the protected branches. + +Only users with Master access can merge changes into a protected branch. + +### Advantages + +- fewer projects means less clutter +- developers need to consider only one remote repository + +### Disadvantages + +- manual setup of protected branch required for each new project + +## Forking workflow + +With the forking workflow the maintainers get Master access and the regular developers get Reporter access to the authoritative repository, which prohibits them from pushing any changes to it. + +Developers create forks of the authoritative project and push their feature branches to their own forks. + +To get their changes into master they need to create a merge request across forks. + +### Advantages + +- in an appropriately configured GitLab group, new projects automatically get the required access restrictions for regular developers: fewer manual steps to configure authorization for new projects + +### Disadvantages + +- the project need to keep their forks up to date, which requires more advanced Git skills (managing multiple remotes) diff --git a/doc/workflow/authorization_for_merge_requests.md b/doc/workflow/authorization_for_merge_requests.md index d1d6d94ec11..7bf80a3ad0d 100644 --- a/doc/workflow/authorization_for_merge_requests.md +++ b/doc/workflow/authorization_for_merge_requests.md @@ -1,40 +1 @@ -# Authorization for Merge requests - -There are two main ways to have a merge request flow with GitLab: working with protected branches in a single repository, or working with forks of an authoritative project. - -## Protected branch flow - -With the protected branch flow everybody works within the same GitLab project. - -The project maintainers get Master access and the regular developers get Developer access. - -The maintainers mark the authoritative branches as 'Protected'. - -The developers push feature branches to the project and create merge requests to have their feature branches reviewed and merged into one of the protected branches. - -Only users with Master access can merge changes into a protected branch. - -### Advantages - -- fewer projects means less clutter -- developers need to consider only one remote repository - -### Disadvantages - -- manual setup of protected branch required for each new project - -## Forking workflow - -With the forking workflow the maintainers get Master access and the regular developers get Reporter access to the authoritative repository, which prohibits them from pushing any changes to it. - -Developers create forks of the authoritative project and push their feature branches to their own forks. - -To get their changes into master they need to create a merge request across forks. - -### Advantages - -- in an appropriately configured GitLab group, new projects automatically get the required access restrictions for regular developers: fewer manual steps to configure authorization for new projects - -### Disadvantages - -- the project need to keep their forks up to date, which requires more advanced Git skills (managing multiple remotes) +This document was moved to [user/project/merge_requests/authorization_for_merge_requests](../user/project/merge_requests/authorization_for_merge_requests.md) -- cgit v1.2.1 From cbc97870bc03d987d82dac679d2a81eee54a4448 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 13:21:22 +0200 Subject: Move merge_when_build_succeeds.md to new location --- .../img/merge_when_build_succeeds_enable.png | Bin 0 -> 68769 bytes .../img/merge_when_build_succeeds_status.png | Bin 0 -> 82655 bytes .../merge_requests/merge_when_build_succeeds.md | 28 +++++++++++++++++++++ doc/workflow/merge_when_build_succeeds.md | 16 +----------- doc/workflow/merge_when_build_succeeds/enable.png | Bin 68769 -> 0 bytes doc/workflow/merge_when_build_succeeds/status.png | Bin 82655 -> 0 bytes 6 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 doc/user/project/merge_requests/img/merge_when_build_succeeds_enable.png create mode 100644 doc/user/project/merge_requests/img/merge_when_build_succeeds_status.png create mode 100644 doc/user/project/merge_requests/merge_when_build_succeeds.md delete mode 100644 doc/workflow/merge_when_build_succeeds/enable.png delete mode 100644 doc/workflow/merge_when_build_succeeds/status.png (limited to 'doc') diff --git a/doc/user/project/merge_requests/img/merge_when_build_succeeds_enable.png b/doc/user/project/merge_requests/img/merge_when_build_succeeds_enable.png new file mode 100644 index 00000000000..b86e6d7b3fd Binary files /dev/null and b/doc/user/project/merge_requests/img/merge_when_build_succeeds_enable.png differ diff --git a/doc/user/project/merge_requests/img/merge_when_build_succeeds_status.png b/doc/user/project/merge_requests/img/merge_when_build_succeeds_status.png new file mode 100644 index 00000000000..f3ea61d8147 Binary files /dev/null and b/doc/user/project/merge_requests/img/merge_when_build_succeeds_status.png differ diff --git a/doc/user/project/merge_requests/merge_when_build_succeeds.md b/doc/user/project/merge_requests/merge_when_build_succeeds.md new file mode 100644 index 00000000000..e89fb772d0d --- /dev/null +++ b/doc/user/project/merge_requests/merge_when_build_succeeds.md @@ -0,0 +1,28 @@ +# Merge When Build Succeeds + +When reviewing a merge request that looks ready to merge but still has one or +more CI builds running, you can set it to be merged automatically when all +builds succeed. This way, you don't have to wait for the builds to finish and +remember to merge the request manually. + +![Enable](img/merge_when_build_succeeds_enable.png) + +When you hit the "Merge When Build Succeeds" button, the status of the merge +request will be updated to represent the impending merge. If you cannot wait +for the build to succeed and want to merge immediately, this option is available +in the dropdown menu on the right of the main button. + +Both team developers and the author of the merge request have the option to +cancel the automatic merge if they find a reason why it shouldn't be merged +after all. + +![Status](img/merge_when_build_succeeds_status.png) + +When the build succeeds, the merge request will automatically be merged. When +the build fails, the author gets a chance to retry any failed builds, or to +push new commits to fix the failure. + +When the builds are retried and succeed on the second try, the merge request +will automatically be merged after all. When the merge request is updated with +new commits, the automatic merge is automatically canceled to allow the new +changes to be reviewed. diff --git a/doc/workflow/merge_when_build_succeeds.md b/doc/workflow/merge_when_build_succeeds.md index 75e1fdff2b2..95afd12ebdb 100644 --- a/doc/workflow/merge_when_build_succeeds.md +++ b/doc/workflow/merge_when_build_succeeds.md @@ -1,15 +1 @@ -# Merge When Build Succeeds - -When reviewing a merge request that looks ready to merge but still has one or more CI builds running, you can set it to be merged automatically when all builds succeed. This way, you don't have to wait for the builds to finish and remember to merge the request manually. - -![Enable](merge_when_build_succeeds/enable.png) - -When you hit the "Merge When Build Succeeds" button, the status of the merge request will be updated to represent the impending merge. If you cannot wait for the build to succeed and want to merge immediately, this option is available in the dropdown menu on the right of the main button. - -Both team developers and the author of the merge request have the option to cancel the automatic merge if they find a reason why it shouldn't be merged after all. - -![Status](merge_when_build_succeeds/status.png) - -When the build succeeds, the merge request will automatically be merged. When the build fails, the author gets a chance to retry any failed builds, or to push new commits to fix the failure. - -When the builds are retried and succeed on the second try, the merge request will automatically be merged after all. When the merge request is updated with new commits, the automatic merge is automatically canceled to allow the new changes to be reviewed. +This document was moved to [user/project/merge_requests/merge_when_build_succeeds](../user/project/merge_requests/merge_when_build_succeeds.md). diff --git a/doc/workflow/merge_when_build_succeeds/enable.png b/doc/workflow/merge_when_build_succeeds/enable.png deleted file mode 100644 index b86e6d7b3fd..00000000000 Binary files a/doc/workflow/merge_when_build_succeeds/enable.png and /dev/null differ diff --git a/doc/workflow/merge_when_build_succeeds/status.png b/doc/workflow/merge_when_build_succeeds/status.png deleted file mode 100644 index f3ea61d8147..00000000000 Binary files a/doc/workflow/merge_when_build_succeeds/status.png and /dev/null differ -- cgit v1.2.1 From 99e03f80ca875d261622268cf11eb63a02ae2bf5 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 13:33:45 +0200 Subject: Move `wip_merge_requests.md` to a new location --- doc/intro/README.md | 2 +- .../merge_requests/img/wip_blocked_accept_button.png | Bin 0 -> 32720 bytes .../project/merge_requests/img/wip_mark_as_wip.png | Bin 0 -> 21640 bytes .../project/merge_requests/img/wip_unmark_as_wip.png | Bin 0 -> 16606 bytes .../merge_requests/work_in_progress_merge_requests.md | 17 +++++++++++++++++ doc/workflow/wip_merge_requests.md | 14 +------------- .../wip_merge_requests/blocked_accept_button.png | Bin 32720 -> 0 bytes doc/workflow/wip_merge_requests/mark_as_wip.png | Bin 21640 -> 0 bytes doc/workflow/wip_merge_requests/unmark_as_wip.png | Bin 16606 -> 0 bytes 9 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 doc/user/project/merge_requests/img/wip_blocked_accept_button.png create mode 100644 doc/user/project/merge_requests/img/wip_mark_as_wip.png create mode 100644 doc/user/project/merge_requests/img/wip_unmark_as_wip.png create mode 100644 doc/user/project/merge_requests/work_in_progress_merge_requests.md delete mode 100644 doc/workflow/wip_merge_requests/blocked_accept_button.png delete mode 100644 doc/workflow/wip_merge_requests/mark_as_wip.png delete mode 100644 doc/workflow/wip_merge_requests/unmark_as_wip.png (limited to 'doc') diff --git a/doc/intro/README.md b/doc/intro/README.md index 1850031eb26..26f9cb0ec4a 100644 --- a/doc/intro/README.md +++ b/doc/intro/README.md @@ -23,7 +23,7 @@ Create merge requests and review code. - [Fork a project and contribute to it](../workflow/forking_workflow.md) - [Create a new merge request](../gitlab-basics/add-merge-request.md) - [Automatically close issues from merge requests](../customization/issue_closing.md) -- [Automatically merge when your builds succeed](../workflow/merge_when_build_succeeds.md) +- [Automatically merge when your builds succeed](../user/project/merge_requests/merge_when_build_succeeds.md) - [Revert any commit](../workflow/revert_changes.md) - [Cherry-pick any commit](../workflow/cherry_pick_changes.md) diff --git a/doc/user/project/merge_requests/img/wip_blocked_accept_button.png b/doc/user/project/merge_requests/img/wip_blocked_accept_button.png new file mode 100644 index 00000000000..89c458aa8d9 Binary files /dev/null and b/doc/user/project/merge_requests/img/wip_blocked_accept_button.png differ diff --git a/doc/user/project/merge_requests/img/wip_mark_as_wip.png b/doc/user/project/merge_requests/img/wip_mark_as_wip.png new file mode 100644 index 00000000000..9c37354a653 Binary files /dev/null and b/doc/user/project/merge_requests/img/wip_mark_as_wip.png differ diff --git a/doc/user/project/merge_requests/img/wip_unmark_as_wip.png b/doc/user/project/merge_requests/img/wip_unmark_as_wip.png new file mode 100644 index 00000000000..31f7326beb0 Binary files /dev/null and b/doc/user/project/merge_requests/img/wip_unmark_as_wip.png differ diff --git a/doc/user/project/merge_requests/work_in_progress_merge_requests.md b/doc/user/project/merge_requests/work_in_progress_merge_requests.md new file mode 100644 index 00000000000..546c8bdc5e5 --- /dev/null +++ b/doc/user/project/merge_requests/work_in_progress_merge_requests.md @@ -0,0 +1,17 @@ +# "Work In Progress" Merge Requests + +To prevent merge requests from accidentally being accepted before they're +completely ready, GitLab blocks the "Accept" button for merge requests that +have been marked a **Work In Progress**. + +![Blocked Accept Button](img/wip_blocked_accept_button.png) + +To mark a merge request a Work In Progress, simply start its title with `[WIP]` +or `WIP:`. + +![Mark as WIP](img/wip_mark_as_wip.png) + +To allow a Work In Progress merge request to be accepted again when it's ready, +simply remove the `WIP` prefix. + +![Unark as WIP](img/wip_unmark_as_wip.png) diff --git a/doc/workflow/wip_merge_requests.md b/doc/workflow/wip_merge_requests.md index 46035a5e6b6..abb8002f442 100644 --- a/doc/workflow/wip_merge_requests.md +++ b/doc/workflow/wip_merge_requests.md @@ -1,13 +1 @@ -# "Work In Progress" Merge Requests - -To prevent merge requests from accidentally being accepted before they're completely ready, GitLab blocks the "Accept" button for merge requests that have been marked a **Work In Progress**. - -![Blocked Accept Button](wip_merge_requests/blocked_accept_button.png) - -To mark a merge request a Work In Progress, simply start its title with `[WIP]` or `WIP:`. - -![Mark as WIP](wip_merge_requests/mark_as_wip.png) - -To allow a Work In Progress merge request to be accepted again when it's ready, simply remove the `WIP` prefix. - -![Unark as WIP](wip_merge_requests/unmark_as_wip.png) +This document was moved to [user/project/merge_requests/work_in_progress_merge_requests](../user/project/merge_requests/work_in_progress_merge_requests.md). diff --git a/doc/workflow/wip_merge_requests/blocked_accept_button.png b/doc/workflow/wip_merge_requests/blocked_accept_button.png deleted file mode 100644 index 89c458aa8d9..00000000000 Binary files a/doc/workflow/wip_merge_requests/blocked_accept_button.png and /dev/null differ diff --git a/doc/workflow/wip_merge_requests/mark_as_wip.png b/doc/workflow/wip_merge_requests/mark_as_wip.png deleted file mode 100644 index 9c37354a653..00000000000 Binary files a/doc/workflow/wip_merge_requests/mark_as_wip.png and /dev/null differ diff --git a/doc/workflow/wip_merge_requests/unmark_as_wip.png b/doc/workflow/wip_merge_requests/unmark_as_wip.png deleted file mode 100644 index 31f7326beb0..00000000000 Binary files a/doc/workflow/wip_merge_requests/unmark_as_wip.png and /dev/null differ -- cgit v1.2.1 From 14a96a1ad2d96078cbd73a60e260601f47373060 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 13:40:41 +0200 Subject: Move cherry_pick_changes.md to new location --- doc/intro/README.md | 2 +- .../project/merge_requests/cherry_pick_changes.md | 52 ++++++++++++++++++++ .../img/cherry_pick_changes_commit.png | Bin 0 -> 304098 bytes .../img/cherry_pick_changes_commit_modal.png | Bin 0 -> 264883 bytes .../merge_requests/img/cherry_pick_changes_mr.png | Bin 0 -> 212267 bytes .../img/cherry_pick_changes_mr_modal.png | Bin 0 -> 186597 bytes doc/workflow/cherry_pick_changes.md | 53 +-------------------- doc/workflow/img/cherry_pick_changes_commit.png | Bin 304098 -> 0 bytes .../img/cherry_pick_changes_commit_modal.png | Bin 264883 -> 0 bytes doc/workflow/img/cherry_pick_changes_mr.png | Bin 212267 -> 0 bytes doc/workflow/img/cherry_pick_changes_mr_modal.png | Bin 186597 -> 0 bytes 11 files changed, 54 insertions(+), 53 deletions(-) create mode 100644 doc/user/project/merge_requests/cherry_pick_changes.md create mode 100644 doc/user/project/merge_requests/img/cherry_pick_changes_commit.png create mode 100644 doc/user/project/merge_requests/img/cherry_pick_changes_commit_modal.png create mode 100644 doc/user/project/merge_requests/img/cherry_pick_changes_mr.png create mode 100644 doc/user/project/merge_requests/img/cherry_pick_changes_mr_modal.png delete mode 100644 doc/workflow/img/cherry_pick_changes_commit.png delete mode 100644 doc/workflow/img/cherry_pick_changes_commit_modal.png delete mode 100644 doc/workflow/img/cherry_pick_changes_mr.png delete mode 100644 doc/workflow/img/cherry_pick_changes_mr_modal.png (limited to 'doc') diff --git a/doc/intro/README.md b/doc/intro/README.md index 26f9cb0ec4a..c319eb6c5ab 100644 --- a/doc/intro/README.md +++ b/doc/intro/README.md @@ -25,7 +25,7 @@ Create merge requests and review code. - [Automatically close issues from merge requests](../customization/issue_closing.md) - [Automatically merge when your builds succeed](../user/project/merge_requests/merge_when_build_succeeds.md) - [Revert any commit](../workflow/revert_changes.md) -- [Cherry-pick any commit](../workflow/cherry_pick_changes.md) +- [Cherry-pick any commit](../user/project/merge_requests/cherry_pick_changes.md) ## Test and Deploy diff --git a/doc/user/project/merge_requests/cherry_pick_changes.md b/doc/user/project/merge_requests/cherry_pick_changes.md new file mode 100644 index 00000000000..64b94d81024 --- /dev/null +++ b/doc/user/project/merge_requests/cherry_pick_changes.md @@ -0,0 +1,52 @@ +# Cherry-pick changes + +> [Introduced][ce-3514] in GitLab 8.7. + +--- + +GitLab implements Git's powerful feature to [cherry-pick any commit][git-cherry-pick] +with introducing a **Cherry-pick** button in Merge Requests and commit details. + +## Cherry-picking a Merge Request + +After the Merge Request has been merged, a **Cherry-pick** button will be available +to cherry-pick the changes introduced by that Merge Request: + +![Cherry-pick Merge Request](img/cherry_pick_changes_mr.png) + +--- + +You can cherry-pick the changes directly into the selected branch or you can opt to +create a new Merge Request with the cherry-pick changes: + +![Cherry-pick Merge Request modal](img/cherry_pick_changes_mr_modal.png) + +## Cherry-picking a Commit + +You can cherry-pick a Commit from the Commit details page: + +![Cherry-pick commit](img/cherry_pick_changes_commit.png) + +--- + +Similar to cherry-picking a Merge Request, you can opt to cherry-pick the changes +directly into the target branch or create a new Merge Request to cherry-pick the +changes: + +![Cherry-pick commit modal](img/cherry_pick_changes_commit_modal.png) + +--- + +Please note that when cherry-picking merge commits, the mainline will always be the +first parent. If you want to use a different mainline then you need to do that +from the command line. + +Here is a quick example to cherry-pick a merge commit using the second parent as the +mainline: + +```bash +git cherry-pick -m 2 7a39eb0 +``` + +[ce-3514]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3514 "Cherry-pick button Merge Request" +[git-cherry-pick]: https://git-scm.com/docs/git-cherry-pick "Git cherry-pick documentation" diff --git a/doc/user/project/merge_requests/img/cherry_pick_changes_commit.png b/doc/user/project/merge_requests/img/cherry_pick_changes_commit.png new file mode 100644 index 00000000000..7fb68cc9e9b Binary files /dev/null and b/doc/user/project/merge_requests/img/cherry_pick_changes_commit.png differ diff --git a/doc/user/project/merge_requests/img/cherry_pick_changes_commit_modal.png b/doc/user/project/merge_requests/img/cherry_pick_changes_commit_modal.png new file mode 100644 index 00000000000..5267e04562f Binary files /dev/null and b/doc/user/project/merge_requests/img/cherry_pick_changes_commit_modal.png differ diff --git a/doc/user/project/merge_requests/img/cherry_pick_changes_mr.png b/doc/user/project/merge_requests/img/cherry_pick_changes_mr.png new file mode 100644 index 00000000000..975fb13e463 Binary files /dev/null and b/doc/user/project/merge_requests/img/cherry_pick_changes_mr.png differ diff --git a/doc/user/project/merge_requests/img/cherry_pick_changes_mr_modal.png b/doc/user/project/merge_requests/img/cherry_pick_changes_mr_modal.png new file mode 100644 index 00000000000..6c003bacbe3 Binary files /dev/null and b/doc/user/project/merge_requests/img/cherry_pick_changes_mr_modal.png differ diff --git a/doc/workflow/cherry_pick_changes.md b/doc/workflow/cherry_pick_changes.md index 64b94d81024..663ffd3f746 100644 --- a/doc/workflow/cherry_pick_changes.md +++ b/doc/workflow/cherry_pick_changes.md @@ -1,52 +1 @@ -# Cherry-pick changes - -> [Introduced][ce-3514] in GitLab 8.7. - ---- - -GitLab implements Git's powerful feature to [cherry-pick any commit][git-cherry-pick] -with introducing a **Cherry-pick** button in Merge Requests and commit details. - -## Cherry-picking a Merge Request - -After the Merge Request has been merged, a **Cherry-pick** button will be available -to cherry-pick the changes introduced by that Merge Request: - -![Cherry-pick Merge Request](img/cherry_pick_changes_mr.png) - ---- - -You can cherry-pick the changes directly into the selected branch or you can opt to -create a new Merge Request with the cherry-pick changes: - -![Cherry-pick Merge Request modal](img/cherry_pick_changes_mr_modal.png) - -## Cherry-picking a Commit - -You can cherry-pick a Commit from the Commit details page: - -![Cherry-pick commit](img/cherry_pick_changes_commit.png) - ---- - -Similar to cherry-picking a Merge Request, you can opt to cherry-pick the changes -directly into the target branch or create a new Merge Request to cherry-pick the -changes: - -![Cherry-pick commit modal](img/cherry_pick_changes_commit_modal.png) - ---- - -Please note that when cherry-picking merge commits, the mainline will always be the -first parent. If you want to use a different mainline then you need to do that -from the command line. - -Here is a quick example to cherry-pick a merge commit using the second parent as the -mainline: - -```bash -git cherry-pick -m 2 7a39eb0 -``` - -[ce-3514]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3514 "Cherry-pick button Merge Request" -[git-cherry-pick]: https://git-scm.com/docs/git-cherry-pick "Git cherry-pick documentation" +This document was moved to [user/project/merge_requests/cherry_pick_changes](../user/project/merge_requests/cherry_pick_changes.md). diff --git a/doc/workflow/img/cherry_pick_changes_commit.png b/doc/workflow/img/cherry_pick_changes_commit.png deleted file mode 100644 index 7fb68cc9e9b..00000000000 Binary files a/doc/workflow/img/cherry_pick_changes_commit.png and /dev/null differ diff --git a/doc/workflow/img/cherry_pick_changes_commit_modal.png b/doc/workflow/img/cherry_pick_changes_commit_modal.png deleted file mode 100644 index 5267e04562f..00000000000 Binary files a/doc/workflow/img/cherry_pick_changes_commit_modal.png and /dev/null differ diff --git a/doc/workflow/img/cherry_pick_changes_mr.png b/doc/workflow/img/cherry_pick_changes_mr.png deleted file mode 100644 index 975fb13e463..00000000000 Binary files a/doc/workflow/img/cherry_pick_changes_mr.png and /dev/null differ diff --git a/doc/workflow/img/cherry_pick_changes_mr_modal.png b/doc/workflow/img/cherry_pick_changes_mr_modal.png deleted file mode 100644 index 6c003bacbe3..00000000000 Binary files a/doc/workflow/img/cherry_pick_changes_mr_modal.png and /dev/null differ -- cgit v1.2.1 From a8ba5840e0c86f3fb72cf81940674698e02ed025 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 13:46:37 +0200 Subject: Move revert_changes.md to new location --- doc/intro/README.md | 2 +- .../merge_requests/img/revert_changes_commit.png | Bin 0 -> 233750 bytes .../img/revert_changes_commit_modal.png | Bin 0 -> 205046 bytes .../merge_requests/img/revert_changes_mr.png | Bin 0 -> 241051 bytes .../merge_requests/img/revert_changes_mr_modal.png | Bin 0 -> 211022 bytes doc/user/project/merge_requests/revert_changes.md | 64 ++++++++++++++++++++ doc/workflow/img/revert_changes_commit.png | Bin 233750 -> 0 bytes doc/workflow/img/revert_changes_commit_modal.png | Bin 205046 -> 0 bytes doc/workflow/img/revert_changes_mr.png | Bin 241051 -> 0 bytes doc/workflow/img/revert_changes_mr_modal.png | Bin 211022 -> 0 bytes doc/workflow/revert_changes.md | 65 +-------------------- 11 files changed, 66 insertions(+), 65 deletions(-) create mode 100644 doc/user/project/merge_requests/img/revert_changes_commit.png create mode 100644 doc/user/project/merge_requests/img/revert_changes_commit_modal.png create mode 100644 doc/user/project/merge_requests/img/revert_changes_mr.png create mode 100644 doc/user/project/merge_requests/img/revert_changes_mr_modal.png create mode 100644 doc/user/project/merge_requests/revert_changes.md delete mode 100644 doc/workflow/img/revert_changes_commit.png delete mode 100644 doc/workflow/img/revert_changes_commit_modal.png delete mode 100644 doc/workflow/img/revert_changes_mr.png delete mode 100644 doc/workflow/img/revert_changes_mr_modal.png (limited to 'doc') diff --git a/doc/intro/README.md b/doc/intro/README.md index c319eb6c5ab..71fef50ceb4 100644 --- a/doc/intro/README.md +++ b/doc/intro/README.md @@ -24,7 +24,7 @@ Create merge requests and review code. - [Create a new merge request](../gitlab-basics/add-merge-request.md) - [Automatically close issues from merge requests](../customization/issue_closing.md) - [Automatically merge when your builds succeed](../user/project/merge_requests/merge_when_build_succeeds.md) -- [Revert any commit](../workflow/revert_changes.md) +- [Revert any commit](../user/project/merge_requests/revert_changes.md) - [Cherry-pick any commit](../user/project/merge_requests/cherry_pick_changes.md) ## Test and Deploy diff --git a/doc/user/project/merge_requests/img/revert_changes_commit.png b/doc/user/project/merge_requests/img/revert_changes_commit.png new file mode 100644 index 00000000000..e7194fc3504 Binary files /dev/null and b/doc/user/project/merge_requests/img/revert_changes_commit.png differ diff --git a/doc/user/project/merge_requests/img/revert_changes_commit_modal.png b/doc/user/project/merge_requests/img/revert_changes_commit_modal.png new file mode 100644 index 00000000000..c660ec7eaec Binary files /dev/null and b/doc/user/project/merge_requests/img/revert_changes_commit_modal.png differ diff --git a/doc/user/project/merge_requests/img/revert_changes_mr.png b/doc/user/project/merge_requests/img/revert_changes_mr.png new file mode 100644 index 00000000000..3002f0ac1c5 Binary files /dev/null and b/doc/user/project/merge_requests/img/revert_changes_mr.png differ diff --git a/doc/user/project/merge_requests/img/revert_changes_mr_modal.png b/doc/user/project/merge_requests/img/revert_changes_mr_modal.png new file mode 100644 index 00000000000..c6aaeecc8a6 Binary files /dev/null and b/doc/user/project/merge_requests/img/revert_changes_mr_modal.png differ diff --git a/doc/user/project/merge_requests/revert_changes.md b/doc/user/project/merge_requests/revert_changes.md new file mode 100644 index 00000000000..5ead9f4177f --- /dev/null +++ b/doc/user/project/merge_requests/revert_changes.md @@ -0,0 +1,64 @@ +# Reverting changes + +> [Introduced][ce-1990] in GitLab 8.5. + +--- + +GitLab implements Git's powerful feature to [revert any commit][git-revert] +with introducing a **Revert** button in Merge Requests and commit details. + +## Reverting a Merge Request + +_**Note:** The **Revert** button will only be available for Merge Requests +created since GitLab 8.5. However, you can still revert a Merge Request +by reverting the merge commit from the list of Commits page._ + +After the Merge Request has been merged, a **Revert** button will be available +to revert the changes introduced by that Merge Request: + +![Revert Merge Request](img/revert_changes_mr.png) + +--- + +You can revert the changes directly into the selected branch or you can opt to +create a new Merge Request with the revert changes: + +![Revert Merge Request modal](img/revert_changes_mr_modal.png) + +--- + +After the Merge Request has been reverted, the **Revert** button will not be +available anymore. + +## Reverting a Commit + +You can revert a Commit from the Commit details page: + +![Revert commit](img/revert_changes_commit.png) + +--- + +Similar to reverting a Merge Request, you can opt to revert the changes +directly into the target branch or create a new Merge Request to revert the +changes: + +![Revert commit modal](img/revert_changes_commit_modal.png) + +--- + +After the Commit has been reverted, the **Revert** button will not be available +anymore. + +Please note that when reverting merge commits, the mainline will always be the +first parent. If you want to use a different mainline then you need to do that +from the command line. + +Here is a quick example to revert a merge commit using the second parent as the +mainline: + +```bash +git revert -m 2 7a39eb0 +``` + +[ce-1990]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1990 "Revert button Merge Request" +[git-revert]: https://git-scm.com/docs/git-revert "Git revert documentation" diff --git a/doc/workflow/img/revert_changes_commit.png b/doc/workflow/img/revert_changes_commit.png deleted file mode 100644 index e7194fc3504..00000000000 Binary files a/doc/workflow/img/revert_changes_commit.png and /dev/null differ diff --git a/doc/workflow/img/revert_changes_commit_modal.png b/doc/workflow/img/revert_changes_commit_modal.png deleted file mode 100644 index c660ec7eaec..00000000000 Binary files a/doc/workflow/img/revert_changes_commit_modal.png and /dev/null differ diff --git a/doc/workflow/img/revert_changes_mr.png b/doc/workflow/img/revert_changes_mr.png deleted file mode 100644 index 3002f0ac1c5..00000000000 Binary files a/doc/workflow/img/revert_changes_mr.png and /dev/null differ diff --git a/doc/workflow/img/revert_changes_mr_modal.png b/doc/workflow/img/revert_changes_mr_modal.png deleted file mode 100644 index c6aaeecc8a6..00000000000 Binary files a/doc/workflow/img/revert_changes_mr_modal.png and /dev/null differ diff --git a/doc/workflow/revert_changes.md b/doc/workflow/revert_changes.md index 5ead9f4177f..cf1292253fc 100644 --- a/doc/workflow/revert_changes.md +++ b/doc/workflow/revert_changes.md @@ -1,64 +1 @@ -# Reverting changes - -> [Introduced][ce-1990] in GitLab 8.5. - ---- - -GitLab implements Git's powerful feature to [revert any commit][git-revert] -with introducing a **Revert** button in Merge Requests and commit details. - -## Reverting a Merge Request - -_**Note:** The **Revert** button will only be available for Merge Requests -created since GitLab 8.5. However, you can still revert a Merge Request -by reverting the merge commit from the list of Commits page._ - -After the Merge Request has been merged, a **Revert** button will be available -to revert the changes introduced by that Merge Request: - -![Revert Merge Request](img/revert_changes_mr.png) - ---- - -You can revert the changes directly into the selected branch or you can opt to -create a new Merge Request with the revert changes: - -![Revert Merge Request modal](img/revert_changes_mr_modal.png) - ---- - -After the Merge Request has been reverted, the **Revert** button will not be -available anymore. - -## Reverting a Commit - -You can revert a Commit from the Commit details page: - -![Revert commit](img/revert_changes_commit.png) - ---- - -Similar to reverting a Merge Request, you can opt to revert the changes -directly into the target branch or create a new Merge Request to revert the -changes: - -![Revert commit modal](img/revert_changes_commit_modal.png) - ---- - -After the Commit has been reverted, the **Revert** button will not be available -anymore. - -Please note that when reverting merge commits, the mainline will always be the -first parent. If you want to use a different mainline then you need to do that -from the command line. - -Here is a quick example to revert a merge commit using the second parent as the -mainline: - -```bash -git revert -m 2 7a39eb0 -``` - -[ce-1990]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1990 "Revert button Merge Request" -[git-revert]: https://git-scm.com/docs/git-revert "Git revert documentation" +This document was moved to [user/project/merge_requests/revert_changes](../user/project/merge_requests/revert_changes.md). -- cgit v1.2.1 From 4d77056af1ca5532ae8482b362b5ef466a640ae2 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 14:15:57 +0200 Subject: Move "Only allow merge requests to be merged if the build succeeds" to new location --- doc/user/project/merge_requests.md | 14 ++------------ ...merge_when_build_succeeds_only_if_succeeds_msg.png | Bin 0 -> 11136 bytes ..._when_build_succeeds_only_if_succeeds_settings.png | Bin 0 -> 17552 bytes .../img/only_allow_merge_if_build_succeeds.png | Bin 17552 -> 0 bytes .../merge_requests/merge_when_build_succeeds.md | 18 ++++++++++++++++++ 5 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 doc/user/project/merge_requests/img/merge_when_build_succeeds_only_if_succeeds_msg.png create mode 100644 doc/user/project/merge_requests/img/merge_when_build_succeeds_only_if_succeeds_settings.png delete mode 100644 doc/user/project/merge_requests/img/only_allow_merge_if_build_succeeds.png (limited to 'doc') diff --git a/doc/user/project/merge_requests.md b/doc/user/project/merge_requests.md index ecccc96582c..a1f5cc29ba8 100644 --- a/doc/user/project/merge_requests.md +++ b/doc/user/project/merge_requests.md @@ -1,17 +1,7 @@ # Merge Requests -Merge requests allow you to exchange changes you made to source code - -## Only allow merge requests to be merged if the build succeeds - -You can prevent merge requests from being merged if their build did not succeed -in the project settings page. - -![only_allow_merge_if_build_succeeds](merge_requests/img/only_allow_merge_if_build_succeeds.png) - -Navigate to project settings page and select the `Only allow merge requests to be merged if the build succeeds` check box. - -Please note that you need to have builds configured to enable this feature. +Merge requests allow you to exchange changes you made to source code and +collaborate with other people on the same project. ## Checkout merge requests locally diff --git a/doc/user/project/merge_requests/img/merge_when_build_succeeds_only_if_succeeds_msg.png b/doc/user/project/merge_requests/img/merge_when_build_succeeds_only_if_succeeds_msg.png new file mode 100644 index 00000000000..6b9756b7418 Binary files /dev/null and b/doc/user/project/merge_requests/img/merge_when_build_succeeds_only_if_succeeds_msg.png differ diff --git a/doc/user/project/merge_requests/img/merge_when_build_succeeds_only_if_succeeds_settings.png b/doc/user/project/merge_requests/img/merge_when_build_succeeds_only_if_succeeds_settings.png new file mode 100644 index 00000000000..18bebf5fe92 Binary files /dev/null and b/doc/user/project/merge_requests/img/merge_when_build_succeeds_only_if_succeeds_settings.png differ diff --git a/doc/user/project/merge_requests/img/only_allow_merge_if_build_succeeds.png b/doc/user/project/merge_requests/img/only_allow_merge_if_build_succeeds.png deleted file mode 100644 index 18bebf5fe92..00000000000 Binary files a/doc/user/project/merge_requests/img/only_allow_merge_if_build_succeeds.png and /dev/null differ diff --git a/doc/user/project/merge_requests/merge_when_build_succeeds.md b/doc/user/project/merge_requests/merge_when_build_succeeds.md index e89fb772d0d..011f9cbc381 100644 --- a/doc/user/project/merge_requests/merge_when_build_succeeds.md +++ b/doc/user/project/merge_requests/merge_when_build_succeeds.md @@ -26,3 +26,21 @@ When the builds are retried and succeed on the second try, the merge request will automatically be merged after all. When the merge request is updated with new commits, the automatic merge is automatically canceled to allow the new changes to be reviewed. + +## Only allow merge requests to be merged if the build succeeds + +> **Note:** +You need to have builds configured to enable this feature. + +You can prevent merge requests from being merged if their build did not succeed. + +Navigate to your project's settings page, select the +**Only allow merge requests to be merged if the build succeeds** check box and +hit **Save** for the changes to take effect. + +![Only allow merge if build succeeds settings](img/merge_when_build_succeeds_only_if_succeeds_settings.png) + +From now on, every time the build fails you will not be able to merge the merge +request from the UI, until you make the build pass. + +![Only allow merge if build succeeds msg](img/merge_when_build_succeeds_only_if_succeeds_msg.png) -- cgit v1.2.1 From 99f28c50d5483d6f55e7accaf1806e68acc46568 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 15:04:51 +0200 Subject: Move merge request versions to its own document --- doc/user/project/merge_requests.md | 6 +----- doc/user/project/merge_requests/img/versions.png | Bin 100566 -> 35001 bytes doc/user/project/merge_requests/versions.md | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 doc/user/project/merge_requests/versions.md (limited to 'doc') diff --git a/doc/user/project/merge_requests.md b/doc/user/project/merge_requests.md index a1f5cc29ba8..f1a14e7e91c 100644 --- a/doc/user/project/merge_requests.md +++ b/doc/user/project/merge_requests.md @@ -73,8 +73,4 @@ It is also working on commits compare view. ## Merge Requests versions -Every time you push to merge request branch, a new version of merge request diff -is created. When you visit the merge request page you see latest version of changes. -However you can select an older one from version dropdown - -![Merge Request Versions](merge_requests/img/versions.png) +Select an older revision to from the version dropdown. diff --git a/doc/user/project/merge_requests/img/versions.png b/doc/user/project/merge_requests/img/versions.png index c0a6dfe6806..f279ccd7ce3 100644 Binary files a/doc/user/project/merge_requests/img/versions.png and b/doc/user/project/merge_requests/img/versions.png differ diff --git a/doc/user/project/merge_requests/versions.md b/doc/user/project/merge_requests/versions.md new file mode 100644 index 00000000000..2b1c5ddd562 --- /dev/null +++ b/doc/user/project/merge_requests/versions.md @@ -0,0 +1,22 @@ +# Merge requests versions + +> Will be [introduced][ce-5467] in GitLab 8.12. + +Every time you push to a branch that is tied to a merge request, a new version +of merge request diff is created. When you visit a merge request that contains +more than one pushes, you can select and compare the versions of those merge +request diffs. + +By default, the latest version of changes is shown. However, you +can select an older one from version dropdown. + +![Merge Request Versions](img/versions.png) + +--- + +>**Note:** +Merge request versions are based on push not on commit. So, if you pushed 5 +commits in a single push, it will be a single option in the dropdown. If you +pushed 5 times, that will count for 5 options. + +[ce-5467]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5467 -- cgit v1.2.1 From bf00e0f4b2fd8994df8f7b567839f12715a05fde Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 18:25:05 +0200 Subject: Add links to new docs in merge_requests.md and workflow/README.md --- doc/user/project/merge_requests.md | 144 +++++++++++++++++---- .../merge_requests/img/merge_request_diff.png | Bin 103239 -> 69394 bytes .../img/merge_request_diff_without_whitespace.png | Bin 71896 -> 0 bytes doc/workflow/README.md | 13 +- 4 files changed, 125 insertions(+), 32 deletions(-) delete mode 100644 doc/user/project/merge_requests/img/merge_request_diff_without_whitespace.png (limited to 'doc') diff --git a/doc/user/project/merge_requests.md b/doc/user/project/merge_requests.md index f1a14e7e91c..f79535d1542 100644 --- a/doc/user/project/merge_requests.md +++ b/doc/user/project/merge_requests.md @@ -3,9 +3,97 @@ Merge requests allow you to exchange changes you made to source code and collaborate with other people on the same project. -## Checkout merge requests locally +## Authorization for merge requests -### By adding a git alias +There are two main ways to have a merge request flow with GitLab: + +1. Working with [protected branches][] in a single repository +1. Working with forks of an authoritative project + +[Learn more about the authorization for merge requests.](merge_requests/authorization_for_merge_requests.md) + +## Cherry-pick changes + +Cherry-pick any commit in the UI by simply clicking the **Cherry-pick** button +in a merged merge requests or a commit. + +[Learn more about cherry-picking changes.](merge_requests/cherry_pick_changes.md) + +## Merge when build succeeds + +When reviewing a merge request that looks ready to merge but still has one or +more CI builds running, you can set it to be merged automatically when all +builds succeed. This way, you don't have to wait for the builds to finish and +remember to merge the request manually. + +[Learn more about merging when build succeeds.](merge_requests/merge_when_build_succeeds.md) + +## Resolve discussion comments in merge requests reviews + +Keep track of the progress during a code review with resolving comments. +Resolving comments prevents you from forgetting to address feedback and lets +you hide discussions that are no longer relevant. + +[Read more about resolving discussion comments in merge requests reviews.](merge_requests/merge_request_discussion_resolution.md) + +## Resolve conflicts + +When a merge request has conflicts, GitLab may provide the option to resolve +those conflicts in the GitLab UI. + +[Learn more about resolving merge conflicts in the UI.](merge_requests/resolve_conflicts.md) + +## Revert changes + +GitLab implements Git's powerful feature to revert any commit with introducing +a **Revert** button in merge requests and commit details. + +[Learn more about reverting changes in the UI](merge_requests/revert_changes.md) + +## Merge requests versions + +Every time you push to a branch that is tied to a merge request, a new version +of merge request diff is created. When you visit a merge request that contains +more than one pushes, you can select and compare the versions of those merge +request diffs. + +[Read more about the merge requests versions.](merge_requests/versions.md) + +## Work In Progress merge requests + +To prevent merge requests from accidentally being accepted before they're +completely ready, GitLab blocks the "Accept" button for merge requests that +have been marked as a **Work In Progress**. + +[Learn more about settings a merge request as "Work In Progress".](merge_requests/work_in_progress_merge_requests.md) + +## Ignore whitespace changes in Merge Request diff view + +If you click the **Hide whitespace changes** button, you can see the diff +without whitespace changes (if there are any). This is also working when on a +specific commit page. + +![MR diff](merge_requests/img/merge_request_diff.png) + +>**Tip:** +You can append `?w=1` while on the diffs page of a merge request to ignore any +whitespace changes. + +## Tips + +Here are some tips that will help you be more efficient with merge requests in +the command line. + +> **Note:** +This section might move in its own document in the future. + +### Checkout merge requests locally + +A merge request contains all the history from a repository, plus the additional +commits added to the branch associated with the merge request. Here's a few +tricks to checkout a merge request locally. + +#### Checkout locally by adding a git alias Add the following alias to your `~/.gitconfig`: @@ -14,17 +102,21 @@ Add the following alias to your `~/.gitconfig`: mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' - ``` -Now you can check out a particular merge request from any repository and any remote, e.g. to check out a merge request number 5 as shown in GitLab from the `upstream` remote, do: +Now you can check out a particular merge request from any repository and any +remote. For example, to check out the merge request with ID 5 as shown in GitLab +from the `upstream` remote, do: ``` -$ git mr upstream 5 +git mr upstream 5 ``` -This will fetch the merge request into a local `mr-upstream-5` branch and check it out. +This will fetch the merge request into a local `mr-upstream-5` branch and check +it out. -### By modifying `.git/config` for a given repository +#### Checkout locally by modifying `.git/config` for a given repository -Locate the section for your GitLab remote in the `.git/config` file. It looks like this: +Locate the section for your GitLab remote in the `.git/config` file. It looks +like this: ``` [remote "origin"] @@ -32,9 +124,19 @@ Locate the section for your GitLab remote in the `.git/config` file. It looks li fetch = +refs/heads/*:refs/remotes/origin/* ``` -Now add the line `fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*` to this section. +You can open the file with: + +``` +git config -e +``` + +Now add the following line to the above section: + +``` +fetch = +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* +``` -It should look like this: +In the end, it should look like this: ``` [remote "origin"] @@ -46,31 +148,19 @@ It should look like this: Now you can fetch all the merge requests: ``` -$ git fetch origin +git fetch origin + +... From https://gitlab.com/gitlab-org/gitlab-ce.git * [new ref] refs/merge-requests/1/head -> origin/merge-requests/1 * [new ref] refs/merge-requests/2/head -> origin/merge-requests/2 ... ``` -To check out a particular merge request: +And to check out a particular merge request: ``` -$ git checkout origin/merge-requests/1 +git checkout origin/merge-requests/1 ``` -## Ignore whitespace changes in Merge Request diff view - -![MR diff](merge_requests/img/merge_request_diff.png) - -If you click the "Hide whitespace changes" button, you can see the diff without whitespace changes. - -![MR diff without whitespace](merge_requests/img/merge_request_diff_without_whitespace.png) - -It is also working on commits compare view. - -![Commit Compare](merge_requests/img/commit_compare.png) - -## Merge Requests versions - -Select an older revision to from the version dropdown. +[protected branches]: protected_branches.md diff --git a/doc/user/project/merge_requests/img/merge_request_diff.png b/doc/user/project/merge_requests/img/merge_request_diff.png index 3ebbfb75ea3..06ee4908edc 100644 Binary files a/doc/user/project/merge_requests/img/merge_request_diff.png and b/doc/user/project/merge_requests/img/merge_request_diff.png differ diff --git a/doc/user/project/merge_requests/img/merge_request_diff_without_whitespace.png b/doc/user/project/merge_requests/img/merge_request_diff_without_whitespace.png deleted file mode 100644 index a0db535019c..00000000000 Binary files a/doc/user/project/merge_requests/img/merge_request_diff_without_whitespace.png and /dev/null differ diff --git a/doc/workflow/README.md b/doc/workflow/README.md index d626b1311a2..d021cca7c38 100644 --- a/doc/workflow/README.md +++ b/doc/workflow/README.md @@ -1,6 +1,5 @@ # Workflow -- [Authorization for merge requests](authorization_for_merge_requests.md) - [Change your time zone](timezone.md) - [Description templates](../user/project/description_templates.md) - [Feature branch workflow](workflow.md) @@ -22,10 +21,14 @@ - [Releases](releases.md) - [Milestones](milestones.md) - [Merge Requests](../user/project/merge_requests.md) -- [Revert changes](revert_changes.md) -- [Cherry-pick changes](cherry_pick_changes.md) -- ["Work In Progress" Merge Requests](wip_merge_requests.md) -- [Merge When Build Succeeds](merge_when_build_succeeds.md) + - [Authorization for merge requests](../user/project/merge_requests/authorization_for_merge_requests.md) + - [Cherry-pick changes](../user/project/merge_requests/cherry_pick_changes.md) + - [Merge when build succeeds](../user/project/merge_requests/merge_when_build_succeeds.md) + - [Resolve discussion comments in merge requests reviews](../user/project/merge_requests/merge_request_discussion_resolution.md) + - [Resolve merge conflicts in the UI](../user/project/merge_requests/resolve_conflicts.md) + - [Revert changes in the UI](../user/project/merge_requests/revert_changes.md) + - [Merge requests versions](../user/project/merge_requests/versions.md) + - ["Work In Progress" merge requests](../user/project/merge_requests/work_in_progress_merge_requests.md) - [Manage large binaries with Git LFS](lfs/manage_large_binaries_with_git_lfs.md) - [Importing from SVN, GitHub, BitBucket, etc](importing/README.md) - [Todos](todos.md) -- cgit v1.2.1 From 026d1acd26dd09a84db969bfc0d5f64e67a5e96f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 5 Sep 2016 19:32:37 +0200 Subject: Refactor authorization_for_merge_requests.md --- .../authorization_for_merge_requests.md | 48 ++++++++++++++-------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'doc') diff --git a/doc/user/project/merge_requests/authorization_for_merge_requests.md b/doc/user/project/merge_requests/authorization_for_merge_requests.md index d1d6d94ec11..59b3fe7242c 100644 --- a/doc/user/project/merge_requests/authorization_for_merge_requests.md +++ b/doc/user/project/merge_requests/authorization_for_merge_requests.md @@ -1,40 +1,56 @@ # Authorization for Merge requests -There are two main ways to have a merge request flow with GitLab: working with protected branches in a single repository, or working with forks of an authoritative project. +There are two main ways to have a merge request flow with GitLab: + +1. Working with [protected branches] in a single repository. +1. Working with forks of an authoritative project. ## Protected branch flow With the protected branch flow everybody works within the same GitLab project. -The project maintainers get Master access and the regular developers get Developer access. +The project maintainers get Master access and the regular developers get +Developer access. The maintainers mark the authoritative branches as 'Protected'. -The developers push feature branches to the project and create merge requests to have their feature branches reviewed and merged into one of the protected branches. +The developers push feature branches to the project and create merge requests +to have their feature branches reviewed and merged into one of the protected +branches. -Only users with Master access can merge changes into a protected branch. +By default, only users with Master access can merge changes into a protected +branch. -### Advantages +**Advantages** -- fewer projects means less clutter -- developers need to consider only one remote repository +- Fewer projects means less clutter. +- Developers need to consider only one remote repository. -### Disadvantages +**Disadvantages** -- manual setup of protected branch required for each new project +- Manual setup of protected branch required for each new project ## Forking workflow -With the forking workflow the maintainers get Master access and the regular developers get Reporter access to the authoritative repository, which prohibits them from pushing any changes to it. +With the forking workflow the maintainers get Master access and the regular +developers get Reporter access to the authoritative repository, which prohibits +them from pushing any changes to it. + +Developers create forks of the authoritative project and push their feature +branches to their own forks. -Developers create forks of the authoritative project and push their feature branches to their own forks. +To get their changes into master they need to create a merge request across +forks. -To get their changes into master they need to create a merge request across forks. +**Advantages** -### Advantages +- In an appropriately configured GitLab group, new projects automatically get + the required access restrictions for regular developers: fewer manual steps + to configure authorization for new projects. -- in an appropriately configured GitLab group, new projects automatically get the required access restrictions for regular developers: fewer manual steps to configure authorization for new projects +**Disadvantages** -### Disadvantages +- The project need to keep their forks up to date, which requires more advanced + Git skills (managing multiple remotes). -- the project need to keep their forks up to date, which requires more advanced Git skills (managing multiple remotes) +[protected branches]: ../protected_branches.md -- cgit v1.2.1 From 1847227f4db1862825356f49f4147b82e8ff0f3d Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 6 Sep 2016 08:25:21 +0200 Subject: Remove doctoc --- doc/ci/yaml/README.md | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'doc') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 58d5306f12a..86b94cf8f54 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -6,50 +6,6 @@ GitLab Runner to manage your project's builds. If you want a quick introduction to GitLab CI, follow our [quick start guide](../quick_start/README.md). ---- - - - -**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - -- [.gitlab-ci.yml](#gitlab-ci-yml) - - [image and services](#image-and-services) - - [before_script](#before_script) - - [after_script](#after_script) - - [stages](#stages) - - [types](#types) - - [variables](#variables) - - [cache](#cache) - - [cache:key](#cache-key) -- [Jobs](#jobs) - - [script](#script) - - [stage](#stage) - - [only and except](#only-and-except) - - [job variables](#job-variables) - - [tags](#tags) - - [allow_failure](#allow_failure) - - [when](#when) - - [Manual actions](#manual-actions) - - [environment](#environment) - - [artifacts](#artifacts) - - [artifacts:name](#artifacts-name) - - [artifacts:when](#artifacts-when) - - [artifacts:expire_in](#artifacts-expire_in) - - [dependencies](#dependencies) - - [before_script and after_script](#before_script-and-after_script) -- [Git Strategy](#git-strategy) -- [Shallow cloning](#shallow-cloning) -- [Hidden keys](#hidden-keys) -- [Special YAML features](#special-yaml-features) - - [Anchors](#anchors) -- [Validate the .gitlab-ci.yml](#validate-the-gitlab-ci-yml) -- [Skipping builds](#skipping-builds) -- [Examples](#examples) - - - ---- - ## .gitlab-ci.yml From version 7.12, GitLab CI uses a [YAML](https://en.wikipedia.org/wiki/YAML) -- cgit v1.2.1 From 24ac1d9b2a72682988fe619a1298332fe996280f Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 6 Sep 2016 10:37:10 +0200 Subject: Replace the triggers docs with new images --- doc/ci/triggers/img/builds_page.png | Bin 33324 -> 76181 bytes doc/ci/triggers/img/trigger_single_build.png | Bin 2387 -> 21152 bytes doc/ci/triggers/img/trigger_variables.png | Bin 4433 -> 9315 bytes doc/ci/triggers/img/triggers_page.png | Bin 12943 -> 12002 bytes doc/ci/yaml/README.md | 4 +++- 5 files changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ci/triggers/img/builds_page.png b/doc/ci/triggers/img/builds_page.png index 2dee8ee6107..c2cf4b1852c 100644 Binary files a/doc/ci/triggers/img/builds_page.png and b/doc/ci/triggers/img/builds_page.png differ diff --git a/doc/ci/triggers/img/trigger_single_build.png b/doc/ci/triggers/img/trigger_single_build.png index baf3fc183d8..fa86f0fee3d 100644 Binary files a/doc/ci/triggers/img/trigger_single_build.png and b/doc/ci/triggers/img/trigger_single_build.png differ diff --git a/doc/ci/triggers/img/trigger_variables.png b/doc/ci/triggers/img/trigger_variables.png index 908355c33a5..b2fcc65d304 100644 Binary files a/doc/ci/triggers/img/trigger_variables.png and b/doc/ci/triggers/img/trigger_variables.png differ diff --git a/doc/ci/triggers/img/triggers_page.png b/doc/ci/triggers/img/triggers_page.png index 69cec5cdebf..438f285ae2d 100644 Binary files a/doc/ci/triggers/img/triggers_page.png and b/doc/ci/triggers/img/triggers_page.png differ diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 86b94cf8f54..41d9112a618 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -139,7 +139,7 @@ Alias for [stages](#stages). Introduced in GitLab Runner v0.5.0. GitLab CI allows you to add variables to `.gitlab-ci.yml` that are set in the -build environment. The variables are stored in the git repository and are meant +build environment. The variables are stored in the Git repository and are meant to store non-sensitive project configuration, for example: ```yaml @@ -154,6 +154,8 @@ thus allowing to fine tune them. Variables can be also defined on [job level](#job-variables). +[Learn more about variables.](../variables/README.md) + ### cache >**Note:** -- cgit v1.2.1 From c5e5614fe7bef000a4d8da1f7590d666b05b4e62 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 6 Sep 2016 10:47:48 +0200 Subject: Add a reference to triggers docs in ci/yaml/README.md --- doc/ci/yaml/README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index 41d9112a618..ff4c8ddc54b 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -1044,6 +1044,13 @@ test:mysql: You can see that the hidden keys are conveniently used as templates. +## Triggers + +Triggers can be used to force a rebuild of a specific branch, tag or commit, +with an API call. + +[Read more in the triggers documentation.](../triggers/README.md) + ## Validate the .gitlab-ci.yml Each instance of GitLab CI has an embedded debug tool called Lint. -- cgit v1.2.1