Gitlab services mssql

Trying to run mssql by specifying a service in a .gitlab-ci.yml file

include: 'https://s3-us-west-2.amazonaws.com/paciolan-cicd/gitlab/yml/awseb-cicd3.yml'
Build & Test:
  extends: .build_job
  variables:
    SA_PASSWORD: <S00p3rS3cUr3>
    ACCEPT_EULA: Y
  services:
    - microsoft/mssql-server-linux
  only:
    - master

But, how to access this service ? What would be the hostname and the port ?

Thank you

Sincerely,
Manjiri

If you use an aliase the hostname is much clearer. Otherwise the hostname is based off of the image name. see https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services. The port should be the default port for the service since you would be accessing the service directly and not doing a port forward.

e.g.

  services:
    - name: microsoft/mssql-server-linux
      alias: localhost_mssql