Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/services/index.md')
-rw-r--r--doc/ci/services/index.md25
1 files changed, 18 insertions, 7 deletions
diff --git a/doc/ci/services/index.md b/doc/ci/services/index.md
index bbd2f822481..f26751c56e7 100644
--- a/doc/ci/services/index.md
+++ b/doc/ci/services/index.md
@@ -9,7 +9,7 @@ type: index
# Services **(FREE)**
When you configure CI/CD, you specify an image, which is used to create the container
-where your jobs will run. To specify this image, you use the `image` keyword.
+where your jobs run. To specify this image, you use the `image` keyword.
You can specify an additional image by using the `services` keyword. This additional
image is used to create another container, which is available to the first container.
@@ -77,6 +77,12 @@ still succeeds even if that warning was printed. For example:
as a volume under `/builds`). In that case, the service does its job, and
because the job is not trying to connect to it, it does not fail.
+If the services start successfully, they start before the
+[`before_script`](../../ci/yaml/index.md#before_script) runs. This means you can
+write a `before_script` that queries the service.
+
+Services stop at the end of the job, even if the job fails.
+
## What services are not for
As mentioned before, this feature is designed to provide **network accessible**
@@ -343,7 +349,7 @@ services:
command: ["/usr/bin/super-sql", "run"]
```
-The syntax of `command` is similar to [Dockerfile's `CMD`](https://docs.docker.com/engine/reference/builder/#cmd).
+The syntax of `command` is similar to [Dockerfile `CMD`](https://docs.docker.com/engine/reference/builder/#cmd).
## Using `services` with `docker run` (Docker-in-Docker) side-by-side
@@ -398,10 +404,10 @@ time.
Logs generated by applications running in service containers can be captured for subsequent examination and debugging.
You might want to look at service container's logs when the service container has started successfully, but is not
-behaving es expected, leading to job failures. The logs can indicate missing or incorrect configuration of the service
+behaving as expected, leading to job failures. The logs can indicate missing or incorrect configuration of the service
within the container.
-`CI_DEBUG_SERVICES` should only by enabled when service containers are being actively debugged as there are both storage
+`CI_DEBUG_SERVICES` should only be enabled when service containers are being actively debugged as there are both storage
and performance consequences to capturing service container logs.
To enable service logging, add the `CI_DEBUG_SERVICES` variable to the project's
@@ -417,10 +423,10 @@ Accepted values are:
- Enabled: `TRUE`, `true`, `True`
- Disabled: `FALSE`, `false`, `False`
-Any other values will result in an error message and effectively disable the feature.
+Any other values result in an error message and effectively disable the feature.
-When enabled, logs for _all_ service containers will be captured and streamed into the jobs trace log concurrently with
-other logs. Logs from each container will be prefixed with the container's aliases, and displayed in a different color.
+When enabled, logs for _all_ service containers are captured and streamed into the jobs trace log concurrently with
+other logs. Logs from each container are prefixed with the container's aliases, and displayed in a different color.
NOTE:
You may want to adjust the logging level in the service container for which you want to capture logs since the default
@@ -490,3 +496,8 @@ creation.
## Security when using services containers
Docker privileged mode applies to services. This means that the service image container can access the host system. You should use container images from trusted sources only.
+
+## Shared /builds directory
+
+Services can access files from the build because all services have the job
+directory mounted as a volume under `/builds`.