Commit 2507dfd2 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'patch-171' into 'master'

Use consistent spacing with yaml arrays in docs

See merge request gitlab-org/gitlab!35894
parents ab2aa5d4 540a9fac
......@@ -256,9 +256,9 @@ cache:
- vendor/
before_script:
# Install and run Composer
- curl --show-error --silent https://getcomposer.org/installer | php
- php composer.phar install
# Install and run Composer
- curl --show-error --silent https://getcomposer.org/installer | php
- php composer.phar install
test:
script:
......@@ -391,11 +391,11 @@ stages:
```yaml
stages:
- build
- test
- build
- test
before_script:
- echo "Hello"
- echo "Hello"
job A:
stage: build
......@@ -483,8 +483,8 @@ cache when the pipeline is run for a second time.
```yaml
stages:
- build
- test
- build
- test
job A:
stage: build
......@@ -520,8 +520,8 @@ will be different):
```yaml
stages:
- build
- test
- build
- test
job A:
stage: build
......
......@@ -176,7 +176,7 @@ You can then use for example the [tutum/wordpress](https://hub.docker.com/r/tutu
```yaml
services:
- tutum/wordpress:latest
- tutum/wordpress:latest
```
If you don't [specify a service alias](#available-settings-for-services),
......@@ -292,7 +292,7 @@ variables:
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --data-checksums"
services:
- name: postgres:11.7
- name: postgres:11.7
alias: db
entrypoint: ["docker-entrypoint.sh"]
command: ["postgres"]
......@@ -302,7 +302,7 @@ image:
entrypoint: ["/bin/bash"]
before_script:
- bundle install
- bundle install
test:
script:
......@@ -378,8 +378,8 @@ would not work properly:
```yaml
services:
- mysql:latest
- mysql:latest
- mysql:latest
- mysql:latest
```
The Runner would start two containers using the `mysql:latest` image, but both
......@@ -392,9 +392,9 @@ look like:
```yaml
services:
- name: mysql:latest
- name: mysql:latest
alias: mysql-1
- name: mysql:latest
- name: mysql:latest
alias: mysql-2
```
......@@ -427,7 +427,7 @@ CMD ["/usr/bin/super-sql", "run"]
# .gitlab-ci.yml
services:
- my-super-sql:latest
- my-super-sql:latest
```
After the new extended Docker configuration options, you can now simply
......@@ -437,7 +437,7 @@ set a `command` in `.gitlab-ci.yml`, like:
# .gitlab-ci.yml
services:
- name: super/sql:latest
- name: super/sql:latest
command: ["/usr/bin/super-sql", "run"]
```
......
......@@ -61,7 +61,7 @@ content:
```yaml
---
applications:
- name: gitlab-hello-world
- name: gitlab-hello-world
random-route: true
memory: 1G
path: target/demo-0.0.1-SNAPSHOT.jar
......
......@@ -76,7 +76,7 @@ environment, let's add it in `.gitlab-ci.yml`:
...
before_script:
- bash ci/docker_install.sh > /dev/null
- bash ci/docker_install.sh > /dev/null
...
```
......@@ -104,7 +104,7 @@ image: php:5.6
before_script:
# Install dependencies
- bash ci/docker_install.sh > /dev/null
- bash ci/docker_install.sh > /dev/null
test:app:
script:
......@@ -119,7 +119,7 @@ with a different Docker image version and the runner will do the rest:
```yaml
before_script:
# Install dependencies
- bash ci/docker_install.sh > /dev/null
- bash ci/docker_install.sh > /dev/null
# We test PHP5.6
test:5.6:
......@@ -142,7 +142,7 @@ add a `before_script` action:
```yaml
before_script:
- cp my_php.ini /usr/local/etc/php/conf.d/test.ini
- cp my_php.ini /usr/local/etc/php/conf.d/test.ini
```
Of course, `my_php.ini` must be present in the root directory of your repository.
......@@ -217,7 +217,7 @@ you can use [atoum](https://github.com/atoum/atoum):
```yaml
before_script:
- wget http://downloads.atoum.org/nightly/mageekguy.atoum.phar
- wget http://downloads.atoum.org/nightly/mageekguy.atoum.phar
test:atoum:
script:
......@@ -242,12 +242,12 @@ cache:
before_script:
# Install composer dependencies
- wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
- php composer-setup.php
- php -r "unlink('composer-setup.php'); unlink('installer.sig');"
- php composer.phar install
- wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
- php composer-setup.php
- php -r "unlink('composer-setup.php'); unlink('installer.sig');"
- php composer.phar install
...
```
......
......@@ -235,9 +235,9 @@ variable is non-zero, `make upload` is run.
```yaml
stages:
- test
- build
- package
- test
- build
- package
run_tests:
stage: test
......
......@@ -3744,9 +3744,9 @@ Combining the individual examples given above for `release`, we'd have the follo
```yaml
stages:
- build
- test
- release-stg
- build
- test
- release-stg
release_job:
stage: release
......@@ -4332,11 +4332,11 @@ Example:
```yaml
.something_before: &something_before
- echo 'something before'
- echo 'something before'
.something_after: &something_after
- echo 'something after'
- echo 'another thing after'
- echo 'something after'
- echo 'another thing after'
job_name:
before_script:
......@@ -4358,7 +4358,7 @@ For example:
```yaml
.something: &something
- echo 'something'
- echo 'something'
job_name:
script:
......
......@@ -152,9 +152,9 @@ Suppose we have the `content/_data/versions.yaml` file with the content:
```yaml
versions:
- 10.6
- 10.5
- 10.4
- 10.6
- 10.5
- 10.4
```
We can then loop over the `versions` array with something like:
......
......@@ -97,7 +97,7 @@ Development, Staging, and Production cluster respectively.
```yaml
stages:
- deploy
- deploy
configure development cluster:
stage: deploy
......
......@@ -127,8 +127,8 @@ And the following environments are set in [`.gitlab-ci.yml`](../../../ci/yaml/RE
```yaml
stages:
- test
- deploy
- test
- deploy
test:
stage: test
......
......@@ -99,8 +99,8 @@ And the following environments are set in
```yaml
stages:
- test
- deploy
- test
- deploy
test:
stage: test
......
......@@ -392,29 +392,19 @@ want to store your package:
image: python:latest
stages:
- deploy
production:
stage: deploy
before_script:
- pip3 install awscli --upgrade
- pip3 install aws-sam-cli --upgrade
script:
- sam build
- sam package --output-template-file packaged.yaml --s3-bucket <S3_bucket_name>
- sam deploy --template-file packaged.yaml --stack-name gitlabpoc --s3-bucket <S3_bucket_name> --capabilities CAPABILITY_IAM --region us-east-1
environment: production
```
```
Let’s examine the configuration file more closely:
......
......@@ -641,7 +641,7 @@ To add a stacked column panel type to a dashboard, look at the following sample
dashboard: 'Dashboard title'
priority: 1
panel_groups:
- group: 'Group Title'
- group: 'Group Title'
priority: 5
panels:
- type: 'stacked-column'
......@@ -659,7 +659,6 @@ panel_groups:
label: "memory query 2"
unit: "count"
series_name: 'group 2'
```
![stacked column panel type](img/prometheus_dashboard_stacked_column_panel_type_v12_8.png)
......
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