summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-04-09 13:02:30 +0300
committerValery Sizov <vsv2711@gmail.com>2015-04-09 13:08:36 +0300
commitdaa907e43ffcc38b971bff9675943643efa57a33 (patch)
tree20ee76dea91b576b20e6a16442b8f389dafe960b /doc
parente91a2cf15942af6e90b736eb5d9e2d994f4a023f (diff)
downloadgitlab-ci-daa907e43ffcc38b971bff9675943643efa57a33.tar.gz
Jobs documentation
Diffstat (limited to 'doc')
-rw-r--r--doc/README.md1
-rw-r--r--doc/jobs/README.md46
-rw-r--r--doc/jobs/deploy_job.pngbin0 -> 105081 bytes
-rw-r--r--doc/jobs/job.pngbin0 -> 113858 bytes
4 files changed, 47 insertions, 0 deletions
diff --git a/doc/README.md b/doc/README.md
index 9892d6f..10098e0 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -4,3 +4,4 @@
+ [Examples](examples/README.md)
+ [Install](install/installation.md)
+ [Update](update/README.md)
++ [Jobs](jobs/README.md)
diff --git a/doc/jobs/README.md b/doc/jobs/README.md
new file mode 100644
index 0000000..7c873ac
--- /dev/null
+++ b/doc/jobs/README.md
@@ -0,0 +1,46 @@
+# Jobs
+Jobs are user shell scripts. On each push to the GitLab the CI creates builds for each jobs. Every build will be served by runners where user shell script from job will be performed. There are two types of job: test (run in parallel) and deploy (run on success).
+
+### Test job (run in parallel)
+
+![Jobs](job.png)
+
+This kind of jobs run in parallel and it can be usefull for test suite. For example, to saving your time you can run one part of suite in one build and second part in another build.
+Fields:
+
+`name` - an arbitrary name of job
+
+`builds commit` (checkbox) - it should be checked if you want to create build when regular commit or branch is pushed.
+
+`build tag` (checkbox) - it should be checked if you want to create build when tag is pushed.
+
+_For example in GitLab, we created job for building packages. And we want this packages to be builded when we push new tag. In this case we disabled `builds commit` and enabled `build tag`._
+
+`tags` - the list of tags (ex. "ruby mysql silenium"), only runner which contains the same set of tags can perform this build.
+Script - shell script. Example for rails projects:
+
+```
+export PATH=~/bin:/usr/local/bin:/usr/bin:/bin
+gem install bundler
+cp config/database.yml.mysql config/database.yml
+cp config/application.yml.example config/application.yml
+bundle
+RAILS_ENV=test bundle exec rake db:setup
+RAILS_ENV=test bundle exec rake spec
+```
+
+
+### Deploy job (run on success)
+
+![Deploy jobs](deploy_job.png)
+
+This type of jobs runs after all test jobs succeded. It is usefull for deploy. For example, you want to make sure that whole test suite passes before deploy. Fields:
+
+`name` - an arbitrary name of job
+
+`tags` - If you want to only one runner could run deploy you can rich it by setting appropriate tags. It can be usefull because most likely you will need to grant runner with special permissions.
+
+`refs` - You can specify git refs which should trigger deploy job
+
+`script` - Shell script to run.
+
diff --git a/doc/jobs/deploy_job.png b/doc/jobs/deploy_job.png
new file mode 100644
index 0000000..f940710
--- /dev/null
+++ b/doc/jobs/deploy_job.png
Binary files differ
diff --git a/doc/jobs/job.png b/doc/jobs/job.png
new file mode 100644
index 0000000..760d107
--- /dev/null
+++ b/doc/jobs/job.png
Binary files differ