Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-08-16 08:59:17 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-08-18 07:37:31 +0300
commitff1a5b2fb9221bd5fd34f9ca5f1da36f11892717 (patch)
treee39cef585d1b82e2a51e3eda2fce54da7599f51f /.gitlab-ci.yml
parent5a18fd457658423ddee36f5c3a56d458ddf0c261 (diff)
ci: Avoid duplicated setup of Postgres in test job
The test CI job duplicates the Postgres database setup which is alreay provided by the Postgres template. Let's deduplicate this by including this template.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml11
1 files changed, 2 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 32695d714..5d044c432 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -95,6 +95,7 @@ danger-review:
before_script:
- go version
- git version
+ - while ! psql -h $PGHOST -U $PGUSER -c 'SELECT 1' > /dev/null; do echo "awaiting Postgres service to be ready..." && sleep 1 ; done && echo "Postgres service is ready!"
.pgbouncer_template: &pgbouncer_definition
<<: *postgres_definition
@@ -167,18 +168,10 @@ binaries:
test:
<<: *test_definition
+ <<: *postgres_definition
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-${RUBY_VERSION}-golang-${GO_VERSION}-git-2.31
- services:
- - postgres:${POSTGRES_VERSION}
- variables:
- PGHOST: postgres
- PGPORT: "5432"
- PGUSER: postgres
- POSTGRES_HOST_AUTH_METHOD: trust
script:
- - go version
- _build/deps/git/install/bin/git version
- - while ! psql -h $PGHOST -U $PGUSER -c 'SELECT 1' > /dev/null; do echo "awaiting Postgres service to be ready..." && sleep 1 ; done && echo "Postgres service is ready!"
# This command will make all directories except of our build directory and Ruby code unwritable.
# The purpose is to verify that there is no test which writes into those directories anymore, as
# they should all instead use a temporary directory for runtime data.