Commit 758e4194 authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'docs-fix-yaml-4' into 'master'

Clean up yaml code block formatting

See merge request gitlab-org/gitlab!43507
parents 6758cc76 92e5b3c3
...@@ -203,9 +203,9 @@ _The artifacts are stored by default in ...@@ -203,9 +203,9 @@ _The artifacts are stored by default in
enabled: true enabled: true
object_store: object_store:
enabled: true enabled: true
remote_directory: "artifacts" # The bucket name remote_directory: "artifacts" # The bucket name
connection: connection:
provider: AWS # Only AWS supported at the moment provider: AWS # Only AWS supported at the moment
aws_access_key_id: AWS_ACCESS_KEY_ID aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY aws_secret_access_key: AWS_SECRET_ACCESS_KEY
region: eu-central-1 region: eu-central-1
......
...@@ -589,7 +589,7 @@ In the examples below we set the Registry's port to `5001`. ...@@ -589,7 +589,7 @@ In the examples below we set the Registry's port to `5001`.
[`http:addr`](https://docs.docker.com/registry/configuration/#http) value: [`http:addr`](https://docs.docker.com/registry/configuration/#http) value:
```yaml ```yaml
http http:
addr: localhost:5001 addr: localhost:5001
``` ```
...@@ -1065,7 +1065,7 @@ Start with a value between `25000000` (25MB) and `50000000` (50MB). ...@@ -1065,7 +1065,7 @@ Start with a value between `25000000` (25MB) and `50000000` (50MB).
s3: s3:
accesskey: 'AKIAKIAKI' accesskey: 'AKIAKIAKI'
secretkey: 'secret123' secretkey: 'secret123'
bucket: 'gitlab-registry-bucket-AKIAKIAKI' bucket: 'gitlab-registry-bucket-AKIAKIAKI'
chunksize: 25000000 chunksize: 25000000
``` ```
......
...@@ -135,28 +135,28 @@ This section describes the earlier configuration format. ...@@ -135,28 +135,28 @@ This section describes the earlier configuration format.
## ##
## The location where build dependency_proxy are stored (default: shared/dependency_proxy). ## The location where build dependency_proxy are stored (default: shared/dependency_proxy).
## ##
#storage_path: shared/dependency_proxy # storage_path: shared/dependency_proxy
object_store: object_store:
enabled: false enabled: false
remote_directory: dependency_proxy # The bucket name. remote_directory: dependency_proxy # The bucket name.
#direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false). # direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false).
#background_upload: true # Temporary option to limit automatic upload (Default: true). # background_upload: true # Temporary option to limit automatic upload (Default: true).
#proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage. # proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage.
connection: connection:
##
## If the provider is AWS S3, use the following
##
provider: AWS
region: us-east-1
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
## ##
## If the provider is AWS S3, uncomment the following ## If the provider is other than AWS (an S3-compatible one), comment out the previous 4 lines and use the following instead:
## ##
#provider: AWS # host: 's3.amazonaws.com' # default: s3.amazonaws.com.
#region: us-east-1 # aws_signature_version: 4 # For creation of signed URLs. Set to 2 if provider does not support v4.
#aws_access_key_id: AWS_ACCESS_KEY_ID # endpoint: 'https://s3.amazonaws.com' # Useful for S3-compliant services such as DigitalOcean Spaces.
#aws_secret_access_key: AWS_SECRET_ACCESS_KEY # path_style: false # If true, use 'host/bucket_name/object' instead of 'bucket_name.host/object'.
##
## If the provider is other than AWS (an S3-compatible one), uncomment the following
##
#host: 's3.amazonaws.com' # default: s3.amazonaws.com.
#aws_signature_version: 4 # For creation of signed URLs. Set to 2 if provider does not support v4.
#endpoint: 'https://s3.amazonaws.com' # Useful for S3-compliant services such as DigitalOcean Spaces.
#path_style: false # If true, use 'host/bucket_name/object' instead of 'bucket_name.host/object'.
``` ```
1. [Restart GitLab](../restart_gitlab.md#installations-from-source "How to restart GitLab") for the changes to take effect. 1. [Restart GitLab](../restart_gitlab.md#installations-from-source "How to restart GitLab") for the changes to take effect.
...@@ -142,33 +142,33 @@ We recommend using the [consolidated object storage settings](../object_storage. ...@@ -142,33 +142,33 @@ We recommend using the [consolidated object storage settings](../object_storage.
1. Edit the `packages` section in `config/gitlab.yml` (uncomment where necessary): 1. Edit the `packages` section in `config/gitlab.yml` (uncomment where necessary):
```yaml ```yaml
packages: packages:
enabled: true enabled: true
##
## The location where build packages are stored (default: shared/packages).
##
# storage_path: shared/packages
object_store:
enabled: false
remote_directory: packages # The bucket name.
# direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false).
# background_upload: true # Temporary option to limit automatic upload (Default: true).
# proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage.
connection:
## ##
## The location where build packages are stored (default: shared/packages). ## If the provider is AWS S3, use the following:
## ##
#storage_path: shared/packages provider: AWS
object_store: region: us-east-1
enabled: false aws_access_key_id: AWS_ACCESS_KEY_ID
remote_directory: packages # The bucket name. aws_secret_access_key: AWS_SECRET_ACCESS_KEY
#direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false). ##
#background_upload: true # Temporary option to limit automatic upload (Default: true). ## If the provider is other than AWS (an S3-compatible one), comment out the previous 4 lines and use the following instead:
#proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage. ##
connection: # host: 's3.amazonaws.com' # default: s3.amazonaws.com.
## # aws_signature_version: 4 # For creation of signed URLs. Set to 2 if provider does not support v4.
## If the provider is AWS S3, uncomment the following # endpoint: 'https://s3.amazonaws.com' # Useful for S3-compliant services such as DigitalOcean Spaces.
## # path_style: false # If true, use 'host/bucket_name/object' instead of 'bucket_name.host/object'.
#provider: AWS
#region: us-east-1
#aws_access_key_id: AWS_ACCESS_KEY_ID
#aws_secret_access_key: AWS_SECRET_ACCESS_KEY
##
## If the provider is other than AWS (an S3-compatible one), uncomment the following
##
#host: 's3.amazonaws.com' # default: s3.amazonaws.com.
#aws_signature_version: 4 # For creation of signed URLs. Set to 2 if provider does not support v4.
#endpoint: 'https://s3.amazonaws.com' # Useful for S3-compliant services such as DigitalOcean Spaces.
#path_style: false # If true, use 'host/bucket_name/object' instead of 'bucket_name.host/object'.
``` ```
1. Save the file and [restart GitLab](../restart_gitlab.md#installations-from-source) for the changes to take effect. 1. Save the file and [restart GitLab](../restart_gitlab.md#installations-from-source) for the changes to take effect.
......
...@@ -103,7 +103,7 @@ the secrets stored in Vault by defining them with the `vault` keyword: ...@@ -103,7 +103,7 @@ the secrets stored in Vault by defining them with the `vault` keyword:
```yaml ```yaml
secrets: secrets:
DATABASE_PASSWORD: DATABASE_PASSWORD:
vault: production/db/password@ops # translates to secret `ops/data/production/db`, field `password` vault: production/db/password@ops # translates to secret `ops/data/production/db`, field `password`
``` ```
In this example: In this example:
......
...@@ -103,8 +103,8 @@ variables: ...@@ -103,8 +103,8 @@ variables:
You can then call its value in your script: You can then call its value in your script:
```yaml ```yaml
script: script:
- echo "$TEST" - echo "$TEST"
``` ```
For more details, see [`.gitlab-ci.yml` defined variables](#gitlab-ciyml-defined-variables). For more details, see [`.gitlab-ci.yml` defined variables](#gitlab-ciyml-defined-variables).
......
...@@ -1547,7 +1547,7 @@ docker build: ...@@ -1547,7 +1547,7 @@ docker build:
- Dockerfile - Dockerfile
- docker/scripts/* - docker/scripts/*
when: manual when: manual
# - when: never would be redundant here, this is implied any time rules are listed. # - when: never would be redundant here, this is implied any time rules are listed.
``` ```
Keywords such as `branches` or `refs` that are currently available for Keywords such as `branches` or `refs` that are currently available for
...@@ -4074,7 +4074,7 @@ field to fetch the value for: ...@@ -4074,7 +4074,7 @@ field to fetch the value for:
job: job:
secrets: secrets:
DATABASE_PASSWORD: DATABASE_PASSWORD:
vault: production/db/password # translates to secret `kv-v2/data/production/db`, field `password` vault: production/db/password # translates to secret `kv-v2/data/production/db`, field `password`
``` ```
You can specify a custom secrets engine path by adding a suffix starting with `@`: You can specify a custom secrets engine path by adding a suffix starting with `@`:
...@@ -4083,7 +4083,7 @@ You can specify a custom secrets engine path by adding a suffix starting with `@ ...@@ -4083,7 +4083,7 @@ You can specify a custom secrets engine path by adding a suffix starting with `@
job: job:
secrets: secrets:
DATABASE_PASSWORD: DATABASE_PASSWORD:
vault: production/db/password@ops # translates to secret `ops/data/production/db`, field `password` vault: production/db/password@ops # translates to secret `ops/data/production/db`, field `password`
``` ```
In the detailed form of the syntax, you can specify all details explicitly: In the detailed form of the syntax, you can specify all details explicitly:
......
...@@ -330,7 +330,6 @@ create_package: ...@@ -330,7 +330,6 @@ create_package:
- conan new <package-name>/0.1 -t - conan new <package-name>/0.1 -t
- conan create . <group-name>+<project-name>/stable - conan create . <group-name>+<project-name>/stable
- CONAN_LOGIN_USERNAME=ci_user CONAN_PASSWORD=${CI_JOB_TOKEN} conan upload <package-name>/0.1@<group-name>+<project-name>/stable --all --remote=gitlab - CONAN_LOGIN_USERNAME=ci_user CONAN_PASSWORD=${CI_JOB_TOKEN} conan upload <package-name>/0.1@<group-name>+<project-name>/stable --all --remote=gitlab
``` ```
You can find additional Conan images to use as the base of your CI file You can find additional Conan images to use as the base of your CI file
......
...@@ -307,15 +307,15 @@ in addition to the steps in the ...@@ -307,15 +307,15 @@ in addition to the steps in the
Below is an example of what your `.gitlab-ci.yml` should look like: Below is an example of what your `.gitlab-ci.yml` should look like:
```yaml ```yaml
build: build:
image: $CI_REGISTRY/group/project/docker:19.03.12 image: $CI_REGISTRY/group/project/docker:19.03.12
services: services:
- name: $CI_REGISTRY/group/project/docker:19.03.12-dind - name: $CI_REGISTRY/group/project/docker:19.03.12-dind
alias: docker alias: docker
stage: build stage: build
script: script:
- docker build -t my-docker-image . - docker build -t my-docker-image .
- docker run my-docker-image /script/to/run/tests - docker run my-docker-image /script/to/run/tests
``` ```
If you forget to set the service alias, the `docker:19.03.12` image is unable to find the If you forget to set the service alias, the `docker:19.03.12` image is unable to find the
......
...@@ -250,21 +250,21 @@ is updated: ...@@ -250,21 +250,21 @@ is updated:
1. Add a `deploy` job to your `.gitlab-ci.yml` file: 1. Add a `deploy` job to your `.gitlab-ci.yml` file:
```yaml ```yaml
image: mcr.microsoft.com/dotnet/core/sdk:3.1 image: mcr.microsoft.com/dotnet/core/sdk:3.1
stages: stages:
- deploy - deploy
deploy: deploy:
stage: deploy stage: deploy
script: script:
- dotnet restore -p:Configuration=Release - dotnet restore -p:Configuration=Release
- dotnet build -c Release - dotnet build -c Release
- dotnet pack -c Release - dotnet pack -c Release
- dotnet nuget add source "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text - dotnet nuget add source "$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/packages/nuget/index.json" --name gitlab --username gitlab-ci-token --password $CI_JOB_TOKEN --store-password-in-clear-text
- dotnet nuget push "bin/Release/*.nupkg" --source gitlab - dotnet nuget push "bin/Release/*.nupkg" --source gitlab
only: only:
- master - master
``` ```
1. Commit the changes and push it to your GitLab repository to trigger a new CI build. 1. Commit the changes and push it to your GitLab repository to trigger a new CI build.
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