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:
1. Refresh Foreign Data Wrapper tables
```sh
```shell
gitlab-rake geo:db:refresh_foreign_tables
```
......
......@@ -716,7 +716,7 @@ built-in command:
If you did not change the default location of the configuration file, run:
```sh
```shell
sudo gitlab-ctl registry-garbage-collect
```
......@@ -725,7 +725,7 @@ layers you have stored.
If you changed the location of the Container Registry `config.yml`:
```sh
```shell
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
`-m` switch to allow you to remove all unreferenced manifests and layers that are
not directly accessible via `tag`:
```sh
```shell
sudo gitlab-ctl registry-garbage-collect -m
```
......@@ -787,7 +787,7 @@ To enable the read-only mode:
1. Save and reconfigure GitLab:
```sh
```shell
sudo gitlab-ctl reconfigure
```
......@@ -795,7 +795,7 @@ To enable the read-only mode:
1. Next, trigger one of the garbage collect commands:
```sh
```shell
# Recycling unused tags
sudo /opt/gitlab/embedded/bin/registry garbage-collect /var/opt/gitlab/registry/config.yml
......@@ -822,7 +822,7 @@ To enable the read-only mode:
1. Save and reconfigure GitLab:
```sh
```shell
sudo gitlab-ctl reconfigure
```
......
......@@ -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
described in the [configuring](#configuring) section.
```js
```javascript
const ORIGIN_HOSTNAME = 'gitlab.installation.com' // FIXME: SET CORRECT VALUE
const STORAGE_TOKEN = 'very-secure-token' // FIXME: SET CORRECT VALUE
const CACHE_PRIVATE_OBJECTS = false
......
......@@ -16,19 +16,19 @@ include use cases targeted for parsing GitLab log files.
#### Pipe colorized `jq` output into `less`
```sh
```shell
jq . <FILE> -C | less -R
```
#### Search for a term and pretty-print all matching lines
```sh
```shell
grep <TERM> <FILE> | jq .
```
#### Skip invalid lines of JSON
```sh
```shell
jq -cR 'fromjson?' file.json | jq <COMMAND>
```
......@@ -39,49 +39,49 @@ This skips over all invalid lines and parses the rest.
#### Find all requests with a 5XX status code
```sh
```shell
jq 'select(status >= 500)' <FILE>
```
#### Top 10 slowest requests
```sh
```shell
jq -s 'sort_by(-.duration) | limit(10; .[])' <FILE>
```
#### Find and pretty print all requests related to a project
```sh
```shell
grep <PROJECT_NAME> <FILE> | jq .
```
#### Find all requests with a total duration > 5 seconds
```sh
```shell
jq 'select(.duration > 5000)' <FILE>
```
#### Find all project requests with more than 5 rugged calls
```sh
```shell
grep <PROJECT_NAME> <FILE> | jq 'select(.rugged_calls > 5)'
```
#### Find all requests with a Gitaly duration > 10 seconds
```sh
```shell
jq 'select(.gitaly_duration > 10000)' <FILE>
```
#### Find all requests with a queue duration > 10 seconds
```sh
```shell
jq 'select(.queue_duration > 10000)' <FILE>
```
#### Top 10 requests by # of Gitaly calls
```sh
```shell
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;
#### 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
```
......@@ -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
```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
```
......@@ -121,25 +121,25 @@ CT: 190 ROUTE: /api/:version/projects/:id/repository/commits DURS: 1079.02,
#### Find all Gitaly requests sent from web UI
```sh
```shell
jq 'select(."grpc.meta.client_name" == "gitlab-web")' current
```
#### Find all failed Gitaly requests
```sh
```shell
jq 'select(."grpc.code" != null and ."grpc.code" != "OK")' current
```
#### Find all requests that took longer than 30 seconds
```sh
```shell
jq 'select(."grpc.time_ms" > 30000)' current
```
#### 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
```
......
......@@ -297,7 +297,7 @@ POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/play
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
```
......
......@@ -17,7 +17,7 @@ GET /projects/:id/remote_mirrors
Example request:
```sh
```shell
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
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'
```
......@@ -104,7 +104,7 @@ PUT /projects/:id/remote_mirrors/:mirror_id
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'
```
......
......@@ -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
not ready for production use:
````md
````markdown
# Feature Name
> - [Introduced](link-to-issue) in GitLab 12.0.
......@@ -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:
````md
````markdown
# Feature Name
> - [Introduced](link-to-issue) in GitLab 12.0.
......@@ -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:
````md
````markdown
# Feature Name
> - [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
documentation. Remove the feature flag mention keeping only a note that
mentions the flag in the version history notes:
````md
````markdown
# Feature Name
> - [Introduced](link-to-issue) in GitLab 12.0.
......
......@@ -79,7 +79,7 @@ change prior to merging.
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:
```md
```markdown
---
redirect_to: '../path/to/file/index.md'
---
......@@ -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. Replace the contents of `doc/workflow/lfs/index.md` with:
```md
```markdown
---
redirect_to: '../../administration/lfs.md'
---
......
......@@ -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,
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
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.-->
......
......@@ -390,7 +390,7 @@ tenses, words, and phrases:
- 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:
```md
```markdown
## Header
Paragraph.
......@@ -447,7 +447,7 @@ Only use ordered lists when their items describe a sequence of steps to follow.
Do:
```md
```markdown
These are the steps to do something:
1. First, do the first step.
......@@ -457,7 +457,7 @@ These are the steps to do something:
Don't:
```md
```markdown
This is a list of available features:
1. Feature 1
......@@ -483,7 +483,7 @@ This is a list of available features:
all with a period.
- Separate list items from explanatory text with a colon (`:`). For example:
```md
```markdown
The list is as follows:
- First item: this explains the first item.
......@@ -792,7 +792,7 @@ Instead:
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>`.
```
......@@ -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
quickly and easily scan the page for videos before reading:
```md
```markdown
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
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
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 **{doc-text}** **Repository > Branches**
1. Go to **{issues}** **Issues > List**
......@@ -1143,7 +1143,7 @@ of users.
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.
```md
```markdown
NOTE: **Note:**
This is something to note.
```
......@@ -1155,7 +1155,7 @@ This is something to note.
### Tip
```md
```markdown
TIP: **Tip:**
This is a tip.
```
......@@ -1167,7 +1167,7 @@ This is a tip.
### Caution
```md
```markdown
CAUTION: **Caution:**
This is something to be cautious about.
```
......@@ -1179,7 +1179,7 @@ This is something to be cautious about.
### Danger
```md
```markdown
DANGER: **Danger:**
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:
```md
```markdown
> This is a blockquote.
```
......@@ -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:
```md
```markdown
> This is the first paragraph.
>
> This is the second paragraph.
......@@ -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
block-quoted bullet list. For example:
```md
```markdown
> - [Introduced](<link-to-issue>) in GitLab 11.3.
> - Enabled by default in GitLab 11.4.
```
- If a feature is moved to another tier:
```md
```markdown
> - [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 Core in 12.0.
......@@ -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).
Usually the text will read like:
```md
```markdown
Save the file and [reconfigure GitLab](../../administration/restart_gitlab.md)
for the changes to take effect.
```
......@@ -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
the style below as a guide:
````md
````markdown
**For Omnibus installations**
1. Edit `/etc/gitlab/gitlab.rb`:
......@@ -1591,7 +1591,7 @@ You can use the following fake tokens as examples.
Use the following table headers to describe the methods. Attributes should
always be in code blocks using backticks (`` ` ``).
```md
```markdown
| Attribute | Type | Required | Description |
|:----------|:-----|:---------|:------------|
```
......
......@@ -26,7 +26,7 @@ If you do not provide any arguments, it will globally query and instantiate all
<ul>
```
```js
```javascript
const droplab = new DropLab();
droplab.init();
```
......@@ -47,7 +47,7 @@ You can add static list items.
<ul>
```
```js
```javascript
const droplab = new DropLab();
droplab.init();
```
......@@ -65,7 +65,7 @@ a non-global instance of DropLab using the `DropLab.prototype.init` method.
<ul>
```
```js
```javascript
const trigger = document.getElementById('trigger');
const list = document.getElementById('list');
......@@ -83,7 +83,7 @@ You can also add hooks to an existing DropLab instance using `DropLab.prototype.
<ul id="list" data-dropdown><!-- ... --><ul>
```
```js
```javascript
const droplab = new DropLab();
droplab.init();
......@@ -114,7 +114,7 @@ for all `data-dynamic` dropdown lists tracked by that DropLab instance.
</ul>
```
```js
```javascript
const droplab = new DropLab();
droplab.init().addData([{
......@@ -137,7 +137,7 @@ the data as the second argument and the `id` of the trigger element as the first
</ul>
```
```js
```javascript
const droplab = new DropLab();
droplab.init().addData('trigger', [{
......@@ -167,7 +167,7 @@ dropdown lists, one of which is dynamic.
</div>
```
```js
```javascript
const droplab = new DropLab();
droplab.init().addData('trigger', [{
......@@ -224,7 +224,7 @@ Some plugins require configuration values, the config object can be passed as th
<ul id="list" data-dropdown><!-- ... --><ul>
```
```js
```javascript
const droplab = new DropLab();
const trigger = document.getElementById('trigger');
......@@ -249,7 +249,7 @@ droplab.init(trigger, list, [droplabAjax], {
When plugins are initialised for a droplab trigger+dropdown, DropLab will
call the plugins `init` function, so this must be implemented in the plugin.
```js
```javascript
class MyPlugin {
static init() {
this.someProp = 'someProp';
......
......@@ -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>
```
```js
```javascript
const droplab = new DropLab();
const trigger = document.getElementById('trigger');
......
......@@ -18,7 +18,7 @@ Add the `Filter` object to the plugins array of a `DropLab.prototype.init` or `D
<ul>
```
```js
```javascript
const droplab = new DropLab();
const trigger = document.getElementById('trigger');
......
......@@ -23,7 +23,7 @@ You can also set the `InputSetter` config to an array of objects, which will all
<ul>
```
```js
```javascript
const droplab = new DropLab();
const trigger = document.getElementById('trigger');
......
......@@ -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:
```js
```javascript
import fetchPolicies from '~/graphql_shared/fetch_policy_constants';
export const gqClient = createGqClient(
......
......@@ -111,7 +111,7 @@ export default {
</template>
```
```js
```javascript
// MyAwesomeComponent.spec.js
import SomeChildComponent from '~/some_child_component.vue'
......
......@@ -131,7 +131,7 @@ You can mark that content for translation with:
In JavaScript we added the `__()` (double underscore parenthesis) function that
you can import from the `~/locale` file. For instance:
```js
```javascript
import { __ } from '~/locale';
const label = __('Subscribe');
```
......@@ -167,7 +167,7 @@ For example use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make s
- In JavaScript (when Vue cannot be used):
```js
```javascript
import { __, sprintf } from '~/locale';
sprintf(__('Hello %{username}'), { username: 'Joe' }); // => 'Hello Joe'
......@@ -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` from `lodash`.
```js
```javascript
import { escape } from 'lodash';
import { __, sprintf } from '~/locale';
......@@ -220,14 +220,14 @@ For example use `%{created_at}` in Ruby but `%{createdAt}` in JavaScript. Make s
- In JavaScript:
```js
```javascript
n__('Apple', 'Apples', 3)
// => 'Apples'
```
Using interpolation:
```js
```javascript
n__('Last day', 'Last %d days', x)
// => When x == 1: 'Last day'
// => When x == 2: 'Last 2 days'
......@@ -274,7 +274,7 @@ Namespaces should be PascalCase.
- In JavaScript:
```js
```javascript
s__('OpenedNDaysAgo|Opened')
```
......@@ -285,7 +285,7 @@ guidelines for more details](translation.md#namespaced-strings).
- In JavaScript:
```js
```javascript
import { createDateTimeFormat } from '~/locale';
const dateFormat = createDateTimeFormat({ year: 'numeric', month: 'long', day: 'numeric' });
......@@ -372,7 +372,7 @@ structure is the same in all languages.
For instance, the following:
```js
```javascript
{{ s__("mrWidget|Set by") }}
{{ author.name }}
{{ s__("mrWidget|to be merged automatically when the pipeline succeeds") }}
......@@ -380,7 +380,7 @@ For instance, the following:
should be externalized as follows:
```js
```javascript
{{ 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
- In JavaScript (when Vue cannot be used), instead of:
```js
```javascript
{{
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>'
......@@ -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:
```js
```javascript
{{
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">',
......
......@@ -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
targetting `master` you can set the `TARGET` environment variable.
```sh
```shell
# Regenerate schema against `master`
scripts/regenerate-schema
......
......@@ -13,7 +13,7 @@ within the GitLab project.
## Usage
```js
```javascript
import dirtySubmitFactory from './dirty_submit/dirty_submit_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
#### Example image packager script
```sh
```shell
#!/bin/bash
set -ux
......@@ -120,7 +120,7 @@ done
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:
```sh
```shell
#!/bin/bash
set -ux
......
......@@ -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>`.
In our example, the namespace is called `minimal-ruby-app-4349298-production`.
```sh
```shell
$ kubectl get ns
NAME STATUS AGE
......@@ -48,13 +48,13 @@ being modified after the database dump is created.
1. For ease of use, export the namespace name:
```sh
```shell
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`.
```sh
```shell
$ kubectl get deployment --namespace "$APP_NAMESPACE"
NAME READY UP-TO-DATE AVAILABLE AGE
production 2/2 2 2 7d21h
......@@ -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.
We use the deployment name from the previous step (`deployments/<DEPLOYMENT_NAME>`).
```sh
```shell
$ kubectl scale --replicas=0 deployments/production --namespace "$APP_NAMESPACE"
deployment.extensions/production scaled
```
......@@ -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`.
```sh
```shell
$ kubectl get svc --namespace "$APP_NAMESPACE"
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
production-auto-deploy ClusterIP 10.30.13.90 <none> 5000/TCP 7d14h
......@@ -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`.
```sh
```shell
$ kubectl get pod --namespace "$APP_NAMESPACE" -l app=production-postgres
NAME READY STATUS RESTARTS AGE
production-postgres-5db86568d7-qxlxv 1/1 Running 0 7d14h
......@@ -92,7 +92,7 @@ being modified after the database dump is created.
1. Connect to the pod with:
```sh
```shell
kubectl exec -it production-postgres-5db86568d7-qxlxv --namespace "$APP_NAMESPACE" bash
```
......@@ -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`.
```sh
```shell
## Format is:
# pg_dump -h SERVICE_NAME -U USERNAME DATABASE_NAME > /tmp/backup.sql
......@@ -115,7 +115,7 @@ being modified after the database dump is created.
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
```
......@@ -131,7 +131,7 @@ deleted causing the persistent volumes to be deleted as well.
You can verify this by using the following command:
```sh
```shell
$ kubectl get pv
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
......@@ -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
`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"}}'
persistentvolume/pvc-0da80c08-5239-11ea-9c8d-42010a8e0096 patched
$ kubectl patch pv pvc-9085e3d3-5239-11ea-9c8d-42010a8e0096 -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
......@@ -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
`production-postgresql-0`:
```sh
```shell
$ kubectl get pod --namespace "$APP_NAMESPACE" -l app=postgresql
NAME READY STATUS RESTARTS AGE
production-postgresql-0 1/1 Running 0 19m
......@@ -200,13 +200,13 @@ TIP: **Tip:** You can also
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
```
1. Connect to the pod:
```sh
```shell
kubectl exec -it production-postgresql-0 --namespace "$APP_NAMESPACE" bash
```
......@@ -216,7 +216,7 @@ TIP: **Tip:** You can also
- `USERNAME` is the username you have configured for PostgreSQL. The default is `user`.
- `DATABASE_NAME` is usually the environment name.
```sh
```shell
## Format is:
# 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
> 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:
:zap: You can use emoji anywhere GFM is supported. :v:
......@@ -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:
```md
```markdown
perform*complicated*task
do*this*and*do*that*and*another thing
......@@ -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
a video player. The valid video extensions are `.mp4`, `.m4v`, `.mov`, `.webm`, and `.ogv`:
```md
```markdown
Here's a sample video:
![Sample Video](img/markdown_video.mp4)
......@@ -993,7 +993,7 @@ Here's a sample video:
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`:
```md
```markdown
Here's a sample audio clip:
![Sample Audio](img/markdown_audio.mp3)
......@@ -1275,7 +1275,7 @@ number, and count up from there.
Examples:
```md
```markdown
1. First ordered list item
2. Another item
- Unordered sub-list.
......@@ -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
each line for unordered lists, but you should not use a mix of them.
```md
```markdown
Unordered lists can:
- use
......
......@@ -137,7 +137,7 @@ The minimum scope needed for both of them is `read_registry`.
Example of using a token:
```sh
```shell
docker login registry.example.com -u <username> -p <token>
```
......@@ -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,
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
```
......@@ -221,7 +221,7 @@ For private and internal projects:
Replace the `<username>` and `<access_token>` in the following example:
```sh
```shell
docker login -u <username> -p <access_token> $CI_REGISTRY
```
......@@ -231,7 +231,7 @@ For private and internal projects:
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:
```sh
```shell
docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY
```
......
......@@ -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):
```md
```markdown
Closes #4, #6, and https://gitlab.com/<username>/<projectname>/issues/<xxx>
```
......
......@@ -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
check your Git version with:
```sh
```shell
git --version
```
......@@ -57,7 +57,7 @@ If you have the correct version, you can proceed to configure Git.
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}' )
git config --global user.signingkey $signingkey
git config --global gpg.format x509
......@@ -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
signingkey `git config --global user.signingkey ID`, then configure X.509:
```sh
```shell
git config --global gpg.x509.program smimesign
git config --global gpg.format x509
```
......@@ -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:
```sh
```shell
git commit -S -m "feat: x509 signed 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
to sign your commits automatically:
```sh
```shell
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:
```sh
```shell
git log --show-signature
```
......@@ -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:
```sh
```shell
git tag -s v1.1.1 -m "My signed tag"
```
......@@ -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
to sign your tags automatically:
```sh
```shell
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:
```sh
```shell
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