Commit 540a9fac authored by Ben Bodenmiller's avatar Ben Bodenmiller Committed by Marcel Amirault

Use consistent spacing with yaml arrays in docs

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