Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d49b26b3
Commit
d49b26b3
authored
Aug 31, 2021
by
Suzanne Selhorn
Committed by
Amy Qualls
Aug 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added links to network per-build info
parent
f567e0d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
doc/ci/services/index.md
doc/ci/services/index.md
+10
-12
No files found.
doc/ci/services/index.md
View file @
d49b26b3
...
...
@@ -186,18 +186,11 @@ following these rules:
To override the default behavior, you can
[
specify a service alias
](
#available-settings-for-services
)
.
### Connecting Services
> - [Deployed behind a feature flag](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/11751).
### Connecting services
You can use inter-dependent services with complex jobs, like end-to-end tests where an
external API needs to communicate with its own database.
This behavior is currently behind a
[
feature flag
](
https://docs.gitlab.com/runner/configuration/feature-flags.html
)
,
which you can enable by defining the
`FF_NETWORK_PER_BUILD`
CI/CD variable
either in the job or globally.
For example, for an end-to-end test for a front-end application that uses an API, and where the API needs a database:
```
yaml
...
...
@@ -218,6 +211,9 @@ end-to-end-tests:
-
npm test
```
For this solution to work, you must use
[
the networking mode that creates a new network for each job
](
https://docs.gitlab.com/runner/executors/docker.html#create-a-network-for-each-job
)
.
## Passing CI/CD variables to services
You can also pass custom CI/CD
[
variables
](
../variables/index.md
)
...
...
@@ -345,11 +341,10 @@ The syntax of `command` is similar to [Dockerfile's `CMD`](https://docs.docker.c
## Using `services` with `docker run` (Docker-in-Docker) side-by-side
In addition to letting services talk to each other via
`FF_NETWORK_PER_BUILD`
,
containers started via
`docker run`
can also connect to services provided by GitLab.
Containers started with
`docker run`
can also connect to services provided by GitLab.
This can be useful in case booting the service is expensive or time consuming.
This technique will allow running tests from multiple
different client environments,
When booting the service is expensive or time consuming, you can use
this technique to run tests from
different client environments,
while only booting up the tested service once.
```
yaml
...
...
@@ -369,6 +364,9 @@ access-service:
curlimages/curl:7.74.0 curl "http://tutum-wordpress"
```
For this solution to work, you must use
[
the networking mode that creates a new network for each job
](
https://docs.gitlab.com/runner/executors/docker.html#create-a-network-for-each-job
)
.
## How Docker integration works
Below is a high level overview of the steps performed by Docker during job
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment