summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-06-03 22:28:13 +0300
committerValery Sizov <vsv2711@gmail.com>2015-06-03 22:28:13 +0300
commit6dd23ebb825ccdfc2c11a61a7a36ea4b671c2a67 (patch)
tree2adacca39c546a1506b2c5fc523a7649e0349a68 /doc
parentc389a94b5b5c8d4637c0f34abb02c94ca0eb3fe1 (diff)
downloadgitlab-ci-6dd23ebb825ccdfc2c11a61a7a36ea4b671c2a67.tar.gz
text fixes
Diffstat (limited to 'doc')
-rw-r--r--doc/builds_configuration/README.md30
1 files changed, 17 insertions, 13 deletions
diff --git a/doc/builds_configuration/README.md b/doc/builds_configuration/README.md
index 9e761bf..2fca14b 100644
--- a/doc/builds_configuration/README.md
+++ b/doc/builds_configuration/README.md
@@ -1,15 +1,12 @@
-## Configuraton of your builds with .gitlab-ci.yaml
+## Configuraton of your builds with .gitlab-ci.yml
From version 7.12, GitLab CI uses a .gitlab-ci.yml file for the configuration of your builds. It is place in the root of your repository and contains four main sections: skep_refs, before_script, jobs and deploy_jobs. Here is an example of how it looks:
-```
+```yaml
skip_refs: staging
before_script: |
- export PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin
- gem install bundler
- cp config/database.yml.mysql config/database.yml
- bundle install --without postgres production --jobs $(nproc)
- bundle exec rake db:create RAILS_ENV=test
+ bundle install
+ bundle exec rake db:setup
jobs:
- script: "bundle exec rspec"
name: Rspec
@@ -27,7 +24,8 @@ This parameter defines the ref or list of refs to skip. You can use glob pattern
### jobs
Here you can specify parameters of your builds. There are serveral ways you can configure it. Using hash:
-```
+
+```yaml
jobs:
- script: "bundle exec rspec" # (required) - commands to run
name: Rspec # (optional) - name of build
@@ -35,20 +33,26 @@ jobs:
branches: true # (optional) - make builds for regular branches
tags: true # (optional) - make builds for tags
```
+
`script` can also cantain several commands using YAML multiline string:
-```
+
+```yaml
- script: |
bundle updata
bundle exec rspec
```
+
you can also fill commands like an array:
-```
+
+```yaml
- script:
- bundle update
- bundle exec rspec
```
+
And there is one more way to specify build configuration, using a string:
-```
+
+```yaml
jobs:
- bundle exec rspec
```
@@ -57,7 +61,7 @@ In this way, the name of the build will be taken from command line.
## deploy_jobs
Deploy Jobs that will be run when all other jobs have succeeded. Define them using a hash:
-```
+```yaml
deploy_jobs:
- script: | # (required) - command
bundle update
@@ -71,7 +75,7 @@ deploy_jobs:
You can also define deploy jobs with a string:
-```
+```yaml
deploy_jobs:
- "bundle exec cap deploy"
```