-
- Downloads
There was an error fetching the commit references. Please try again later.
Merge branch 'yaml-variables' into 'master'
Support yaml variables This MR introduces ability to define variables from YAML. ```yaml variables: DB_NAME: postgres test: script: echo $DB_NAME ``` The variables are passed using the same API as Secure Variables. The API introduces additional parameter: public. All variables defined in YAML are marked as public. The GitLab Runner when detects public variables will pass them to the services. This makes it easy to fine tune linked services to for example define database name. ```yaml services: - postgres variables: POSTGRES_DB: gitlab ``` The above example will run [postgres](https://registry.hub.docker.com/u/library/postgres/) and pass POSTGRES_DB to postgres container making it to create `gitlab` database instead of default `postges`. **Note:** All variables will passed to all service containers. It's not designed to distinguish which variable should go where. /cc @sytses @vsizov @dzaporozhets See merge request !227
No related branches found
No related tags found
Showing
- CHANGELOG 1 addition, 0 deletionsCHANGELOG
- app/models/build.rb 19 additions, 1 deletionapp/models/build.rb
- doc/docker/using_docker_images.md 33 additions, 0 deletionsdoc/docker/using_docker_images.md
- doc/variables/README.md 30 additions, 2 deletionsdoc/variables/README.md
- doc/yaml/README.md 16 additions, 0 deletionsdoc/yaml/README.md
- lib/api/entities.rb 1 addition, 5 deletionslib/api/entities.rb
- lib/gitlab_ci_yaml_processor.rb 12 additions, 2 deletionslib/gitlab_ci_yaml_processor.rb
- spec/lib/gitlab_ci_yaml_processor_spec.rb 32 additions, 1 deletionspec/lib/gitlab_ci_yaml_processor_spec.rb
- spec/requests/api/builds_spec.rb 4 additions, 1 deletionspec/requests/api/builds_spec.rb
- spec/support/gitlab_stubs/gitlab_ci.yml 3 additions, 0 deletionsspec/support/gitlab_stubs/gitlab_ci.yml
Please register or sign in to comment