diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 15:09:15 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-30 15:09:15 +0000 |
| commit | 536aa3a1f4b96abc4ca34489bf2cbe503afcded7 (patch) | |
| tree | 88d08f7dfa29a32d6526773c4fe0fefd9f2bc7d1 /doc/user | |
| parent | 50ae4065530c4eafbeb7c5ff2c462c48c02947ca (diff) | |
| download | gitlab-ce-536aa3a1f4b96abc4ca34489bf2cbe503afcded7.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user')
36 files changed, 138 insertions, 132 deletions
diff --git a/doc/user/admin_area/license.md b/doc/user/admin_area/license.md index c9d8a457a51..fd74b2f311f 100644 --- a/doc/user/admin_area/license.md +++ b/doc/user/admin_area/license.md @@ -57,7 +57,7 @@ It is also possible to specify a custom location and filename for the license. Source installations should set the `GITLAB_LICENSE_FILE` environment variable with the path to a valid GitLab Enterprise Edition license. -```sh +```shell export GITLAB_LICENSE_FILE="/path/to/license/file" ``` diff --git a/doc/user/admin_area/monitoring/health_check.md b/doc/user/admin_area/monitoring/health_check.md index fe38c350f19..b0ad08e3b37 100644 --- a/doc/user/admin_area/monitoring/health_check.md +++ b/doc/user/admin_area/monitoring/health_check.md @@ -51,7 +51,7 @@ GET /-/health Example request: -```sh +```shell curl 'https://gitlab.example.com/-/health' ``` @@ -78,7 +78,7 @@ GET /-/readiness?all=1 Example request: -```sh +```shell curl 'https://gitlab.example.com/-/readiness' ``` @@ -117,7 +117,7 @@ GET /-/liveness Example request: -```sh +```shell curl 'https://gitlab.example.com/-/liveness' ``` diff --git a/doc/user/clusters/applications.md b/doc/user/clusters/applications.md index c502cd607d7..e8ef3c59b22 100644 --- a/doc/user/clusters/applications.md +++ b/doc/user/clusters/applications.md @@ -196,25 +196,25 @@ rules that allow external access to your deployed applications. If you installed Ingress via the **Applications**, run the following command: -```bash +```shell kubectl get service --namespace=gitlab-managed-apps ingress-nginx-ingress-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}' ``` Some Kubernetes clusters return a hostname instead, like [Amazon EKS](https://aws.amazon.com/eks/). For these platforms, run: -```bash +```shell kubectl get service --namespace=gitlab-managed-apps ingress-nginx-ingress-controller -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' ``` For Istio/Knative, the command will be different: -```bash +```shell kubectl get svc --namespace=istio-system knative-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip} ' ``` Otherwise, you can list the IP addresses of all load balancers: -```bash +```shell kubectl get svc --all-namespaces -o jsonpath='{range.items[?(@.status.loadBalancer.ingress)]}{.status.loadBalancer.ingress[*].ip} ' ``` @@ -264,7 +264,7 @@ This feature: - Is viewable by checking your Ingress controller's `modsec` log for rule violations. For example: - ```sh + ```shell kubectl logs -n gitlab-managed-apps $(kubectl get pod -n gitlab-managed-apps -l app=nginx-ingress,component=controller --no-headers=true -o custom-columns=:metadata.name) modsecurity-log -f ``` @@ -698,7 +698,7 @@ information. By default, the drop log for traffic is logged out by the `cilium-monitor` sidecar container. You can check these logs via: -```bash +```shell kubectl -n gitlab-managed-apps logs cilium-XXXX cilium-monitor ``` @@ -784,7 +784,7 @@ To avoid installation errors: You can confirm that the certificates match via `kubectl`: - ```sh + ```shell kubectl get configmaps/values-content-configuration-ingress -n gitlab-managed-apps -o \ "jsonpath={.data['cert\.pem']}" | base64 -d > a.pem kubectl get secrets/tiller-secret -n gitlab-managed-apps -o "jsonpath={.data['ca\.crt']}" | base64 -d > b.pem diff --git a/doc/user/group/saml_sso/scim_setup.md b/doc/user/group/saml_sso/scim_setup.md index fe64afd23f6..c47b9bd25ef 100644 --- a/doc/user/group/saml_sso/scim_setup.md +++ b/doc/user/group/saml_sso/scim_setup.md @@ -189,7 +189,7 @@ Alternatively, the [SCIM API](../../../api/scim.md#get-a-list-of-saml-users) can For example: -```sh +```shell curl 'https://example.gitlab.com/api/scim/v2/groups/GROUP_NAME/Users?startIndex=1"' --header "Authorization: Bearer <your_scim_token>" --header "Content-Type: application/scim+json" ``` @@ -207,7 +207,7 @@ The [SCIM API](../../../api/scim.md#update-a-single-saml-user) can be used to ma It is then possible to issue a manual SCIM#update request, for example: -```sh +```shell curl --verbose --request PATCH 'https://gitlab.com/api/scim/v2/groups/YOUR_GROUP/Users/OLD_EXTERNAL_UID' --data '{ "Operations": [{"op":"Replace","path":"externalId","value":"NEW_EXTERNAL_UID"}] }' --header "Authorization: Bearer <your_scim_token>" --header "Content-Type: application/scim+json" ``` diff --git a/doc/user/packages/conan_repository/index.md b/doc/user/packages/conan_repository/index.md index e9f86ebf4b2..2abfd08a5dd 100644 --- a/doc/user/packages/conan_repository/index.md +++ b/doc/user/packages/conan_repository/index.md @@ -33,7 +33,7 @@ Follow the instructions at [conan.io](https://conan.io/downloads.html) to downlo Once installation is complete, verify you can use Conan in your terminal by running -```sh +```shell conan --version ``` @@ -48,7 +48,7 @@ Conan version 1.20.5 When developing with C++ and Conan, you have a wide range of options for compilers. This tutorial walks through using the cmake compiler. In your terminal, run the command -```sh +```shell cmake --version ``` @@ -69,13 +69,13 @@ Clone the repo and it can be used for the rest of the tutorial if you don't have In your terminal, navigate to the root folder of your project. Generate a new recipe by running `conan new` and providing it with a package name and version: -```sh +```shell conan new Hello/0.1 -t ``` Next, you will create a package for that recipe by running `conan create` providing the Conan user and channel: -```sh +```shell conan create . my-org+my-group+my-project/beta ``` @@ -94,7 +94,7 @@ You are now ready to upload your package to the GitLab registry. To get started, Add a new remote to your Conan configuration: -```sh +```shell conan remote add gitlab https://gitlab.example.com/api/v4/packages/conan ``` @@ -102,7 +102,7 @@ Once the remote is set, you can use the remote when running Conan commands by ad For example: -```sh +```shell conan search Hello* --all --remote=gitlab ``` @@ -114,7 +114,7 @@ You will need to generate a [personal access token](../../../user/profile/person Once you have a personal access token and have [set your Conan remote](#adding-the-gitlab-package-registry-as-a-conan-remote), you can associate the token with the remote so you do not have to explicitly add them to each Conan command you run: -```sh +```shell conan user <gitlab-username> -r gitlab -p <personal_access_token> ``` @@ -129,7 +129,7 @@ The personal access token is not stored locally at any moment. Conan uses JWT, s Alternatively, you could explicitly include your credentials in any given command. For example: -```sh +```shell CONAN_LOGIN_USERNAME=<gitlab-username> CONAN_PASSWORD=<personal_access_token> conan upload Hello/0.1@my-group+my-project/beta --all --remote=gitlab ``` @@ -137,7 +137,7 @@ CONAN_LOGIN_USERNAME=<gitlab-username> CONAN_PASSWORD=<personal_access_token> co If you'd like Conan to always use GitLab as the registry for your package, you can tell Conan to always reference the GitLab remote for a given package recipe: -```sh +```shell conan remote add_ref Hello/0.1@my-group+my-project/beta gitlab ``` @@ -147,7 +147,7 @@ This functionality is best suited for when you want to consume or install packag The rest of the example commands in this documentation assume that you have added a Conan user with your credentials to the `gitlab` remote and will not include the explicit credentials or remote option, but be aware that any of the commands could be run without having added a user or default remote: -```sh +```shell `CONAN_LOGIN_USERNAME=<gitlab-username> CONAN_PASSWORD=<personal_access_token> <conan command> --remote=gitlab ``` @@ -159,7 +159,7 @@ Ensure you have a project created on GitLab and that the personal access token y You can upload your package to the GitLab Package Registry using the `conan upload` command: -```sh +```shell conan upload Hello/0.1@my-group+my-project/beta --all ``` @@ -200,13 +200,13 @@ Add the Conan recipe to the `[requires]` section of the file: Next, from the root of your project, create a build directory and navigate to it: -```sh +```shell mkdir build && cd build ``` Now you can install the dependencies listed in `conanfile.txt`: -```sh +```shell conan install .. ``` @@ -220,7 +220,7 @@ There are two ways to remove a Conan package from the GitLab Package Registry. - **Using the Conan client in the command line:** - ```sh + ```shell conan remove Hello/0.2@user/channel --remote=gitlab ``` @@ -238,7 +238,7 @@ The `conan search` command can be run searching by full or partial package name, To search using a partial name, use the wildcard symbol `*`, which should be placed at the end of your search (e.g., `my-packa*`): -```sh +```shell conan search Hello --all --remote=gitlab conan search He* --all --remote=gitlab conan search Hello/0.1@my-group+my-project/beta --all --remote=gitlab @@ -250,7 +250,7 @@ The scope of your search will include all projects you have permission to access The `conan info` command will return info about a given package: -```sh +```shell conan info Hello/0.1@my-group+my-project/beta ``` diff --git a/doc/user/packages/container_registry/index.md b/doc/user/packages/container_registry/index.md index b10430633ff..c9e60d1497f 100644 --- a/doc/user/packages/container_registry/index.md +++ b/doc/user/packages/container_registry/index.md @@ -60,7 +60,7 @@ using your GitLab credentials. For example if the Registry's URL is `registry.example.com`, then you should be able to login with: -```sh +```shell docker login registry.example.com ``` @@ -68,7 +68,7 @@ Building and publishing images should be a straightforward process. Just make sure that you are using the Registry URL with the namespace and project name that is hosted on GitLab: -```sh +```shell docker build -t registry.example.com/group/project/image . docker push registry.example.com/group/project/image ``` @@ -94,7 +94,7 @@ registry.example.com/group/project/my/image:rc1 To download and run a container from images hosted in GitLab Container Registry, use `docker run`: -```sh +```shell docker run [options] registry.example.com/group/project/image [arguments] ``` @@ -134,7 +134,7 @@ The minimal 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> ``` @@ -153,13 +153,13 @@ Examples: - Select all tags, keep at least 1 tag per image, expire any tag older than 14 days, run once a month, and the policy is enabled: - ```bash + ```shell curl --request PUT --header 'Content-Type: application/json;charset=UTF-8' --header "PRIVATE-TOKEN: <your_access_token>" --data-binary '{"container_expiration_policy_attributes":{"cadence":"1month","enabled":true,"keep_n":1,"older_than":"14d","name_regex":".*"}' 'https://gitlab.example.com/api/v4/projects/2' ``` - Select only tags with a name that contains `stable`, keep at least 50 tag per image, expire any tag older than 7 days, run every day, and the policy is enabled: - ```bash + ```shell curl --request PUT --header 'Content-Type: application/json;charset=UTF-8' --header "PRIVATE-TOKEN: <your_access_token>" --data-binary '{"container_expiration_policy_attributes":{"cadence":"1day","enabled":true,"keep_n":50"older_than":"7d","name_regex":"*stable"}' 'https://gitlab.example.com/api/v4/projects/2' ``` diff --git a/doc/user/packages/dependency_proxy/index.md b/doc/user/packages/dependency_proxy/index.md index 1cebd734a99..7e15df7b433 100644 --- a/doc/user/packages/dependency_proxy/index.md +++ b/doc/user/packages/dependency_proxy/index.md @@ -41,19 +41,19 @@ To get a Docker image into the dependency proxy: - Manually pulling the Docker image: - ```bash + ```shell docker pull gitlab.com/groupname/dependency_proxy/containers/alpine:latest ``` - From a `Dockerfile`: - ```bash + ```shell FROM gitlab.com/groupname/dependency_proxy/containers/alpine:latest ``` - In [`.gitlab-ci.yml`](../../../ci/yaml/README.md#image): - ```bash + ```shell image: gitlab.com/groupname/dependency_proxy/containers/alpine:latest ``` diff --git a/doc/user/packages/maven_repository/index.md b/doc/user/packages/maven_repository/index.md index ea052703416..f65042d2684 100644 --- a/doc/user/packages/maven_repository/index.md +++ b/doc/user/packages/maven_repository/index.md @@ -261,7 +261,7 @@ Once you have set up the [authentication](#authenticating-to-the-gitlab-maven-re and [configuration](#configuring-your-project-to-use-the-gitlab-maven-repository-url), test to upload a Maven artifact from a project of yours: -```sh +```shell mvn deploy ``` diff --git a/doc/user/packages/npm_registry/index.md b/doc/user/packages/npm_registry/index.md index a0c82fd3e3c..58b4bf6a710 100644 --- a/doc/user/packages/npm_registry/index.md +++ b/doc/user/packages/npm_registry/index.md @@ -43,7 +43,7 @@ NPM to your local development environment. Once installation is complete, verify you can use NPM in your terminal by running: -```sh +```shell npm --version ``` @@ -61,7 +61,7 @@ your development environment. Once installed, you can verify that Yarn is available with the following command: -```sh +```shell yarn --version ``` @@ -77,13 +77,13 @@ Understanding how to create a full JavaScript project is outside the scope of this guide but you can initialize a new empty package by creating and navigating to an empty directory and using the following command: -```sh +```shell npm init ``` Or if you're using Yarn: -```sh +```shell yarn init ``` @@ -110,7 +110,7 @@ If you have 2FA enabled, you need to use a [personal access token](../../profile To authenticate with a [personal access token](../../profile/personal_access_tokens.md), set your NPM configuration: -```bash +```shell # Set URL for your scoped packages. # For example package with name `@foo/bar` will use this URL for download npm config set @foo:registry https://gitlab.com/api/v4/packages/npm/ @@ -140,7 +140,7 @@ If you encounter an error message with [Yarn](https://yarnpkg.com/en/), see the To avoid hard-coding the `authToken` value, you may use a variables in its place: -```bash +```shell npm config set '//gitlab.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken' "${NPM_TOKEN}" npm config set '//gitlab.com/api/v4/packages/npm/:_authToken' "${NPM_TOKEN}" ``` @@ -149,7 +149,7 @@ Then, you could run `npm publish` either locally or via GitLab CI/CD: - **Locally:** Export `NPM_TOKEN` before publishing: - ```sh + ```shell NPM_TOKEN=<your_token> npm publish ``` @@ -191,7 +191,7 @@ domain name. Once you have enabled it and set up [authentication](#authenticating-to-the-gitlab-npm-registry), you can upload an NPM package to your project: -```sh +```shell npm publish ``` @@ -248,7 +248,7 @@ NPM packages are commonly installed using the the `npm` or `yarn` commands inside a JavaScript project. If you haven't already, you will need to set the URL for scoped packages. You can do this with the following command: -```sh +```shell npm config set @foo:registry https://gitlab.com/api/v4/packages/npm/ ``` @@ -259,13 +259,13 @@ is setup so you can successfully install the package. Once this has been completed, you can run the following command inside your project to install a package: -```sh +```shell npm install @my-project-scope/my-package ``` Or if you're using Yarn: -```sh +```shell yarn add @my-project-scope/my-package ``` @@ -302,7 +302,7 @@ deploy: If you are using [yarn](https://yarnpkg.com/en/) with the NPM registry, you may get an error message like: -```sh +```shell yarn install v1.15.2 warning package.json: No license field info No lockfile found. @@ -351,7 +351,7 @@ And the `.npmrc` file should look like: You do not need a token to run `npm install` unless your project is private (the token is only required to publish). If the `.npmrc` file was checked in with a reference to `$NPM_TOKEN`, you can remove it. If you prefer to leave the reference in, you'll need to set a value prior to running `npm install` or set the value using [GitLab environment variables](./../../../ci/variables/README.md): -```bash +```shell NPM_TOKEN=<your_token> npm install ``` @@ -384,7 +384,7 @@ a package without specifying the tag or version. Examples of the supported `dist-tag` commands and using tags in general: -```sh +```shell npm publish @scope/package --tag # Publish new package with new tag npm dist-tag add @scope/package@version my-tag # Add a tag to an existing package npm dist-tag ls @scope/package # List all tags under the package diff --git a/doc/user/packages/nuget_repository/index.md b/doc/user/packages/nuget_repository/index.md index 212641222f8..d32683e1d40 100644 --- a/doc/user/packages/nuget_repository/index.md +++ b/doc/user/packages/nuget_repository/index.md @@ -17,7 +17,7 @@ If you have [Visual Studio](https://visualstudio.microsoft.com/vs/), [nuget CLI] You can confirm that [nuget CLI](https://www.nuget.org/) is properly installed with: -```sh +```shell nuget help ``` @@ -63,7 +63,7 @@ You can now add a new source to nuget either using [nuget CLI](https://www.nuget To add the GitLab NuGet Repository as a source with `nuget`: -```sh +```shell nuget source Add -Name <source_name> -Source "https://example.gitlab.com/api/v4/projects/<your_project_id>/packages/nuget/index.json" -UserName <gitlab_username> -Password <gitlab_token> ``` @@ -77,7 +77,7 @@ Replace: For example: -```sh +```shell nuget source Add -Name "GitLab" -Source "https//gitlab.example/api/v4/projects/10/packages/nuget/index.json" -UserName carol -Password 12345678asdf ``` diff --git a/doc/user/packages/workflows/monorepo.md b/doc/user/packages/workflows/monorepo.md index 9f281d2b31c..0c7fb4a1a20 100644 --- a/doc/user/packages/workflows/monorepo.md +++ b/doc/user/packages/workflows/monorepo.md @@ -76,7 +76,7 @@ Using the example project above, this `gitlab-ci.yml` file will publish and publish `MyPackage` anytime changes are made to anywhere _except_ the `Foo` directory on the `master` branch. -```sh +```shell stages: - build diff --git a/doc/user/packages/workflows/project_registry.md b/doc/user/packages/workflows/project_registry.md index d8c1c7c2861..df330931ac5 100644 --- a/doc/user/packages/workflows/project_registry.md +++ b/doc/user/packages/workflows/project_registry.md @@ -80,6 +80,6 @@ if your project is located at `https://gitlab.com/foo/bar/my-proj`, then you can using `conan create . foo+bar+my-proj/channel`, where `channel` is your package channel (`stable`, `beta`, etc.). Once your package is created, you are ready to [upload your package](../conan_repository/index.md#uploading-a-package) depending on your final package recipe. For example: -```sh +```shell CONAN_LOGIN_USERNAME=<gitlab-username> CONAN_PASSWORD=<personal_access_token> conan upload MyPackage/1.0.0@foo+bar+my-proj/channel --all --remote=gitlab ``` diff --git a/doc/user/profile/account/two_factor_authentication.md b/doc/user/profile/account/two_factor_authentication.md index 108d4f0b387..ab701337c2a 100644 --- a/doc/user/profile/account/two_factor_authentication.md +++ b/doc/user/profile/account/two_factor_authentication.md @@ -181,14 +181,14 @@ a new set of recovery codes with SSH: 1. Run: - ```sh + ```shell ssh git@gitlab.example.com 2fa_recovery_codes ``` 1. You will then be prompted to confirm that you want to generate new codes. Continuing this process invalidates previously saved codes: - ```sh + ```shell Are you sure you want to generate new two-factor recovery codes? Any existing recovery codes you saved will be invalidated. (yes/no) diff --git a/doc/user/profile/index.md b/doc/user/profile/index.md index 06e4eac6623..dc6c744ff3c 100644 --- a/doc/user/profile/index.md +++ b/doc/user/profile/index.md @@ -209,7 +209,7 @@ Once this option is enabled, every Git-related action will be performed using th To stay fully anonymous, you can also copy this private commit email and configure it on your local machine using the following command: -```sh +```shell git config --global user.email <your email address> ``` diff --git a/doc/user/project/clusters/add_remove_clusters.md b/doc/user/project/clusters/add_remove_clusters.md index 7aeb4c4cf91..ef491a1971d 100644 --- a/doc/user/project/clusters/add_remove_clusters.md +++ b/doc/user/project/clusters/add_remove_clusters.md @@ -393,7 +393,7 @@ To add a Kubernetes cluster to your project, group, or instance: Get the API URL by running this command: - ```sh + ```shell kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}' ``` @@ -402,7 +402,7 @@ To add a Kubernetes cluster to your project, group, or instance: `default-token-xxxxx`. Copy that token name for use below. - Get the certificate by running this command: - ```sh + ```shell kubectl get secret <secret name> -o jsonpath="{['data']['ca\.crt']}" | base64 --decode @@ -444,7 +444,7 @@ To add a Kubernetes cluster to your project, group, or instance: 1. Apply the service account and cluster role binding to your cluster: - ```bash + ```shell kubectl apply -f gitlab-admin-service-account.yaml ``` @@ -453,7 +453,7 @@ To add a Kubernetes cluster to your project, group, or instance: you can alternatively enable Basic Authentication and then run the `kubectl apply` command as an admin: - ```bash + ```shell kubectl apply -f gitlab-admin-service-account.yaml --username=admin --password=<password> ``` @@ -463,14 +463,14 @@ To add a Kubernetes cluster to your project, group, or instance: Output: - ```bash + ```shell serviceaccount "gitlab-admin" created clusterrolebinding "gitlab-admin" created ``` 1. Retrieve the token for the `gitlab-admin` service account: - ```bash + ```shell kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep gitlab-admin | awk '{print $1}') ``` @@ -530,7 +530,7 @@ To add an existing EKS cluster to your project, group, or instance: `default-token-xxxxx`. Copy that token name for use below. 1. Get the certificate with: - ```sh + ```shell kubectl get secret <secret name> -o jsonpath="{['data']['ca\.crt']}" | base64 --decode ``` @@ -582,7 +582,7 @@ To add an existing EKS cluster to your project, group, or instance: 1. Retrieve the token for the `eks-admin` service account: - ```bash + ```shell kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}') ``` @@ -643,7 +643,7 @@ or user who can authenticate to the cluster, has full API access. This is a To effectively disable RBAC, global permissions can be applied granting full access: -```bash +```shell kubectl create clusterrolebinding permissive-binding \ --clusterrole=cluster-admin \ --user=admin \ diff --git a/doc/user/project/clusters/serverless/aws.md b/doc/user/project/clusters/serverless/aws.md index 94b07af0985..afe48f8c7f4 100644 --- a/doc/user/project/clusters/serverless/aws.md +++ b/doc/user/project/clusters/serverless/aws.md @@ -149,7 +149,7 @@ Running the following `curl` command should trigger your function. NOTE: **Note:** Your url should be the one retrieved from the GitLab deploy stage log. -```sh +```shell curl https://u768nzby1j.execute-api.us-east-1.amazonaws.com/production/hello ``` @@ -192,7 +192,7 @@ The `serverless-offline` plugin allows to run your code locally. To run your cod Running the following `curl` command should trigger your function. -```sh +```shell curl http://localhost:3000/hello ``` diff --git a/doc/user/project/clusters/serverless/index.md b/doc/user/project/clusters/serverless/index.md index 9b56970db53..7935a88f3ad 100644 --- a/doc/user/project/clusters/serverless/index.md +++ b/doc/user/project/clusters/serverless/index.md @@ -159,7 +159,7 @@ You must do the following: Then run the following command: - ```bash + ```shell kubectl apply -f knative-serving-only-role.yaml ``` @@ -362,7 +362,7 @@ Kubernetes cluster. Click on each function to obtain detailed scale and invocati The function details can be retrieved directly from Knative on the cluster: -```bash +```shell kubectl -n "$KUBE_NAMESPACE" get services.serving.knative.dev ``` @@ -370,7 +370,7 @@ The sample function can now be triggered from any HTTP client using a simple `PO 1. Using curl (replace the URL on the last line with the URL of your application): - ```bash + ```shell curl \ --header "Content-Type: application/json" \ --request POST \ @@ -388,7 +388,7 @@ To access your Kubernetes secrets from within your function, the secrets should #### CLI example -```bash +```shell kubectl create secret generic my-secrets -n "$KUBE_NAMESPACE" --from-literal MY_SECRET=imverysecure ``` @@ -491,7 +491,7 @@ Go to the **CI/CD > Pipelines** and click on the pipeline that deployed your app The output will look like this: -```bash +```shell Running with gitlab-runner 12.1.0-rc1 (6da35412) on prm-com-gitlab-org ae3bfce3 Using Docker executor with image registry.gitlab.com/gitlab-org/gitlabktl:latest ... @@ -594,7 +594,7 @@ The instructions below relate to installing and running Certbot on a Linux serve [`certbot-auto` wrapper script](https://certbot.eff.org/docs/install.html#certbot-auto). On the command line of your server, run the following commands: - ```sh + ```shell wget https://dl.eff.org/certbot-auto sudo mv certbot-auto /usr/local/bin/certbot-auto sudo chown root /usr/local/bin/certbot-auto @@ -604,7 +604,7 @@ The instructions below relate to installing and running Certbot on a Linux serve To check the integrity of the `certbot-auto` script, run: - ```sh + ```shell wget -N https://dl.eff.org/certbot-auto.asc gpg2 --keyserver ipv4.pool.sks-keyservers.net --recv-key A2CFB51FA275A7286234E7B24D17C995CD9775F2 gpg2 --trusted-key 4D17C995CD9775F2 --verify certbot-auto.asc /usr/local/bin/certbot-auto @@ -612,7 +612,7 @@ The instructions below relate to installing and running Certbot on a Linux serve The output of the last command should look something like: - ```sh + ```shell gpg: Signature made Mon 10 Jun 2019 06:24:40 PM EDT gpg: using RSA key A2CFB51FA275A7286234E7B24D17C995CD9775F2 gpg: key 4D17C995CD9775F2 marked as ultimately trusted @@ -626,7 +626,7 @@ The instructions below relate to installing and running Certbot on a Linux serve 1. Run the following command to use Certbot to request a certificate using DNS challenge during authorization: - ```sh + ```shell ./certbot-auto certonly --manual --preferred-challenges dns -d '*.<namespace>.example.com' ``` @@ -640,14 +640,14 @@ The instructions below relate to installing and running Certbot on a Linux serve In the above image, the namespace for the project is `node-function-11909507` and the domain is `knative.info`, thus certificate request line would look like this: - ```sh + ```shell ./certbot-auto certonly --manual --preferred-challenges dns -d '*.node-function-11909507.knative.info' ``` The Certbot tool walks you through the steps of validating that you own each domain that you specify by creating TXT records in those domains. After this process is complete, the output should look something like this: - ```sh + ```shell IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/namespace.example.com/fullchain.pem @@ -671,13 +671,13 @@ The instructions below relate to installing and running Certbot on a Linux serve Run the following command to see the contents of `fullchain.pem`: - ```sh + ```shell sudo cat /etc/letsencrypt/live/node-function-11909507.knative.info/fullchain.pem ``` Output should look like this: - ```sh + ```shell -----BEGIN CERTIFICATE----- 2fcb195768c39e9a94cec2c2e32c59c0aad7a3365c10892e8116b5d83d4096b6 04f294d1eaca42b8692017b426d53bbc8fe75f827734f0260710b83a556082df @@ -743,13 +743,13 @@ The instructions below relate to installing and running Certbot on a Linux serve Once `cert.pem` is created, run the following command to see the contents of `privkey.pem`: - ```sh + ```shell sudo cat /etc/letsencrypt/live/namespace.example/privkey.pem ``` Output should look like this: - ```sh + ```shell -----BEGIN PRIVATE KEY----- 2fcb195768c39e9a94cec2c2e32c59c0aad7a3365c10892e8116b5d83d4096b6 04f294d1eaca42b8692017b426d53bbc8fe75f827734f0260710b83a556082df @@ -792,7 +792,7 @@ The instructions below relate to installing and running Certbot on a Linux serve [GKE Cluster Access](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl). For other platforms, [install `kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/). - ```sh + ```shell kubectl create --namespace istio-system secret tls istio-ingressgateway-certs \ --key cert.pk \ --cert cert.pem @@ -804,13 +804,13 @@ The instructions below relate to installing and running Certbot on a Linux serve connections. Run the following command to open the Knative shared `gateway` in edit mode: - ```sh + ```shell kubectl edit gateway knative-ingress-gateway --namespace knative-serving ``` Update the gateway to include the following tls: section and configuration: - ```sh + ```shell tls: mode: SIMPLE privateKey: /etc/istio/ingressgateway-certs/tls.key @@ -819,7 +819,7 @@ The instructions below relate to installing and running Certbot on a Linux serve Example: - ```sh + ```shell apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: diff --git a/doc/user/project/deploy_tokens/index.md b/doc/user/project/deploy_tokens/index.md index 5c3c2188629..ef09c299036 100644 --- a/doc/user/project/deploy_tokens/index.md +++ b/doc/user/project/deploy_tokens/index.md @@ -56,7 +56,7 @@ To download a repository using a Deploy Token, you just need to: 1. Take note of your `username` and `token`. 1. `git clone` the project using the Deploy Token: - ```sh + ```shell git clone http://<username>:<deploy_token>@gitlab.example.com/tanuki/awesome_project.git ``` @@ -70,7 +70,7 @@ To read the container registry images, you'll need to: 1. Take note of your `username` and `token`. 1. Log in to GitLab’s Container Registry using the deploy token: -```sh +```shell docker login -u <username> -p <deploy_token> registry.example.com ``` @@ -90,7 +90,7 @@ automatically exposed to the CI/CD jobs as environment variables: `CI_DEPLOY_USE After you create the token, you can login to the Container Registry using those variables: -```sh +```shell docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY ``` diff --git a/doc/user/project/file_lock.md b/doc/user/project/file_lock.md index 045f2c8049b..e3590147dd7 100644 --- a/doc/user/project/file_lock.md +++ b/doc/user/project/file_lock.md @@ -81,7 +81,7 @@ pre-receive hook will reject your changes when you try to push. In the following example, a user who has no permissions on the locked `.gitignore` file will see the message below: -```bash +```shell Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. diff --git a/doc/user/project/import/svn.md b/doc/user/project/import/svn.md index 6b22c5f2fd0..87ea02b5b46 100644 --- a/doc/user/project/import/svn.md +++ b/doc/user/project/import/svn.md @@ -119,13 +119,13 @@ process should be run on a local workstation. Install `svn2git`. On all systems you can install as a Ruby gem if you already have Ruby and Git installed. -```bash +```shell sudo gem install svn2git ``` On Debian-based Linux distributions you can install the native packages: -```bash +```shell sudo apt-get install git-core git-svn ruby ``` @@ -138,7 +138,7 @@ repository. If you don't, the conversion will fail and you will have to update the author file accordingly. The following command will search through the repository and output a list of authors. -```bash +```shell svn log --quiet | grep -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/ //g' | sort | uniq ``` @@ -157,7 +157,7 @@ command will checkout the repository and do the conversion in the current working directory. Be sure to create a new directory for each repository before running the `svn2git` command. The conversion process will take some time. -```bash +```shell svn2git https://svn.example.com/path/to/repo --authors /path/to/authors.txt ``` @@ -172,7 +172,7 @@ Copy the SSH or HTTP(S) repository URL from the project page. Add the GitLab repository as a Git remote and push all the changes. This will push all commits, branches and tags. -```bash +```shell git remote add origin git@gitlab.com:<group>/<project>.git git push --all origin git push --tags origin diff --git a/doc/user/project/integrations/generic_alerts.md b/doc/user/project/integrations/generic_alerts.md index 8c509f30c4f..bb07b97e456 100644 --- a/doc/user/project/integrations/generic_alerts.md +++ b/doc/user/project/integrations/generic_alerts.md @@ -34,7 +34,7 @@ You can customize the payload by sending the following parameters. All fields ar Example request: -```sh +```shell curl --request POST \ --data '{"title": "Incident title"}' \ --header "Authorization: Bearer <authorization_key>" \ diff --git a/doc/user/project/integrations/jira.md b/doc/user/project/integrations/jira.md index d08c8699eba..0bfb13ba54f 100644 --- a/doc/user/project/integrations/jira.md +++ b/doc/user/project/integrations/jira.md @@ -134,7 +134,7 @@ ENTITY_TITLE For example, the following commit will reference the Jira issue with `PROJECT-1` as its ID: -```bash +```shell git commit -m "PROJECT-1 Fix spelling and grammar" ``` diff --git a/doc/user/project/integrations/slack.md b/doc/user/project/integrations/slack.md index 508e72b5753..1dda3a60430 100644 --- a/doc/user/project/integrations/slack.md +++ b/doc/user/project/integrations/slack.md @@ -50,7 +50,7 @@ communicating with itself. The former is less likely since Slack's security cert should _hopefully_ always be trusted. We can establish which we're dealing with by using the below rails console script. -```sh +```shell # start a rails console: sudo gitlab-rails console production diff --git a/doc/user/project/issues/associate_zoom_meeting.md b/doc/user/project/issues/associate_zoom_meeting.md index 24775204c9f..a11fb4a7438 100644 --- a/doc/user/project/issues/associate_zoom_meeting.md +++ b/doc/user/project/issues/associate_zoom_meeting.md @@ -15,7 +15,7 @@ To associate a zoom meeting with an issue, you can use GitLab's In an issue, leave a comment using the `/zoom` quick action followed by a valid Zoom link: -```sh +```shell /zoom https://zoom.us/j/123456789 ``` @@ -34,7 +34,7 @@ need to [remove it](#removing-an-existing-zoom-meeting-from-an-issue) first. Similarly to adding a zoom meeting, you can remove it with a quick action: -```sh +```shell /remove_zoom ``` diff --git a/doc/user/project/issues/design_management.md b/doc/user/project/issues/design_management.md index b8983a06180..80075efe4ac 100644 --- a/doc/user/project/issues/design_management.md +++ b/doc/user/project/issues/design_management.md @@ -75,6 +75,12 @@ of the design, and will replace the previous version. Designs cannot be added if the issue has been moved, or its [discussion is locked](../../discussions/#lock-discussions). +### Skipped designs + +Designs with the same filename as an existing uploaded design _and_ whose content has not changed will be skipped. +This means that no new version of the design will be created. When designs are skipped, you will be made aware via a warning +message on the Issue. + ## Viewing designs Images on the Design Management page can be enlarged by clicking on them. diff --git a/doc/user/project/issues/managing_issues.md b/doc/user/project/issues/managing_issues.md index ff360e973aa..c6444259f25 100644 --- a/doc/user/project/issues/managing_issues.md +++ b/doc/user/project/issues/managing_issues.md @@ -178,7 +178,7 @@ Closes #4, #6, and https://gitlab.com/<username>/<projectname>/issues/<xxx> When not specified, the default issue closing pattern as shown below will be used: -```bash +```shell ((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing)|[Ii]mplement(?:s|ed|ing)?)(:?) +(?:(?:issues? +)?%{issue_ref}(?:(?:, *| +and +)?)|([A-Z][A-Z0-9_]+-\d+))+) ``` diff --git a/doc/user/project/merge_requests/allow_collaboration.md b/doc/user/project/merge_requests/allow_collaboration.md index 083a117600b..721d866415c 100644 --- a/doc/user/project/merge_requests/allow_collaboration.md +++ b/doc/user/project/merge_requests/allow_collaboration.md @@ -55,7 +55,7 @@ Here's how the process would look like: 1. Use the copy button to copy the first command and paste them in your terminal: - ```sh + ```shell git fetch git@gitlab.com:thedude/awesome-project.git update-docs git checkout -b thedude-awesome-project-update-docs FETCH_HEAD ``` @@ -66,7 +66,7 @@ Here's how the process would look like: 1. Make any changes you want and commit. 1. Push to the forked project: - ```sh + ```shell git push git@gitlab.com:thedude/awesome-project.git thedude-awesome-project-update-docs:update-docs ``` diff --git a/doc/user/project/merge_requests/cherry_pick_changes.md b/doc/user/project/merge_requests/cherry_pick_changes.md index a5c191c150f..1ba5ece89d5 100644 --- a/doc/user/project/merge_requests/cherry_pick_changes.md +++ b/doc/user/project/merge_requests/cherry_pick_changes.md @@ -38,7 +38,7 @@ from the command line. Here is a quick example to cherry-pick a merge commit using the second parent as the mainline: -```bash +```shell git cherry-pick -m 2 7a39eb0 ``` diff --git a/doc/user/project/merge_requests/creating_merge_requests.md b/doc/user/project/merge_requests/creating_merge_requests.md index 470cf2a8656..87ef29407e9 100644 --- a/doc/user/project/merge_requests/creating_merge_requests.md +++ b/doc/user/project/merge_requests/creating_merge_requests.md @@ -106,27 +106,27 @@ Assuming you have your repository cloned into your computer and you'd like to start working on changes to files, start by creating and checking out a new branch: -```bash +```shell git checkout -b my-new-branch ``` Work on your file changes, stage, and commit them: -```bash +```shell git add . git commit -m "My commit message" ``` Once you're done, [push your branch to GitLab](../../../gitlab-basics/start-using-git.md#send-changes-to-gitlabcom): -```bash +```shell git push origin my-new-branch ``` In the output, GitLab will prompt you with a direct link for creating a merge request: -```bash +```shell ... remote: To create a merge request for docs-new-merge-request, visit: remote: https://gitlab-instance.com/my-group/my-project/merge_requests/new?merge_request%5Bsource_branch%5D=my-new-branch diff --git a/doc/user/project/merge_requests/revert_changes.md b/doc/user/project/merge_requests/revert_changes.md index 1cbbcf45400..75d9702ceb9 100644 --- a/doc/user/project/merge_requests/revert_changes.md +++ b/doc/user/project/merge_requests/revert_changes.md @@ -52,7 +52,7 @@ from the command line. Here is a quick example to revert a merge commit using the second parent as the mainline: -```bash +```shell git revert -m 2 7a39eb0 ``` diff --git a/doc/user/project/pages/getting_started_part_four.md b/doc/user/project/pages/getting_started_part_four.md index 263b20ea224..d6b34f4319e 100644 --- a/doc/user/project/pages/getting_started_part_four.md +++ b/doc/user/project/pages/getting_started_part_four.md @@ -53,7 +53,7 @@ write in the `.gitlab-ci.yml` the script you want to run so GitLab Runner will do it for you. It looks more complicated than it is. What you need to tell the Runner: -```sh +```shell gem install jekyll jekyll build ``` diff --git a/doc/user/project/pages/lets_encrypt_for_gitlab_pages.md b/doc/user/project/pages/lets_encrypt_for_gitlab_pages.md index c9bd3e35a5f..33181828fb2 100644 --- a/doc/user/project/pages/lets_encrypt_for_gitlab_pages.md +++ b/doc/user/project/pages/lets_encrypt_for_gitlab_pages.md @@ -43,27 +43,27 @@ operating systems the steps might be slightly different. Follow the 1. On your computer, open a terminal and navigate to your repository's root directory: - ```bash + ```shell cd path/to/dir ``` 1. Install CertBot (the tool Let's Encrypt uses to issue certificates): - ```bash + ```shell brew install certbot ``` 1. Request a certificate for your domain (`example.com`) and provide an email account (`your@email.com`) to receive notifications: - ```bash + ```shell sudo certbot certonly -a manual -d example.com --email your@email.com ``` Alternatively, you can register without adding an e-mail account, but you won't be notified about the certificate expiration's date: - ```bash + ```shell sudo certbot certonly -a manual -d example.com --register-unsafely-without-email ``` @@ -76,7 +76,7 @@ operating systems the steps might be slightly different. Follow the CertBot will then prompt you with the following message: - ```bash + ```shell Create a file containing just this data: Rxnv6WKo95hsuLVX3osmT6LgmzsJKSaK9htlPToohOP.HUGNKk82jlsmOOfphlt8Jy69iuglsn095nxOMH9j3Yb @@ -95,7 +95,7 @@ operating systems the steps might be slightly different. Follow the and add to the last folder an `index.html` file containing the content referred on the previous prompt message: - ```bash + ```shell Rxnv6WKo95hsuLVX3osmT6LgmzsJKSaK9htlPToohOP.HUGNKk82jlsmOOfphlt8Jy69iuglsn095nxOMH9j3Yb ``` @@ -109,7 +109,7 @@ operating systems the steps might be slightly different. Follow the passes, press **Enter** on your terminal to continue issuing your certificate. CertBot will then prompt you with the following message: - ```bash + ```shell Waiting for verification... Cleaning up challenges @@ -137,13 +137,13 @@ Now that your certificate has been issued, let's add it to your Pages site: 1. From your terminal, copy and paste the certificate into the first field **Certificate (PEM)**: - ```bash + ```shell sudo cat /etc/letsencrypt/live/example.com/fullchain.pem | pbcopy ``` 1. Copy and paste the private key into the second field **Key (PEM)**: - ```bash + ```shell sudo cat /etc/letsencrypt/live/example.com/privkey.pem | pbcopy ``` @@ -160,6 +160,6 @@ valid certificates)**. Let's Encrypt certificates expire every 90 days and you'll have to renew them periodically. To renew all your certificates at once, run: -```bash +```shell sudo certbot renew ``` diff --git a/doc/user/project/pipelines/settings.md b/doc/user/project/pipelines/settings.md index 3998dc69ad5..a89304acd8a 100644 --- a/doc/user/project/pipelines/settings.md +++ b/doc/user/project/pipelines/settings.md @@ -141,7 +141,7 @@ small one line script that will strip the color codes off. For example: -```bash +```shell lein cloverage | perl -pe 's/\e\[?.*?[\@-~]//g' ``` diff --git a/doc/user/project/repository/git_blame.md b/doc/user/project/repository/git_blame.md index 1c63d73acdb..2deb53b313c 100644 --- a/doc/user/project/repository/git_blame.md +++ b/doc/user/project/repository/git_blame.md @@ -38,14 +38,14 @@ If you're running `git` from the command line, the equivalent command is `git blame <filename>`. For example, if you want to find `blame` information about a `README.md` file in the local directory, run the following command: -```bash +```shell git blame README.md ``` You'll see output similar to the following, which includes the commit time in UTC format: -```bash +```shell 62e2353a (Achilleas Pipinellis 2019-07-11 14:52:18 +0300 1) [](https://gitlab.com/gitlab-com/gitlab-docs/commits/master) fb0fc7d6 (Achilleas Pipinellis 2016-11-07 22:21:22 +0100 2) ^764ca75 (Connor Shea 2016-10-05 23:40:24 -0600 3) # GitLab Documentation diff --git a/doc/user/project/repository/git_history.md b/doc/user/project/repository/git_history.md index 9cd3d0d4ed0..b7375602a78 100644 --- a/doc/user/project/repository/git_history.md +++ b/doc/user/project/repository/git_history.md @@ -29,14 +29,14 @@ is `git log <filename>`. For example, if you want to find `history` information about a `README.md` file in the local directory, run the following command: -```bash +```shell git log README.md ``` You'll see output similar to the following, which includes the commit time in UTC format: -```bash +```shell commit 0e62ed6d9f39fa9bedf7efc6edd628b137fa781a Author: Mike Jang <mjang@gitlab.com> Date: Tue Nov 26 21:44:53 2019 +0000 diff --git a/doc/user/project/repository/repository_mirroring.md b/doc/user/project/repository/repository_mirroring.md index 09506da6e90..aa54c727fbe 100644 --- a/doc/user/project/repository/repository_mirroring.md +++ b/doc/user/project/repository/repository_mirroring.md @@ -214,7 +214,7 @@ Other providers will vary. If you're running self-managed GitLab, or otherwise have access to the server for the other repository, you can securely gather the key fingerprints: -```sh +```shell $ cat /etc/ssh/ssh_host*pub | ssh-keygen -E md5 -l -f - 256 MD5:f4:28:9f:23:99:15:21:1b:bf:ed:1f:8e:a0:76:b2:9d root@example.com (ECDSA) 256 MD5:e6:eb:45:8a:3c:59:35:5f:e9:5b:80:12:be:7e:22:73 root@example.com (ED25519) @@ -345,7 +345,7 @@ Read about [configuring Server hooks](../../../administration/server_hooks.md) o A sample `pre-receive` hook is provided below. -```bash +```shell #!/usr/bin/env bash # --- Assume only one push mirror target |
