summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-06-03 19:31:18 +0000
committerValery Sizov <valery@gitlab.com>2015-06-03 19:31:18 +0000
commit1c8f57504d61fdfa0713cfaf6cb853591938d874 (patch)
tree2adacca39c546a1506b2c5fc523a7649e0349a68
parentc389a94b5b5c8d4637c0f34abb02c94ca0eb3fe1 (diff)
parent6dd23ebb825ccdfc2c11a61a7a36ea4b671c2a67 (diff)
downloadgitlab-ci-1c8f57504d61fdfa0713cfaf6cb853591938d874.tar.gz
Merge branch 'text_fixes' into 'master'
Documentation fixes See merge request !118
-rw-r--r--app/views/shared/_guide.html.haml2
-rw-r--r--doc/builds_configuration/README.md30
2 files changed, 18 insertions, 14 deletions
diff --git a/app/views/shared/_guide.html.haml b/app/views/shared/_guide.html.haml
index 0b47f7e..a1709dd 100644
--- a/app/views/shared/_guide.html.haml
+++ b/app/views/shared/_guide.html.haml
@@ -6,7 +6,7 @@
Add at least one runner to the project.
Go to #{link_to 'Runners page', project_runners_path(@project), target: :blank} for instructions.
%li
- Put the .gitlab-ci.yml in the root of your repository. Examples can be found in #{link_to "Configuraton of your builds with .gitlab-ci.yaml", "http://doc.gitlab.com/ci/builds_configuration/README.html", target: :blank}
+ Put the .gitlab-ci.yml in the root of your repository. Examples can be found in #{link_to "Configuraton of your builds with .gitlab-ci.yml", "http://doc.gitlab.com/ci/builds_configuration/README.html", target: :blank}
%li
Visit #{link_to 'GitLab project settings', @project.gitlab_url + "/services/gitlab_ci/edit", target: :blank}
and press the "Test settings" button.
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"
```