
April 11, 2019
Build container access for services
Services in build actions are a very popular feature allowing you to test applications that require, for example, a database or a Selenium driver to run.
Three weeks ago we added custom services that enabled tests of microservice applications—a very similar feature to docker compose. Until now, the communication was limited to one side: you could connect to a database or another service from the container that was triggering the tests, but it was impossible to connect the other way back.
We're happy to announce that connections now work both ways.
Network in build action
Scripts defined in a build action are run in a Docker container. The container is launched on the basis of a Docker image configured in the Environment tab.
Once you attach a service to the container, you define the hostname that is used to connect to it:
Services tab
The default name of the services' main container is "MainService". You can change it by clicking the hostname in the Services tab (the input is hidden):
Hostname change
Ports
All default services have predefined ports. For example, the port for MySQL is 3306. The port is listed in the details of each service:
Setting up port
The ports used for communication between the custom service and the main container should be defined in the Docker image.
Share:

Alexander Kus
Customer Success Manager