Skip to content

use aliases on user defined network

What does this MR do?

This MR adds possibility to use network aliases when using user defined network on docker executor. When configured network is named gitlab-ci-custom then executor creates network such as gitlab-ci-runner-c2dd27cd-project-24-concurrent-0. After build newly created network is removed by excutor.

Why was this MR needed?

I needed my services to communicate between them instead of only test image with services. I have an application with solr, postgres and php, in tests I need to have additional selenium image, during testing solr updates index by fetching documents from postgres service and acceptance tests are run on selenium docker which opens page served from base php image.

Are there points in the code the reviewer needs to double check?

There is condition when custom network is created. I'm not sure if it's proper way to have custom network created only when network-mode is gitlab-ci-custom. Maybe there should be proper option whether to create network or use provided one.

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

none

Merge request reports

Loading