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
5bef1dc8
Commit
5bef1dc8
authored
Jul 15, 2019
by
Thad Guidry
Committed by
Evan Read
Jul 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wrong placement of "variables:" statement in yml file.
Verified snippet works with 11.10.1
parent
283361f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
doc/ci/docker/using_docker_images.md
doc/ci/docker/using_docker_images.md
+36
-0
No files found.
doc/ci/docker/using_docker_images.md
View file @
5bef1dc8
...
...
@@ -249,6 +249,42 @@ test:
-
bundle exec rake spec
```
## Passing environment variables to services
You can also pass custom environment
[
variables
](
../variables/README.md
)
to fine tune your Docker
`images`
and
`services`
directly in the
`.gitlab-ci.yml`
file.
For more information, see
[
custom environment variables
](
../variables/README.md#gitlab-ciyml-defined-variables
)
```
yaml
# The following variables will automatically be passed down to the Postgres container
# as well as the Ruby container and available within each.
variables
:
HTTPS_PROXY
:
"
https://10.1.1.1:8090"
HTTP_PROXY
:
"
https://10.1.1.1:8090"
POSTGRES_DB
:
"
my_custom_db"
POSTGRES_USER
:
"
postgres"
POSTGRES_PASSWORD
:
"
example"
PGDATA
:
"
/var/lib/postgresql/data"
POSTGRES_INITDB_ARGS
:
"
--encoding=UTF8
--data-checksums"
services
:
-
name
:
postgres:9.4
alias
:
db
entrypoint
:
[
"
docker-entrypoint.sh"
]
command
:
[
"
postgres"
]
image
:
name
:
ruby:2.2
entrypoint
:
[
"
/bin/bash"
]
before_script
:
-
bundle install
test
:
script
:
-
bundle exec rake spec
```
## Extended Docker configuration options
> Introduced in GitLab and GitLab Runner 9.4.
...
...
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