Commit f3f4b432 authored by Amy Qualls's avatar Amy Qualls

Merge branch 'docs-fence-languages-cleanup-1' into 'master'

Update codeblock fence languages to full name

See merge request gitlab-org/gitlab!32499
parents a2a0908d 9bb2e272
...@@ -499,7 +499,7 @@ to start again from scratch, there are a few steps that can help you: ...@@ -499,7 +499,7 @@ to start again from scratch, there are a few steps that can help you:
1. Refresh Foreign Data Wrapper tables 1. Refresh Foreign Data Wrapper tables
```sh ```shell
gitlab-rake geo:db:refresh_foreign_tables gitlab-rake geo:db:refresh_foreign_tables
``` ```
......
...@@ -716,7 +716,7 @@ built-in command: ...@@ -716,7 +716,7 @@ built-in command:
If you did not change the default location of the configuration file, run: If you did not change the default location of the configuration file, run:
```sh ```shell
sudo gitlab-ctl registry-garbage-collect sudo gitlab-ctl registry-garbage-collect
``` ```
...@@ -725,7 +725,7 @@ layers you have stored. ...@@ -725,7 +725,7 @@ layers you have stored.
If you changed the location of the Container Registry `config.yml`: If you changed the location of the Container Registry `config.yml`:
```sh ```shell
sudo gitlab-ctl registry-garbage-collect /path/to/config.yml sudo gitlab-ctl registry-garbage-collect /path/to/config.yml
``` ```
...@@ -749,7 +749,7 @@ referenced by the registry tag. The `registry-garbage-collect` command supports ...@@ -749,7 +749,7 @@ referenced by the registry tag. The `registry-garbage-collect` command supports
`-m` switch to allow you to remove all unreferenced manifests and layers that are `-m` switch to allow you to remove all unreferenced manifests and layers that are
not directly accessible via `tag`: not directly accessible via `tag`:
```sh ```shell
sudo gitlab-ctl registry-garbage-collect -m sudo gitlab-ctl registry-garbage-collect -m
``` ```
...@@ -787,7 +787,7 @@ To enable the read-only mode: ...@@ -787,7 +787,7 @@ To enable the read-only mode:
1. Save and reconfigure GitLab: 1. Save and reconfigure GitLab:
```sh ```shell
sudo gitlab-ctl reconfigure sudo gitlab-ctl reconfigure
``` ```
...@@ -795,7 +795,7 @@ To enable the read-only mode: ...@@ -795,7 +795,7 @@ To enable the read-only mode:
1. Next, trigger one of the garbage collect commands: 1. Next, trigger one of the garbage collect commands:
```sh ```shell
# Recycling unused tags # Recycling unused tags
sudo /opt/gitlab/embedded/bin/registry garbage-collect /var/opt/gitlab/registry/config.yml sudo /opt/gitlab/embedded/bin/registry garbage-collect /var/opt/gitlab/registry/config.yml
...@@ -822,7 +822,7 @@ To enable the read-only mode: ...@@ -822,7 +822,7 @@ To enable the read-only mode:
1. Save and reconfigure GitLab: 1. Save and reconfigure GitLab:
```sh ```shell
sudo gitlab-ctl reconfigure sudo gitlab-ctl reconfigure
``` ```
......
...@@ -63,7 +63,7 @@ other CDNs or Function as a Service (FaaS) systems should work using the same pr ...@@ -63,7 +63,7 @@ other CDNs or Function as a Service (FaaS) systems should work using the same pr
`pwgen -cn1 64` on a UNIX machine). Save this token for the admin panel, as `pwgen -cn1 64` on a UNIX machine). Save this token for the admin panel, as
described in the [configuring](#configuring) section. described in the [configuring](#configuring) section.
```js ```javascript
const ORIGIN_HOSTNAME = 'gitlab.installation.com' // FIXME: SET CORRECT VALUE const ORIGIN_HOSTNAME = 'gitlab.installation.com' // FIXME: SET CORRECT VALUE
const STORAGE_TOKEN = 'very-secure-token' // FIXME: SET CORRECT VALUE const STORAGE_TOKEN = 'very-secure-token' // FIXME: SET CORRECT VALUE
const CACHE_PRIVATE_OBJECTS = false const CACHE_PRIVATE_OBJECTS = false
......
...@@ -16,19 +16,19 @@ include use cases targeted for parsing GitLab log files. ...@@ -16,19 +16,19 @@ include use cases targeted for parsing GitLab log files.
#### Pipe colorized `jq` output into `less` #### Pipe colorized `jq` output into `less`
```sh ```shell
jq . <FILE> -C | less -R jq . <FILE> -C | less -R
``` ```
#### Search for a term and pretty-print all matching lines #### Search for a term and pretty-print all matching lines
```sh ```shell
grep <TERM> <FILE> | jq . grep <TERM> <FILE> | jq .
``` ```
#### Skip invalid lines of JSON #### Skip invalid lines of JSON
```sh ```shell
jq -cR 'fromjson?' file.json | jq <COMMAND> jq -cR 'fromjson?' file.json | jq <COMMAND>
``` ```
...@@ -39,49 +39,49 @@ This skips over all invalid lines and parses the rest. ...@@ -39,49 +39,49 @@ This skips over all invalid lines and parses the rest.
#### Find all requests with a 5XX status code #### Find all requests with a 5XX status code
```sh ```shell
jq 'select(status >= 500)' <FILE> jq 'select(status >= 500)' <FILE>
``` ```
#### Top 10 slowest requests #### Top 10 slowest requests
```sh ```shell
jq -s 'sort_by(-.duration) | limit(10; .[])' <FILE> jq -s 'sort_by(-.duration) | limit(10; .[])' <FILE>
``` ```
#### Find and pretty print all requests related to a project #### Find and pretty print all requests related to a project
```sh ```shell
grep <PROJECT_NAME> <FILE> | jq . grep <PROJECT_NAME> <FILE> | jq .
``` ```
#### Find all requests with a total duration > 5 seconds #### Find all requests with a total duration > 5 seconds
```sh ```shell
jq 'select(.duration > 5000)' <FILE> jq 'select(.duration > 5000)' <FILE>
``` ```
#### Find all project requests with more than 5 rugged calls #### Find all project requests with more than 5 rugged calls
```sh ```shell
grep <PROJECT_NAME> <FILE> | jq 'select(.rugged_calls > 5)' grep <PROJECT_NAME> <FILE> | jq 'select(.rugged_calls > 5)'
``` ```
#### Find all requests with a Gitaly duration > 10 seconds #### Find all requests with a Gitaly duration > 10 seconds
```sh ```shell
jq 'select(.gitaly_duration > 10000)' <FILE> jq 'select(.gitaly_duration > 10000)' <FILE>
``` ```
#### Find all requests with a queue duration > 10 seconds #### Find all requests with a queue duration > 10 seconds
```sh ```shell
jq 'select(.queue_duration > 10000)' <FILE> jq 'select(.queue_duration > 10000)' <FILE>
``` ```
#### Top 10 requests by # of Gitaly calls #### Top 10 requests by # of Gitaly calls
```sh ```shell
jq -s 'map(select(.gitaly_calls != null)) | sort_by(-.gitaly_calls) | limit(10; .[])' <FILE> jq -s 'map(select(.gitaly_calls != null)) | sort_by(-.gitaly_calls) | limit(10; .[])' <FILE>
``` ```
...@@ -89,7 +89,7 @@ jq -s 'map(select(.gitaly_calls != null)) | sort_by(-.gitaly_calls) | limit(10; ...@@ -89,7 +89,7 @@ jq -s 'map(select(.gitaly_calls != null)) | sort_by(-.gitaly_calls) | limit(10;
#### Print the top three controller methods by request volume and their three longest durations #### Print the top three controller methods by request volume and their three longest durations
```sh ```shell
jq -s -r 'group_by(.controller+.action) | sort_by(-length) | limit(3; .[]) | sort_by(-.duration) | "CT: \(length)\tMETHOD: \(.[0].controller)#\(.[0].action)\tDURS: \(.[0].duration), \(.[1].duration), \(.[2].duration)"' production_json.log jq -s -r 'group_by(.controller+.action) | sort_by(-length) | limit(3; .[]) | sort_by(-.duration) | "CT: \(length)\tMETHOD: \(.[0].controller)#\(.[0].action)\tDURS: \(.[0].duration), \(.[1].duration), \(.[2].duration)"' production_json.log
``` ```
...@@ -105,7 +105,7 @@ CT: 1328 METHOD: Projects::NotesController#index DURS: 403.99, 386.29, 384.3 ...@@ -105,7 +105,7 @@ CT: 1328 METHOD: Projects::NotesController#index DURS: 403.99, 386.29, 384.3
#### Print top three routes with request count and their three longest durations #### Print top three routes with request count and their three longest durations
```sh ```shell
jq -s -r 'group_by(.route) | sort_by(-length) | limit(3; .[]) | sort_by(-.duration) | "CT: \(length)\tROUTE: \(.[0].route)\tDURS: \(.[0].duration), \(.[1].duration), \(.[2].duration)"' api_json.log jq -s -r 'group_by(.route) | sort_by(-length) | limit(3; .[]) | sort_by(-.duration) | "CT: \(length)\tROUTE: \(.[0].route)\tDURS: \(.[0].duration), \(.[1].duration), \(.[2].duration)"' api_json.log
``` ```
...@@ -121,25 +121,25 @@ CT: 190 ROUTE: /api/:version/projects/:id/repository/commits DURS: 1079.02, ...@@ -121,25 +121,25 @@ CT: 190 ROUTE: /api/:version/projects/:id/repository/commits DURS: 1079.02,
#### Find all Gitaly requests sent from web UI #### Find all Gitaly requests sent from web UI
```sh ```shell
jq 'select(."grpc.meta.client_name" == "gitlab-web")' current jq 'select(."grpc.meta.client_name" == "gitlab-web")' current
``` ```
#### Find all failed Gitaly requests #### Find all failed Gitaly requests
```sh ```shell
jq 'select(."grpc.code" != null and ."grpc.code" != "OK")' current jq 'select(."grpc.code" != null and ."grpc.code" != "OK")' current
``` ```
#### Find all requests that took longer than 30 seconds #### Find all requests that took longer than 30 seconds
```sh ```shell
jq 'select(."grpc.time_ms" > 30000)' current jq 'select(."grpc.time_ms" > 30000)' current
``` ```
#### Print top three projects by request volume and their three longest durations #### Print top three projects by request volume and their three longest durations
```sh ```shell
jq -s -r 'map(select(."grpc.request.glProjectPath" != null and ."grpc.request.glProjectPath" != "" and ."grpc.time_ms" != null)) | group_by(."grpc.request.glProjectPath") | sort_by(-length) | limit(3; .[]) | sort_by(-."grpc.time_ms") | "CT: \(length)\tPROJECT: \(.[0]."grpc.request.glProjectPath")\tDURS: \(.[0]."grpc.time_ms"), \(.[1]."grpc.time_ms"), \(.[2]."grpc.time_ms")"' current jq -s -r 'map(select(."grpc.request.glProjectPath" != null and ."grpc.request.glProjectPath" != "" and ."grpc.time_ms" != null)) | group_by(."grpc.request.glProjectPath") | sort_by(-length) | limit(3; .[]) | sort_by(-."grpc.time_ms") | "CT: \(length)\tPROJECT: \(.[0]."grpc.request.glProjectPath")\tDURS: \(.[0]."grpc.time_ms"), \(.[1]."grpc.time_ms"), \(.[2]."grpc.time_ms")"' current
``` ```
......
...@@ -297,7 +297,7 @@ POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/play ...@@ -297,7 +297,7 @@ POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/play
Example request: Example request:
```sh ```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/pipeline_schedules/1/play curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/pipeline_schedules/1/play
``` ```
......
...@@ -17,7 +17,7 @@ GET /projects/:id/remote_mirrors ...@@ -17,7 +17,7 @@ GET /projects/:id/remote_mirrors
Example request: Example request:
```sh ```shell
curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors' curl --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors'
``` ```
...@@ -63,7 +63,7 @@ POST /projects/:id/remote_mirrors ...@@ -63,7 +63,7 @@ POST /projects/:id/remote_mirrors
Example request: Example request:
```sh ```shell
curl --request POST --data "url=https://username:token@example.com/gitlab/example.git" --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors' curl --request POST --data "url=https://username:token@example.com/gitlab/example.git" --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors'
``` ```
...@@ -104,7 +104,7 @@ PUT /projects/:id/remote_mirrors/:mirror_id ...@@ -104,7 +104,7 @@ PUT /projects/:id/remote_mirrors/:mirror_id
Example request: Example request:
```sh ```shell
curl --request PUT --data "enabled=false" --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors/101486' curl --request PUT --data "enabled=false" --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitlab.example.com/api/v4/projects/42/remote_mirrors/101486'
``` ```
......
...@@ -49,7 +49,7 @@ For feature flags disabled by default, if they can be used by end users: ...@@ -49,7 +49,7 @@ For feature flags disabled by default, if they can be used by end users:
For example, for a feature disabled by default, disabled on GitLab.com, and For example, for a feature disabled by default, disabled on GitLab.com, and
not ready for production use: not ready for production use:
````md ````markdown
# Feature Name # Feature Name
> - [Introduced](link-to-issue) in GitLab 12.0. > - [Introduced](link-to-issue) in GitLab 12.0.
...@@ -93,7 +93,7 @@ For features that became enabled by default: ...@@ -93,7 +93,7 @@ For features that became enabled by default:
For example, for a feature initially deployed disabled by default, that became enabled by default, that is enabled on GitLab.com, and ready for production use: For example, for a feature initially deployed disabled by default, that became enabled by default, that is enabled on GitLab.com, and ready for production use:
````md ````markdown
# Feature Name # Feature Name
> - [Introduced](link-to-issue) in GitLab 12.0. > - [Introduced](link-to-issue) in GitLab 12.0.
...@@ -138,7 +138,7 @@ For features enabled by default: ...@@ -138,7 +138,7 @@ For features enabled by default:
For example, for a feature enabled by default, enabled on GitLab.com, and ready for production use: For example, for a feature enabled by default, enabled on GitLab.com, and ready for production use:
````md ````markdown
# Feature Name # Feature Name
> - [Introduced](link-to-issue) in GitLab 12.0. > - [Introduced](link-to-issue) in GitLab 12.0.
...@@ -177,7 +177,7 @@ Once the feature is ready and the flag has been removed, clean up the ...@@ -177,7 +177,7 @@ Once the feature is ready and the flag has been removed, clean up the
documentation. Remove the feature flag mention keeping only a note that documentation. Remove the feature flag mention keeping only a note that
mentions the flag in the version history notes: mentions the flag in the version history notes:
````md ````markdown
# Feature Name # Feature Name
> - [Introduced](link-to-issue) in GitLab 12.0. > - [Introduced](link-to-issue) in GitLab 12.0.
......
...@@ -79,7 +79,7 @@ change prior to merging. ...@@ -79,7 +79,7 @@ change prior to merging.
If you indeed need to change a document's location, do not remove the old If you indeed need to change a document's location, do not remove the old
document, but instead replace all of its content with the following: document, but instead replace all of its content with the following:
```md ```markdown
--- ---
redirect_to: '../path/to/file/index.md' redirect_to: '../path/to/file/index.md'
--- ---
...@@ -102,7 +102,7 @@ For example, if you move `doc/workflow/lfs/index.md` to ...@@ -102,7 +102,7 @@ For example, if you move `doc/workflow/lfs/index.md` to
1. Copy `doc/workflow/lfs/index.md` to `doc/administration/lfs.md` 1. Copy `doc/workflow/lfs/index.md` to `doc/administration/lfs.md`
1. Replace the contents of `doc/workflow/lfs/index.md` with: 1. Replace the contents of `doc/workflow/lfs/index.md` with:
```md ```markdown
--- ---
redirect_to: '../../administration/lfs.md' redirect_to: '../../administration/lfs.md'
--- ---
......
...@@ -41,7 +41,7 @@ and other logical divisions such as pre- and post-deployment steps. ...@@ -41,7 +41,7 @@ and other logical divisions such as pre- and post-deployment steps.
To start a new document, respect the file tree and file name guidelines, To start a new document, respect the file tree and file name guidelines,
as well as the style guidelines. Use the following template: as well as the style guidelines. Use the following template:
```md ```markdown
<!--Follow the Style Guide when working on this document. https://docs.gitlab.com/ee/development/documentation/styleguide.html <!--Follow the Style Guide when working on this document. https://docs.gitlab.com/ee/development/documentation/styleguide.html
When done, remove all of this commented-out text, except a commented-out Troubleshooting section, When done, remove all of this commented-out text, except a commented-out Troubleshooting section,
which, if empty, can be left in place to encourage future use.--> which, if empty, can be left in place to encourage future use.-->
......
...@@ -390,7 +390,7 @@ tenses, words, and phrases: ...@@ -390,7 +390,7 @@ tenses, words, and phrases:
- Insert an empty line for new paragraphs. - Insert an empty line for new paragraphs.
- Insert an empty line between different markups (for example, after every paragraph, header, list, and so on). Example: - Insert an empty line between different markups (for example, after every paragraph, header, list, and so on). Example:
```md ```markdown
## Header ## Header
Paragraph. Paragraph.
...@@ -447,7 +447,7 @@ Only use ordered lists when their items describe a sequence of steps to follow. ...@@ -447,7 +447,7 @@ Only use ordered lists when their items describe a sequence of steps to follow.
Do: Do:
```md ```markdown
These are the steps to do something: These are the steps to do something:
1. First, do the first step. 1. First, do the first step.
...@@ -457,7 +457,7 @@ These are the steps to do something: ...@@ -457,7 +457,7 @@ These are the steps to do something:
Don't: Don't:
```md ```markdown
This is a list of available features: This is a list of available features:
1. Feature 1 1. Feature 1
...@@ -483,7 +483,7 @@ This is a list of available features: ...@@ -483,7 +483,7 @@ This is a list of available features:
all with a period. all with a period.
- Separate list items from explanatory text with a colon (`:`). For example: - Separate list items from explanatory text with a colon (`:`). For example:
```md ```markdown
The list is as follows: The list is as follows:
- First item: this explains the first item. - First item: this explains the first item.
...@@ -792,7 +792,7 @@ Instead: ...@@ -792,7 +792,7 @@ Instead:
Example: Example:
```md ```markdown
For more information, see the [confidential issue](../../user/project/issues/confidential_issues.md) `https://gitlab.com/gitlab-org/gitlab-foss/issues/<issue_number>`. For more information, see the [confidential issue](../../user/project/issues/confidential_issues.md) `https://gitlab.com/gitlab-org/gitlab-foss/issues/<issue_number>`.
``` ```
...@@ -908,7 +908,7 @@ Do not upload videos to the product repositories. [Link](#link-to-video) or [emb ...@@ -908,7 +908,7 @@ Do not upload videos to the product repositories. [Link](#link-to-video) or [emb
To link out to a video, include a YouTube icon so that readers can To link out to a video, include a YouTube icon so that readers can
quickly and easily scan the page for videos before reading: quickly and easily scan the page for videos before reading:
```md ```markdown
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i> <i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
For an overview, see [Video Title](link-to-video). For an overview, see [Video Title](link-to-video).
``` ```
...@@ -1082,7 +1082,7 @@ This will ensure that the source Markdown remains readable and should help with ...@@ -1082,7 +1082,7 @@ This will ensure that the source Markdown remains readable and should help with
The following are examples of source Markdown for menu items with their published output: The following are examples of source Markdown for menu items with their published output:
```md ```markdown
1. Go to **{home}** **Project overview > Details** 1. Go to **{home}** **Project overview > Details**
1. Go to **{doc-text}** **Repository > Branches** 1. Go to **{doc-text}** **Repository > Branches**
1. Go to **{issues}** **Issues > List** 1. Go to **{issues}** **Issues > List**
...@@ -1143,7 +1143,7 @@ of users. ...@@ -1143,7 +1143,7 @@ of users.
Weigh the costs of distracting users to whom the content is not relevant against Weigh the costs of distracting users to whom the content is not relevant against
the cost of users missing the content if it were not expressed as a note. the cost of users missing the content if it were not expressed as a note.
```md ```markdown
NOTE: **Note:** NOTE: **Note:**
This is something to note. This is something to note.
``` ```
...@@ -1155,7 +1155,7 @@ This is something to note. ...@@ -1155,7 +1155,7 @@ This is something to note.
### Tip ### Tip
```md ```markdown
TIP: **Tip:** TIP: **Tip:**
This is a tip. This is a tip.
``` ```
...@@ -1167,7 +1167,7 @@ This is a tip. ...@@ -1167,7 +1167,7 @@ This is a tip.
### Caution ### Caution
```md ```markdown
CAUTION: **Caution:** CAUTION: **Caution:**
This is something to be cautious about. This is something to be cautious about.
``` ```
...@@ -1179,7 +1179,7 @@ This is something to be cautious about. ...@@ -1179,7 +1179,7 @@ This is something to be cautious about.
### Danger ### Danger
```md ```markdown
DANGER: **Danger:** DANGER: **Danger:**
This is a breaking change, a bug, or something very important to note. This is a breaking change, a bug, or something very important to note.
``` ```
...@@ -1193,7 +1193,7 @@ This is a breaking change, a bug, or something very important to note. ...@@ -1193,7 +1193,7 @@ This is a breaking change, a bug, or something very important to note.
For highlighting a text within a blue blockquote, use this format: For highlighting a text within a blue blockquote, use this format:
```md ```markdown
> This is a blockquote. > This is a blockquote.
``` ```
...@@ -1205,7 +1205,7 @@ If the text spans across multiple lines it's OK to split the line. ...@@ -1205,7 +1205,7 @@ If the text spans across multiple lines it's OK to split the line.
For multiple paragraphs, use the symbol `>` before every line: For multiple paragraphs, use the symbol `>` before every line:
```md ```markdown
> This is the first paragraph. > This is the first paragraph.
> >
> This is the second paragraph. > This is the second paragraph.
...@@ -1298,14 +1298,14 @@ a helpful link back to how the feature was developed. ...@@ -1298,14 +1298,14 @@ a helpful link back to how the feature was developed.
- If listing information for multiple version as a feature evolves, add the information to a - If listing information for multiple version as a feature evolves, add the information to a
block-quoted bullet list. For example: block-quoted bullet list. For example:
```md ```markdown
> - [Introduced](<link-to-issue>) in GitLab 11.3. > - [Introduced](<link-to-issue>) in GitLab 11.3.
> - Enabled by default in GitLab 11.4. > - Enabled by default in GitLab 11.4.
``` ```
- If a feature is moved to another tier: - If a feature is moved to another tier:
```md ```markdown
> - [Introduced](<link-to-issue>) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.5. > - [Introduced](<link-to-issue>) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.5.
> - [Moved](<link-to-issue>) to [GitLab Starter](https://about.gitlab.com/pricing/) in 11.8. > - [Moved](<link-to-issue>) to [GitLab Starter](https://about.gitlab.com/pricing/) in 11.8.
> - [Moved](<link-to-issue>) to GitLab Core in 12.0. > - [Moved](<link-to-issue>) to GitLab Core in 12.0.
...@@ -1417,7 +1417,7 @@ avoid duplication, link to the special document that can be found in ...@@ -1417,7 +1417,7 @@ avoid duplication, link to the special document that can be found in
[`doc/administration/restart_gitlab.md`](../../administration/restart_gitlab.md). [`doc/administration/restart_gitlab.md`](../../administration/restart_gitlab.md).
Usually the text will read like: Usually the text will read like:
```md ```markdown
Save the file and [reconfigure GitLab](../../administration/restart_gitlab.md) Save the file and [reconfigure GitLab](../../administration/restart_gitlab.md)
for the changes to take effect. for the changes to take effect.
``` ```
...@@ -1453,7 +1453,7 @@ When there is a list of steps to perform, usually that entails editing the ...@@ -1453,7 +1453,7 @@ When there is a list of steps to perform, usually that entails editing the
configuration file and reconfiguring/restarting GitLab. In such case, follow configuration file and reconfiguring/restarting GitLab. In such case, follow
the style below as a guide: the style below as a guide:
````md ````markdown
**For Omnibus installations** **For Omnibus installations**
1. Edit `/etc/gitlab/gitlab.rb`: 1. Edit `/etc/gitlab/gitlab.rb`:
...@@ -1591,7 +1591,7 @@ You can use the following fake tokens as examples. ...@@ -1591,7 +1591,7 @@ You can use the following fake tokens as examples.
Use the following table headers to describe the methods. Attributes should Use the following table headers to describe the methods. Attributes should
always be in code blocks using backticks (`` ` ``). always be in code blocks using backticks (`` ` ``).
```md ```markdown
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|:----------|:-----|:---------|:------------| |:----------|:-----|:---------|:------------|
``` ```
......
...@@ -26,7 +26,7 @@ If you do not provide any arguments, it will globally query and instantiate all ...@@ -26,7 +26,7 @@ If you do not provide any arguments, it will globally query and instantiate all
<ul> <ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
droplab.init(); droplab.init();
``` ```
...@@ -47,7 +47,7 @@ You can add static list items. ...@@ -47,7 +47,7 @@ You can add static list items.
<ul> <ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
droplab.init(); droplab.init();
``` ```
...@@ -65,7 +65,7 @@ a non-global instance of DropLab using the `DropLab.prototype.init` method. ...@@ -65,7 +65,7 @@ a non-global instance of DropLab using the `DropLab.prototype.init` method.
<ul> <ul>
``` ```
```js ```javascript
const trigger = document.getElementById('trigger'); const trigger = document.getElementById('trigger');
const list = document.getElementById('list'); const list = document.getElementById('list');
...@@ -83,7 +83,7 @@ You can also add hooks to an existing DropLab instance using `DropLab.prototype. ...@@ -83,7 +83,7 @@ You can also add hooks to an existing DropLab instance using `DropLab.prototype.
<ul id="list" data-dropdown><!-- ... --><ul> <ul id="list" data-dropdown><!-- ... --><ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
droplab.init(); droplab.init();
...@@ -114,7 +114,7 @@ for all `data-dynamic` dropdown lists tracked by that DropLab instance. ...@@ -114,7 +114,7 @@ for all `data-dynamic` dropdown lists tracked by that DropLab instance.
</ul> </ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
droplab.init().addData([{ droplab.init().addData([{
...@@ -137,7 +137,7 @@ the data as the second argument and the `id` of the trigger element as the first ...@@ -137,7 +137,7 @@ the data as the second argument and the `id` of the trigger element as the first
</ul> </ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
droplab.init().addData('trigger', [{ droplab.init().addData('trigger', [{
...@@ -167,7 +167,7 @@ dropdown lists, one of which is dynamic. ...@@ -167,7 +167,7 @@ dropdown lists, one of which is dynamic.
</div> </div>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
droplab.init().addData('trigger', [{ droplab.init().addData('trigger', [{
...@@ -224,7 +224,7 @@ Some plugins require configuration values, the config object can be passed as th ...@@ -224,7 +224,7 @@ Some plugins require configuration values, the config object can be passed as th
<ul id="list" data-dropdown><!-- ... --><ul> <ul id="list" data-dropdown><!-- ... --><ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
const trigger = document.getElementById('trigger'); const trigger = document.getElementById('trigger');
...@@ -249,7 +249,7 @@ droplab.init(trigger, list, [droplabAjax], { ...@@ -249,7 +249,7 @@ droplab.init(trigger, list, [droplabAjax], {
When plugins are initialised for a droplab trigger+dropdown, DropLab will When plugins are initialised for a droplab trigger+dropdown, DropLab will
call the plugins `init` function, so this must be implemented in the plugin. call the plugins `init` function, so this must be implemented in the plugin.
```js ```javascript
class MyPlugin { class MyPlugin {
static init() { static init() {
this.someProp = 'someProp'; this.someProp = 'someProp';
......
...@@ -18,7 +18,7 @@ Add the `Ajax` object to the plugins array of a `DropLab.prototype.init` or `Dro ...@@ -18,7 +18,7 @@ Add the `Ajax` object to the plugins array of a `DropLab.prototype.init` or `Dro
<ul id="list" data-dropdown><!-- ... --><ul> <ul id="list" data-dropdown><!-- ... --><ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
const trigger = document.getElementById('trigger'); const trigger = document.getElementById('trigger');
......
...@@ -18,7 +18,7 @@ Add the `Filter` object to the plugins array of a `DropLab.prototype.init` or `D ...@@ -18,7 +18,7 @@ Add the `Filter` object to the plugins array of a `DropLab.prototype.init` or `D
<ul> <ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
const trigger = document.getElementById('trigger'); const trigger = document.getElementById('trigger');
......
...@@ -23,7 +23,7 @@ You can also set the `InputSetter` config to an array of objects, which will all ...@@ -23,7 +23,7 @@ You can also set the `InputSetter` config to an array of objects, which will all
<ul> <ul>
``` ```
```js ```javascript
const droplab = new DropLab(); const droplab = new DropLab();
const trigger = document.getElementById('trigger'); const trigger = document.getElementById('trigger');
......
...@@ -212,7 +212,7 @@ Read more about local state management with Apollo in the [Vue Apollo documentat ...@@ -212,7 +212,7 @@ Read more about local state management with Apollo in the [Vue Apollo documentat
When Apollo Client is used within Vuex and fetched data is stored in the Vuex store, there is no need in keeping Apollo Client cache enabled. Otherwise we would have data from the API stored in two places - Vuex store and Apollo Client cache. More to say, with Apollo default settings, a subsequent fetch from the GraphQL API could result in fetching data from Apollo cache (in the case where we have the same query and variables). To prevent this behavior, we need to disable Apollo Client cache passing a valid `fetchPolicy` option to its constructor: When Apollo Client is used within Vuex and fetched data is stored in the Vuex store, there is no need in keeping Apollo Client cache enabled. Otherwise we would have data from the API stored in two places - Vuex store and Apollo Client cache. More to say, with Apollo default settings, a subsequent fetch from the GraphQL API could result in fetching data from Apollo cache (in the case where we have the same query and variables). To prevent this behavior, we need to disable Apollo Client cache passing a valid `fetchPolicy` option to its constructor:
```js ```javascript
import fetchPolicies from '~/graphql_shared/fetch_policy_constants'; import fetchPolicies from '~/graphql_shared/fetch_policy_constants';
export const gqClient = createGqClient( export const gqClient = createGqClient(
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
</template> </template>
``` ```
```js ```javascript
// MyAwesomeComponent.spec.js // MyAwesomeComponent.spec.js
import SomeChildComponent from '~/some_child_component.vue' import SomeChildComponent from '~/some_child_component.vue'
......
...@@ -131,7 +131,7 @@ You can mark that content for translation with: ...@@ -131,7 +131,7 @@ You can mark that content for translation with:
In JavaScript we added the `__()` (double underscore parenthesis) function that In JavaScript we added the `__()` (double underscore parenthesis) function that
you can import from the `~/locale` file. For instance: you can import from the `~/locale` file. For instance:
```js ```javascript
import { __ } from '~/locale'; import { __ } from '~/locale';
const label = __('Subscribe'); const label = __('Subscribe');
``` ```
...@@ -167,7 +167,7 @@ For example use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make s ...@@ -167,7 +167,7 @@ For example use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make s
- In JavaScript (when Vue cannot be used): - In JavaScript (when Vue cannot be used):
```js ```javascript
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
sprintf(__('Hello %{username}'), { username: 'Joe' }); // => 'Hello Joe' sprintf(__('Hello %{username}'), { username: 'Joe' }); // => 'Hello Joe'
...@@ -180,7 +180,7 @@ For example use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make s ...@@ -180,7 +180,7 @@ For example use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make s
escape any interpolated dynamic values yourself, for instance using escape any interpolated dynamic values yourself, for instance using
`escape` from `lodash`. `escape` from `lodash`.
```js ```javascript
import { escape } from 'lodash'; import { escape } from 'lodash';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
...@@ -220,14 +220,14 @@ For example use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make s ...@@ -220,14 +220,14 @@ For example use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make s
- In JavaScript: - In JavaScript:
```js ```javascript
n__('Apple', 'Apples', 3) n__('Apple', 'Apples', 3)
// => 'Apples' // => 'Apples'
``` ```
Using interpolation: Using interpolation:
```js ```javascript
n__('Last day', 'Last %d days', x) n__('Last day', 'Last %d days', x)
// => When x == 1: 'Last day' // => When x == 1: 'Last day'
// => When x == 2: 'Last 2 days' // => When x == 2: 'Last 2 days'
...@@ -274,7 +274,7 @@ Namespaces should be PascalCase. ...@@ -274,7 +274,7 @@ Namespaces should be PascalCase.
- In JavaScript: - In JavaScript:
```js ```javascript
s__('OpenedNDaysAgo|Opened') s__('OpenedNDaysAgo|Opened')
``` ```
...@@ -285,7 +285,7 @@ guidelines for more details](translation.md#namespaced-strings). ...@@ -285,7 +285,7 @@ guidelines for more details](translation.md#namespaced-strings).
- In JavaScript: - In JavaScript:
```js ```javascript
import { createDateTimeFormat } from '~/locale'; import { createDateTimeFormat } from '~/locale';
const dateFormat = createDateTimeFormat({ year: 'numeric', month: 'long', day: 'numeric' }); const dateFormat = createDateTimeFormat({ year: 'numeric', month: 'long', day: 'numeric' });
...@@ -372,7 +372,7 @@ structure is the same in all languages. ...@@ -372,7 +372,7 @@ structure is the same in all languages.
For instance, the following: For instance, the following:
```js ```javascript
{{ s__("mrWidget|Set by") }} {{ s__("mrWidget|Set by") }}
{{ author.name }} {{ author.name }}
{{ s__("mrWidget|to be merged automatically when the pipeline succeeds") }} {{ s__("mrWidget|to be merged automatically when the pipeline succeeds") }}
...@@ -380,7 +380,7 @@ For instance, the following: ...@@ -380,7 +380,7 @@ For instance, the following:
should be externalized as follows: should be externalized as follows:
```js ```javascript
{{ sprintf(s__("mrWidget|Set by %{author} to be merged automatically when the pipeline succeeds"), { author: author.name }) }} {{ sprintf(s__("mrWidget|Set by %{author} to be merged automatically when the pipeline succeeds"), { author: author.name }) }}
``` ```
...@@ -439,7 +439,7 @@ This also applies when using links in between translated sentences, otherwise th ...@@ -439,7 +439,7 @@ This also applies when using links in between translated sentences, otherwise th
- In JavaScript (when Vue cannot be used), instead of: - In JavaScript (when Vue cannot be used), instead of:
```js ```javascript
{{ {{
sprintf(s__("ClusterIntegration|Learn more about %{link}"), { sprintf(s__("ClusterIntegration|Learn more about %{link}"), {
link: '<a href="https://cloud.google.com/compute/docs/regions-zones/regions-zones" target="_blank" rel="noopener noreferrer">zones</a>' link: '<a href="https://cloud.google.com/compute/docs/regions-zones/regions-zones" target="_blank" rel="noopener noreferrer">zones</a>'
...@@ -449,7 +449,7 @@ This also applies when using links in between translated sentences, otherwise th ...@@ -449,7 +449,7 @@ This also applies when using links in between translated sentences, otherwise th
Set the link starting and ending HTML fragments as placeholders like so: Set the link starting and ending HTML fragments as placeholders like so:
```js ```javascript
{{ {{
sprintf(s__("ClusterIntegration|Learn more about %{linkStart}zones%{linkEnd}"), { sprintf(s__("ClusterIntegration|Learn more about %{linkStart}zones%{linkEnd}"), {
linkStart: '<a href="https://cloud.google.com/compute/docs/regions-zones/regions-zones" target="_blank" rel="noopener noreferrer">', linkStart: '<a href="https://cloud.google.com/compute/docs/regions-zones/regions-zones" target="_blank" rel="noopener noreferrer">',
......
...@@ -51,7 +51,7 @@ or `db/post_migrate`, so if there are any migrations you don't want to ...@@ -51,7 +51,7 @@ or `db/post_migrate`, so if there are any migrations you don't want to
commit to the schema, rename or remove them. If your branch is not commit to the schema, rename or remove them. If your branch is not
targetting `master` you can set the `TARGET` environment variable. targetting `master` you can set the `TARGET` environment variable.
```sh ```shell
# Regenerate schema against `master` # Regenerate schema against `master`
scripts/regenerate-schema scripts/regenerate-schema
......
...@@ -13,7 +13,7 @@ within the GitLab project. ...@@ -13,7 +13,7 @@ within the GitLab project.
## Usage ## Usage
```js ```javascript
import dirtySubmitFactory from './dirty_submit/dirty_submit_form'; import dirtySubmitFactory from './dirty_submit/dirty_submit_form';
new DirtySubmitForm(document.querySelector('form')); new DirtySubmitForm(document.querySelector('form'));
......
...@@ -98,7 +98,7 @@ If it's not possible to follow the above method, the images can be transferred m ...@@ -98,7 +98,7 @@ If it's not possible to follow the above method, the images can be transferred m
#### Example image packager script #### Example image packager script
```sh ```shell
#!/bin/bash #!/bin/bash
set -ux set -ux
...@@ -120,7 +120,7 @@ done ...@@ -120,7 +120,7 @@ done
This example loads the images from a bastion host to an offline host. In certain configurations, This example loads the images from a bastion host to an offline host. In certain configurations,
physical media may be needed for such a transfer: physical media may be needed for such a transfer:
```sh ```shell
#!/bin/bash #!/bin/bash
set -ux set -ux
......
...@@ -39,7 +39,7 @@ being modified after the database dump is created. ...@@ -39,7 +39,7 @@ being modified after the database dump is created.
1. Get the Kubernetes namespace for the environment. It typically looks like `<project-name>-<project-id>-<environment>`. 1. Get the Kubernetes namespace for the environment. It typically looks like `<project-name>-<project-id>-<environment>`.
In our example, the namespace is called `minimal-ruby-app-4349298-production`. In our example, the namespace is called `minimal-ruby-app-4349298-production`.
```sh ```shell
$ kubectl get ns $ kubectl get ns
NAME STATUS AGE NAME STATUS AGE
...@@ -48,13 +48,13 @@ being modified after the database dump is created. ...@@ -48,13 +48,13 @@ being modified after the database dump is created.
1. For ease of use, export the namespace name: 1. For ease of use, export the namespace name:
```sh ```shell
export APP_NAMESPACE=minimal-ruby-app-4349298-production export APP_NAMESPACE=minimal-ruby-app-4349298-production
``` ```
1. Get the deployment name for your application with the following command. In our example, the deployment name is `production`. 1. Get the deployment name for your application with the following command. In our example, the deployment name is `production`.
```sh ```shell
$ kubectl get deployment --namespace "$APP_NAMESPACE" $ kubectl get deployment --namespace "$APP_NAMESPACE"
NAME READY UP-TO-DATE AVAILABLE AGE NAME READY UP-TO-DATE AVAILABLE AGE
production 2/2 2 2 7d21h production 2/2 2 2 7d21h
...@@ -64,7 +64,7 @@ being modified after the database dump is created. ...@@ -64,7 +64,7 @@ being modified after the database dump is created.
1. To prevent the database from being modified, set replicas to 0 for the deployment with the following command. 1. To prevent the database from being modified, set replicas to 0 for the deployment with the following command.
We use the deployment name from the previous step (`deployments/<DEPLOYMENT_NAME>`). We use the deployment name from the previous step (`deployments/<DEPLOYMENT_NAME>`).
```sh ```shell
$ kubectl scale --replicas=0 deployments/production --namespace "$APP_NAMESPACE" $ kubectl scale --replicas=0 deployments/production --namespace "$APP_NAMESPACE"
deployment.extensions/production scaled deployment.extensions/production scaled
``` ```
...@@ -75,7 +75,7 @@ being modified after the database dump is created. ...@@ -75,7 +75,7 @@ being modified after the database dump is created.
1. Get the service name for PostgreSQL. The name of the service should end with `-postgres`. In our example the service name is `production-postgres`. 1. Get the service name for PostgreSQL. The name of the service should end with `-postgres`. In our example the service name is `production-postgres`.
```sh ```shell
$ kubectl get svc --namespace "$APP_NAMESPACE" $ kubectl get svc --namespace "$APP_NAMESPACE"
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
production-auto-deploy ClusterIP 10.30.13.90 <none> 5000/TCP 7d14h production-auto-deploy ClusterIP 10.30.13.90 <none> 5000/TCP 7d14h
...@@ -84,7 +84,7 @@ being modified after the database dump is created. ...@@ -84,7 +84,7 @@ being modified after the database dump is created.
1. Get the pod name for PostgreSQL with the following command. In our example, the pod name is `production-postgres-5db86568d7-qxlxv`. 1. Get the pod name for PostgreSQL with the following command. In our example, the pod name is `production-postgres-5db86568d7-qxlxv`.
```sh ```shell
$ kubectl get pod --namespace "$APP_NAMESPACE" -l app=production-postgres $ kubectl get pod --namespace "$APP_NAMESPACE" -l app=production-postgres
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
production-postgres-5db86568d7-qxlxv 1/1 Running 0 7d14h production-postgres-5db86568d7-qxlxv 1/1 Running 0 7d14h
...@@ -92,7 +92,7 @@ being modified after the database dump is created. ...@@ -92,7 +92,7 @@ being modified after the database dump is created.
1. Connect to the pod with: 1. Connect to the pod with:
```sh ```shell
kubectl exec -it production-postgres-5db86568d7-qxlxv --namespace "$APP_NAMESPACE" bash kubectl exec -it production-postgres-5db86568d7-qxlxv --namespace "$APP_NAMESPACE" bash
``` ```
...@@ -104,7 +104,7 @@ being modified after the database dump is created. ...@@ -104,7 +104,7 @@ being modified after the database dump is created.
- You will be asked for the database password, the default is `testing-password`. - You will be asked for the database password, the default is `testing-password`.
```sh ```shell
## Format is: ## Format is:
# pg_dump -h SERVICE_NAME -U USERNAME DATABASE_NAME > /tmp/backup.sql # pg_dump -h SERVICE_NAME -U USERNAME DATABASE_NAME > /tmp/backup.sql
...@@ -115,7 +115,7 @@ being modified after the database dump is created. ...@@ -115,7 +115,7 @@ being modified after the database dump is created.
1. Download the dump file with the following command: 1. Download the dump file with the following command:
```sh ```shell
kubectl cp --namespace "$APP_NAMESPACE" production-postgres-5db86568d7-qxlxv:/tmp/backup.sql backup.sql kubectl cp --namespace "$APP_NAMESPACE" production-postgres-5db86568d7-qxlxv:/tmp/backup.sql backup.sql
``` ```
...@@ -131,7 +131,7 @@ deleted causing the persistent volumes to be deleted as well. ...@@ -131,7 +131,7 @@ deleted causing the persistent volumes to be deleted as well.
You can verify this by using the following command: You can verify this by using the following command:
```sh ```shell
$ kubectl get pv $ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-0da80c08-5239-11ea-9c8d-42010a8e0096 8Gi RWO Delete Bound minimal-ruby-app-4349298-staging/staging-postgres standard 7d22h pvc-0da80c08-5239-11ea-9c8d-42010a8e0096 8Gi RWO Delete Bound minimal-ruby-app-4349298-staging/staging-postgres standard 7d22h
...@@ -145,7 +145,7 @@ interested in keeping the volumes for the staging and production of the ...@@ -145,7 +145,7 @@ interested in keeping the volumes for the staging and production of the
`minimal-ruby-app-4349298` application, the volume names here are `minimal-ruby-app-4349298` application, the volume names here are
`pvc-0da80c08-5239-11ea-9c8d-42010a8e0096` and `pvc-9085e3d3-5239-11ea-9c8d-42010a8e0096`: `pvc-0da80c08-5239-11ea-9c8d-42010a8e0096` and `pvc-9085e3d3-5239-11ea-9c8d-42010a8e0096`:
```sh ```shell
$ kubectl patch pv pvc-0da80c08-5239-11ea-9c8d-42010a8e0096 -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}' $ kubectl patch pv pvc-0da80c08-5239-11ea-9c8d-42010a8e0096 -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
persistentvolume/pvc-0da80c08-5239-11ea-9c8d-42010a8e0096 patched persistentvolume/pvc-0da80c08-5239-11ea-9c8d-42010a8e0096 patched
$ kubectl patch pv pvc-9085e3d3-5239-11ea-9c8d-42010a8e0096 -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}' $ kubectl patch pv pvc-9085e3d3-5239-11ea-9c8d-42010a8e0096 -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
...@@ -192,7 +192,7 @@ TIP: **Tip:** You can also ...@@ -192,7 +192,7 @@ TIP: **Tip:** You can also
1. Get the pod name for the new PostgreSQL, in our example, the pod name is 1. Get the pod name for the new PostgreSQL, in our example, the pod name is
`production-postgresql-0`: `production-postgresql-0`:
```sh ```shell
$ kubectl get pod --namespace "$APP_NAMESPACE" -l app=postgresql $ kubectl get pod --namespace "$APP_NAMESPACE" -l app=postgresql
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
production-postgresql-0 1/1 Running 0 19m production-postgresql-0 1/1 Running 0 19m
...@@ -200,13 +200,13 @@ TIP: **Tip:** You can also ...@@ -200,13 +200,13 @@ TIP: **Tip:** You can also
1. Copy the dump file from the backup steps to the pod: 1. Copy the dump file from the backup steps to the pod:
```sh ```shell
kubectl cp --namespace "$APP_NAMESPACE" backup.sql production-postgresql-0:/tmp/backup.sql kubectl cp --namespace "$APP_NAMESPACE" backup.sql production-postgresql-0:/tmp/backup.sql
``` ```
1. Connect to the pod: 1. Connect to the pod:
```sh ```shell
kubectl exec -it production-postgresql-0 --namespace "$APP_NAMESPACE" bash kubectl exec -it production-postgresql-0 --namespace "$APP_NAMESPACE" bash
``` ```
...@@ -216,7 +216,7 @@ TIP: **Tip:** You can also ...@@ -216,7 +216,7 @@ TIP: **Tip:** You can also
- `USERNAME` is the username you have configured for PostgreSQL. The default is `user`. - `USERNAME` is the username you have configured for PostgreSQL. The default is `user`.
- `DATABASE_NAME` is usually the environment name. - `DATABASE_NAME` is usually the environment name.
```sh ```shell
## Format is: ## Format is:
# psql -U USERNAME -d DATABASE_NAME < /tmp/backup.sql # psql -U USERNAME -d DATABASE_NAME < /tmp/backup.sql
......
...@@ -228,7 +228,7 @@ To make PlantUML available in GitLab, a GitLab administrator needs to enable it ...@@ -228,7 +228,7 @@ To make PlantUML available in GitLab, a GitLab administrator needs to enable it
> If this is not rendered correctly, [view it in GitLab itself](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#emoji). > If this is not rendered correctly, [view it in GitLab itself](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#emoji).
```md ```markdown
Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you: Sometimes you want to :monkey: around a bit and add some :star2: to your :speech_balloon:. Well we have a gift for you:
:zap: You can use emoji anywhere GFM is supported. :v: :zap: You can use emoji anywhere GFM is supported. :v:
...@@ -804,7 +804,7 @@ but_emphasis is_desired _here_ ...@@ -804,7 +804,7 @@ but_emphasis is_desired _here_
If you wish to emphasize only a part of a word, it can still be done with asterisks: If you wish to emphasize only a part of a word, it can still be done with asterisks:
```md ```markdown
perform*complicated*task perform*complicated*task
do*this*and*do*that*and*another thing do*this*and*do*that*and*another thing
...@@ -976,7 +976,7 @@ Do not change to a reference style link. ...@@ -976,7 +976,7 @@ Do not change to a reference style link.
Image tags that link to files with a video extension are automatically converted to Image tags that link to files with a video extension are automatically converted to
a video player. The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, and `.ogv`: a video player. The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, and `.ogv`:
```md ```markdown
Here's a sample video: Here's a sample video:
![Sample Video](img/markdown_video.mp4) ![Sample Video](img/markdown_video.mp4)
...@@ -993,7 +993,7 @@ Here's a sample video: ...@@ -993,7 +993,7 @@ Here's a sample video:
Similar to videos, link tags for files with an audio extension are automatically converted to Similar to videos, link tags for files with an audio extension are automatically converted to
an audio player. The valid audio extensions are `.mp3`, `.oga`, `.ogg`, `.spx`, and `.wav`: an audio player. The valid audio extensions are `.mp3`, `.oga`, `.ogg`, `.spx`, and `.wav`:
```md ```markdown
Here's a sample audio clip: Here's a sample audio clip:
![Sample Audio](img/markdown_audio.mp3) ![Sample Audio](img/markdown_audio.mp3)
...@@ -1275,7 +1275,7 @@ number, and count up from there. ...@@ -1275,7 +1275,7 @@ number, and count up from there.
Examples: Examples:
```md ```markdown
1. First ordered list item 1. First ordered list item
2. Another item 2. Another item
- Unordered sub-list. - Unordered sub-list.
...@@ -1302,7 +1302,7 @@ See https://docs.gitlab.com/ee/development/documentation/styleguide.html#lists ...@@ -1302,7 +1302,7 @@ See https://docs.gitlab.com/ee/development/documentation/styleguide.html#lists
For an unordered list, add a `-`, `*` or `+`, followed by a space, at the start of For an unordered list, add a `-`, `*` or `+`, followed by a space, at the start of
each line for unordered lists, but you should not use a mix of them. each line for unordered lists, but you should not use a mix of them.
```md ```markdown
Unordered lists can: Unordered lists can:
- use - use
......
...@@ -137,7 +137,7 @@ The minimum scope needed for both of them is `read_registry`. ...@@ -137,7 +137,7 @@ The minimum scope needed for both of them is `read_registry`.
Example of using a token: Example of using a token:
```sh ```shell
docker login registry.example.com -u <username> -p <token> docker login registry.example.com -u <username> -p <token>
``` ```
...@@ -206,7 +206,7 @@ Available for all projects, though more suitable for public ones: ...@@ -206,7 +206,7 @@ Available for all projects, though more suitable for public ones:
your Docker images and has read/write access to the Registry. This is ephemeral, your Docker images and has read/write access to the Registry. This is ephemeral,
so it's only valid for one job. You can use the following example as-is: so it's only valid for one job. You can use the following example as-is:
```sh ```shell
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
``` ```
...@@ -221,7 +221,7 @@ For private and internal projects: ...@@ -221,7 +221,7 @@ For private and internal projects:
Replace the `<username>` and `<access_token>` in the following example: Replace the `<username>` and `<access_token>` in the following example:
```sh ```shell
docker login -u <username> -p <access_token> $CI_REGISTRY docker login -u <username> -p <access_token> $CI_REGISTRY
``` ```
...@@ -231,7 +231,7 @@ For private and internal projects: ...@@ -231,7 +231,7 @@ For private and internal projects:
Once created, you can use the special environment variables, and GitLab CI/CD Once created, you can use the special environment variables, and GitLab CI/CD
will fill them in for you. You can use the following example as-is: will fill them in for you. You can use the following example as-is:
```sh ```shell
docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
``` ```
......
...@@ -183,7 +183,7 @@ but it will not close automatically. ...@@ -183,7 +183,7 @@ but it will not close automatically.
If the issue is in a different repository than the MR, add the full URL for the issue(s): If the issue is in a different repository than the MR, add the full URL for the issue(s):
```md ```markdown
Closes #4, #6, and https://gitlab.com/<username>/<projectname>/issues/<xxx> Closes #4, #6, and https://gitlab.com/<username>/<projectname>/issues/<xxx>
``` ```
......
...@@ -47,7 +47,7 @@ and some of them generate keys for free. ...@@ -47,7 +47,7 @@ and some of them generate keys for free.
To take advantage of X.509 signing, you will need Git 2.19.0 or later. You can To take advantage of X.509 signing, you will need Git 2.19.0 or later. You can
check your Git version with: check your Git version with:
```sh ```shell
git --version git --version
``` ```
...@@ -57,7 +57,7 @@ If you have the correct version, you can proceed to configure Git. ...@@ -57,7 +57,7 @@ If you have the correct version, you can proceed to configure Git.
Configure Git to use your key for signing: Configure Git to use your key for signing:
```sh ```shell
signingkey = $( gpgsm --list-secret-keys | egrep '(key usage|ID)' | grep -B 1 digitalSignature | awk '/ID/ {print $2}' ) signingkey = $( gpgsm --list-secret-keys | egrep '(key usage|ID)' | grep -B 1 digitalSignature | awk '/ID/ {print $2}' )
git config --global user.signingkey $signingkey git config --global user.signingkey $signingkey
git config --global gpg.format x509 git config --global gpg.format x509
...@@ -71,7 +71,7 @@ installer or via `brew install smimesign` on MacOS. ...@@ -71,7 +71,7 @@ installer or via `brew install smimesign` on MacOS.
Get the ID of your certificate with `smimesign --list-keys` and set your Get the ID of your certificate with `smimesign --list-keys` and set your
signingkey `git config --global user.signingkey ID`, then configure X.509: signingkey `git config --global user.signingkey ID`, then configure X.509:
```sh ```shell
git config --global gpg.x509.program smimesign git config --global gpg.x509.program smimesign
git config --global gpg.format x509 git config --global gpg.format x509
``` ```
...@@ -83,7 +83,7 @@ can start signing your commits: ...@@ -83,7 +83,7 @@ can start signing your commits:
1. Commit like you used to, the only difference is the addition of the `-S` flag: 1. Commit like you used to, the only difference is the addition of the `-S` flag:
```sh ```shell
git commit -S -m "feat: x509 signed commits" git commit -S -m "feat: x509 signed commits"
``` ```
...@@ -92,7 +92,7 @@ can start signing your commits: ...@@ -92,7 +92,7 @@ can start signing your commits:
If you don't want to type the `-S` flag every time you commit, you can tell Git If you don't want to type the `-S` flag every time you commit, you can tell Git
to sign your commits automatically: to sign your commits automatically:
```sh ```shell
git config --global commit.gpgsign true git config --global commit.gpgsign true
``` ```
...@@ -100,7 +100,7 @@ git config --global commit.gpgsign true ...@@ -100,7 +100,7 @@ git config --global commit.gpgsign true
To verify that a commit is signed, you can use the `--show-signature` flag: To verify that a commit is signed, you can use the `--show-signature` flag:
```sh ```shell
git log --show-signature git log --show-signature
``` ```
...@@ -111,7 +111,7 @@ can start signing your tags: ...@@ -111,7 +111,7 @@ can start signing your tags:
1. Tag like you used to, the only difference is the addition of the `-s` flag: 1. Tag like you used to, the only difference is the addition of the `-s` flag:
```sh ```shell
git tag -s v1.1.1 -m "My signed tag" git tag -s v1.1.1 -m "My signed tag"
``` ```
...@@ -120,7 +120,7 @@ can start signing your tags: ...@@ -120,7 +120,7 @@ can start signing your tags:
If you don't want to type the `-s` flag every time you tag, you can tell Git If you don't want to type the `-s` flag every time you tag, you can tell Git
to sign your tags automatically: to sign your tags automatically:
```sh ```shell
git config --global tag.gpgsign true git config --global tag.gpgsign true
``` ```
...@@ -128,6 +128,6 @@ git config --global tag.gpgsign true ...@@ -128,6 +128,6 @@ git config --global tag.gpgsign true
To verify that a tag is signed, you can use the `--verify` flag: To verify that a tag is signed, you can use the `--verify` flag:
```sh ```shell
git tag --verify v1.1.1 git tag --verify v1.1.1
``` ```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment