Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
gitlab-ci: Update postgres connection details
Browse files Browse the repository at this point in the history
Docker links the containers differently than was priorly assumed for
GitLab CI. As such the out-of-the-box settings weren't properly working.
This change resolves that in the CI YAML definitions to isolate the
changes from local setups.
  • Loading branch information
ZJvandeWeg committed Feb 24, 2021
1 parent 7ac8398 commit 23513bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion genny/ci/templates/-dot-gitlab-ci.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ stages:
GO_ENV: "test"
{{- if eq .opts.DBType "postgres" }}
POSTGRES_DB: "{{.opts.App.Name.File}}_test"
POSTGRES_USER: runner
POSTGRES_PASSSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
TEST_DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
{{- else if eq .opts.DBType "mysql" }}
MYSQL_DATABASE: "{{.opts.App.Name.File}}_test"
MYSQL_ROOT_PASSWORD: "root"
{{- end }}
TEST_DATABASE_URL: "{{.testDbUrl}}"
{{- end }}

# Golang version choice helper
.use-golang-image: &use-golang-latest
Expand Down

0 comments on commit 23513bb

Please sign in to comment.