2

I encountered a problem when running gitlab-runner exec docker ... for a CI stage that has a section with variables containing ports.

    REDIS_HOST: redis
    REDIS_PORT: 6379
    DB_HOST: postgres
    DB_USER: $MYSQL_USER
    DB_PORT: 5432
    DB_SSL: "no"
    DB_PASSWORD: $MYSQL_PASSWORD
    DB_DATABASE: $MYSQL_DB

The error said FATAL: invalid value for variable "REDIS_PORT". The solution is to simply use quotes around the port numbers.

    REDIS_PORT: "6379"
    DB_PORT: "5432"

I just wanted to share this simple fix because I could not find it somewhere else. Note that the --env options for the runner do not affect this.

Sandro Braun
  • 167
  • 7

0 Answers0