diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 03:09:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 03:09:56 +0300 |
commit | cc626f14115f740bd4aa247cf3ac42dfb2082a4e (patch) | |
tree | b5c7f25711903177ea0e756b1fabd8eef2a9ca14 /doc | |
parent | 19db7fd1fefc4e4249d4e55f409f321fdb85aed1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/import.md | 16 | ||||
-rw-r--r-- | doc/api/jobs.md | 57 | ||||
-rw-r--r-- | doc/development/documentation/styleguide/index.md | 194 | ||||
-rw-r--r-- | doc/development/documentation/styleguide/word_list.md | 8 | ||||
-rw-r--r-- | doc/integration/glab/img/example-output_v15_6.png | bin | 0 -> 22748 bytes | |||
-rw-r--r-- | doc/integration/glab/index.md | 80 |
6 files changed, 291 insertions, 64 deletions
diff --git a/doc/api/import.md b/doc/api/import.md index 78b9beb1815..e5c69e08cc0 100644 --- a/doc/api/import.md +++ b/doc/api/import.md @@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w ## Import repository from GitHub -Import your projects from GitHub to GitLab via the API. +Import your projects from GitHub to GitLab using the API. ```plaintext POST /import/github @@ -61,6 +61,20 @@ Example response: } ``` +### Import a public project through the API using a group access token + +When you import a project from GitHub to GitLab through the API using a group access +token, the GitLab project inherits the original project's visibility settings. +The API imports the project into the bot account's namespace and makes the project +publicly accessible if the: + +- Original project is public. +- `path` or `target_namespace` do not exist. + +Because the project cannot be deleted by an end user with a valid token, this +could be a security risk. Make sure the `path` or `target_namespace` exist before +importing a public project from GitHub into GitLab. + ## Cancel GitHub project import > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/364783) in GitLab 15.5. diff --git a/doc/api/jobs.md b/doc/api/jobs.md index fc2de00c3d2..992cb70c45d 100644 --- a/doc/api/jobs.md +++ b/doc/api/jobs.md @@ -520,46 +520,39 @@ Example response: ```json { - "allowed_agents": - [ - { + "allowed_agents": [ + { + "id": 1, + "config_project": { "id": 1, - "config_project": { - "id": 1, - "description": null, - "name": "project1", - "name_with_namespace": "John Doe2 / project1", - "path": "project1", - "path_with_namespace": "namespace1/project1", - "created_at": "2021-03-26T14:51:50.579Z" - } + "description": null, + "name": "project1", + "name_with_namespace": "John Doe2 / project1", + "path": "project1", + "path_with_namespace": "namespace1/project1", + "created_at": "2022-11-16T14:51:50.579Z" } - ], + } + ], "job": { - "id": 1, - "name": "test", - "stage": "test", - "project_id": 1, - "project_name": "project1" + "id": 1 }, "pipeline": { - "id": 1, - "project_id": 1, - "sha": "b83d6e391c22777fca1ed3012fce84f633d7fed0", - "ref": "main", - "status": "pending", - "created_at": "2021-03-26T14:51:51.107Z", - "updated_at": "2021-03-26T14:51:51.107Z", - "web_url": "http://localhost/namespace1/project1/-/pipelines/1" + "id": 2 }, "project": { "id": 1, - "description": null, - "name": "project1", - "name_with_namespace": "John Doe2 / project1", - "path": "project1", - "path_with_namespace": "namespace1/project1", - "created_at": "2021-03-26T14:51:50.579Z" + "groups": [ + { + "id": 1 + }, + { + "id": 2 + }, + { + "id": 3 + } + ] }, "user": { "id": 2, diff --git a/doc/development/documentation/styleguide/index.md b/doc/development/documentation/styleguide/index.md index ef934186981..fc9b477574c 100644 --- a/doc/development/documentation/styleguide/index.md +++ b/doc/development/documentation/styleguide/index.md @@ -1382,10 +1382,12 @@ Here's some other content in tab two. For tab titles, be brief and consistent. Ensure they are parallel, and start each with a capital letter. For example: -- `Omnibus package`, `Helm chart`, `Source` +- `Linux package (Omnibus)`, `Helm chart (Kubernetes)` (when documenting configuration edits, follow the + [configuration edits guide](#configuration-documentation-for-different-installation-methods)) - `15.1 and earlier`, `15.2 and later` -See [Pajamas](https://design.gitlab.com/components/tabs/#guidelines) for details. +See [Pajamas](https://design.gitlab.com/components/tabs/#guidelines) for more +details on tabs. ## Terms @@ -1487,21 +1489,32 @@ we install Ruby from source. To update the guide for a new Ruby version: - Replace the sha256sum. It's available on the [downloads page](https://www.ruby-lang.org/en/downloads/) of the Ruby website. -### Configuration documentation for source and Omnibus installations +### Configuration documentation for different installation methods -GitLab supports two installation methods: installations from source, and Omnibus -packages. Possible configuration settings include: +GitLab supports four installation methods: -- Settings that touch configuration files in `config/`. -- NGINX settings. -- Other settings in `lib/support/`. +- Linux package (Omnibus) +- Helm chart (Kubernetes) +- Docker +- Self-compiled (Source) Configuration procedures can require users to edit configuration files, reconfigure -GitLab, or restart GitLab. Use these styles to document these steps, replacing -`PATH/TO` with the appropriate path: +GitLab, or restart GitLab. In this case: +- Use [tabs](#tabs) to differentiate among the various installation methods. +- Use them in the order described below. +- Indent the code blocks to line up with the list item they belong to. +- Use the appropriate syntax highlighting for each code block (`ruby`, `shell`, or `yaml`). +- For the YAML files, always include the parent settings. + +You can copy and paste the following snippet when describing a configuration +edit: + +<!-- markdownlint-disable tabs-blank-lines --> ````markdown -**For Omnibus installations** +::Tabs + +:::TabTitle Linux package (Omnibus) 1. Edit `/etc/gitlab/gitlab.rb`: @@ -1509,32 +1522,159 @@ GitLab, or restart GitLab. Use these styles to document these steps, replacing external_url "https://gitlab.example.com" ``` -1. Save the file and [reconfigure](PATH/TO/administration/restart_gitlab.md#omnibus-gitlab-reconfigure) - GitLab for the changes to take effect. +1. Save the file and reconfigure GitLab: ---- + ```shell + sudo gitlab-ctl reconfigure + ``` + +:::TabTitle Helm chart (Kubernetes) -**For installations from source** +1. Export the Helm values: + + ```shell + helm get values gitlab > gitlab_values.yaml + ``` -1. Edit `config/gitlab.yml`: +1. Edit `gitlab_values.yaml`: ```yaml - gitlab: - host: "gitlab.example.com" + global: + hosts: + gitlab: + name: gitlab.example.com ``` -1. Save the file and [restart](PATH/TO/administration/restart_gitlab.md#installations-from-source) - GitLab for the changes to take effect. +1. Apply the new values: + + ```shell + helm upgrade -f gitlab_values.yaml gitlab gitlab/gitlab + ``` + +:::TabTitle Docker + +1. Edit `docker-compose.yml`: + + ```yaml + version: "3.6" + services: + gitlab: + environment: + GITLAB_OMNIBUS_CONFIG: | + external_url "https://gitlab.example.com" + ``` + +1. Save the file and restart GitLab: + + ```shell + docker compose up -d + ``` + +:::TabTitle Self-compiled (Source) + +1. Edit `/home/git/gitlab/config/gitlab.yml`: + + ```yaml + production: &base + gitlab: + host: "gitlab.example.com" + ``` + +1. Save the file and restart GitLab: + + ```shell + # For systems running systemd + sudo systemctl restart gitlab.target + + # For systems running SysV init + sudo service gitlab restart + ``` + +::EndTabs ```` +<!-- markdownlint-enable tabs-blank-lines --> + +It renders as: -In this case: +::Tabs + +:::TabTitle Linux package (Omnibus) + +1. Edit `/etc/gitlab/gitlab.rb`: -- Bold the installation method's name. -- Separate the methods with three dashes (`---`) to create a horizontal line. -- Indent the code blocks to line up with the list item they belong to.. -- Use the appropriate syntax highlighting for each code block. -- Use the [GitLab Restart](#gitlab-restart) section to explain any required - restart or reconfigure of GitLab. + ```ruby + external_url "https://gitlab.example.com" + ``` + +1. Save the file and reconfigure GitLab: + + ```shell + sudo gitlab-ctl reconfigure + ``` + +:::TabTitle Helm chart (Kubernetes) + +1. Export the Helm values: + + ```shell + helm get values gitlab > gitlab_values.yaml + ``` + +1. Edit `gitlab_values.yaml`: + + ```yaml + global: + hosts: + gitlab: + name: gitlab.example.com + ``` + +1. Apply the new values: + + ```shell + helm upgrade -f gitlab_values.yaml gitlab gitlab/gitlab + ``` + +:::TabTitle Docker + +1. Edit `docker-compose.yml`: + + ```yaml + version: "3.6" + services: + gitlab: + environment: + GITLAB_OMNIBUS_CONFIG: | + external_url "https://gitlab.example.com" + ``` + +1. Save the file and restart GitLab: + + ```shell + docker compose up -d + ``` + +:::TabTitle Self-compiled (Source) + +1. Edit `/home/git/gitlab/config/gitlab.yml`: + + ```yaml + production: &base + gitlab: + host: "gitlab.example.com" + ``` + +1. Save the file and restart GitLab: + + ```shell + # For systems running systemd + sudo systemctl restart gitlab.target + + # For systems running SysV init + sudo service gitlab restart + ``` + +::EndTabs ## Feature flags diff --git a/doc/development/documentation/styleguide/word_list.md b/doc/development/documentation/styleguide/word_list.md index 40827984902..d80f0e0d6f0 100644 --- a/doc/development/documentation/styleguide/word_list.md +++ b/doc/development/documentation/styleguide/word_list.md @@ -1064,6 +1064,10 @@ Instead of **and/or**, use **or** or re-write the sentence. This rule also appli Do not use **slave**. Another option is **secondary**. ([Vale](../testing.md#vale) rule: [`InclusionCultural.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/InclusionCultural.yml)) +## subgroup + +Use **subgroup** (no hyphen) instead of **sub-group**. ([Vale](../testing.md#vale) rule: [`SubstitutionSuggestions.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionSuggestions.yml)) + ## subscription tier Do not confuse **subscription** or **subscription tier** with **[license](#license)**. @@ -1079,10 +1083,6 @@ To describe tiers: | In the Premium tier or higher | In the Premium or Ultimate tier | | In the Premium tier or lower | In the Free or Premium tier | -## subgroup - -Use **subgroup** (no hyphen) instead of **sub-group**. ([Vale](../testing.md#vale) rule: [`SubstitutionSuggestions.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionSuggestions.yml)) - ## that Do not use **that** when describing a noun. For example: diff --git a/doc/integration/glab/img/example-output_v15_6.png b/doc/integration/glab/img/example-output_v15_6.png Binary files differnew file mode 100644 index 00000000000..7d2c5f2e4d9 --- /dev/null +++ b/doc/integration/glab/img/example-output_v15_6.png diff --git a/doc/integration/glab/index.md b/doc/integration/glab/index.md new file mode 100644 index 00000000000..77239c5f6c5 --- /dev/null +++ b/doc/integration/glab/index.md @@ -0,0 +1,80 @@ +--- +stage: Create +group: Code Review +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# GitLab CLI - `glab` + +GLab is an open source GitLab CLI tool. It brings GitLab to your terminal: +next to where you are already working with Git and your code, without +switching between windows and browser tabs. + +- Work with issues. +- Work with merge requests. +- Watch running pipelines directly from your CLI. + +![command example](img/example-output_v15_6.png) + +The GitLab CLI uses commands structured like `glab <command> <subcommand> [flags]` +to perform many of the actions you normally do from the GitLab user interface: + +```shell +# Sign in +glab auth login --stdin < token.txt + +# View a list of issues +glab issue list + +# Create merge request for issue 123 +glab mr for 123 + +# Check out the branch for merge request 243 +glab mr checkout 243 + +# Watch the pipeline in progress +glab pipeline ci view + +# View, approve, and merge the merge request +glab mr view +glab mr approve +glab mr merge +``` + +## Core commands + +- `glab alias` +- `glab api` +- `glab auth` +- `glab ci` +- `glab issue` +- `glab label` +- `glab mr` +- `glab project` +- `glab release` +- `glab snippet` +- `glab ssh-key` +- `glab user` +- `glab variable` + +## Install the CLI + +Installation instructions are available in the GLab +[`README`](https://gitlab.com/gitlab-org/cli/#installation). + +## Authenticate with GitLab + +To authenticate with your GitLab account, run `glab auth login`. +`glab` respects tokens set using `GITLAB_TOKEN`. + +## Report issues + +Open an issue in the [`gitlab-org/cli` repository](https://gitlab.com/gitlab-org/cli/issues/new) +to send us feedback. + +## Related topics + +- [Install the CLI](https://gitlab.com/gitlab-org/cli/-/blob/main/README.md#installation) +- [Documentation](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source) +- The extension source code is available in the + [`cli`](https://gitlab.com/gitlab-org/cli/) project. |