From 1679485e8b62683d3f6afe1b334bed84adf2a50d Mon Sep 17 00:00:00 2001 From: Vraj Mohan Date: Thu, 12 Dec 2024 09:23:27 -0800 Subject: [PATCH] Ensure database created --- .gitlab-ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ccfe272173..d6aba6f0cbc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -751,17 +751,27 @@ publish_er_diagram: stage: .post needs: - job: build-ci-image + variables: + DOCKER_DB_HOST: db-postgres + POSTGRES_DB: identity_idp_test + POSTGRES_USER: postgres_user + POSTGRES_PASSWORD: postgres_password + POSTGRES_HOST_AUTH_METHOD: trust + RAILS_ENV: test + services: + - name: public.ecr.aws/docker/library/postgres:16.4 + alias: db-postgres + command: ['--fsync=false', '--synchronous_commit=false', '--full_page_writes=false'] cache: - <<: *ruby_cache rules: - if: $CI_COMMIT_BRANCH == "main" - if: $CI_COMMIT_BRANCH == "vm-reinstate-erd" image: "${ECR_REGISTRY}/idp/ci:${CI_COMMIT_SHA}" - variables: - RAILS_ENV: test script: - echo "Publishing ER diagram" - *bundle_install + - bundle exec rake db:create db:migrate --trace - bundle exec rails erd artifacts: paths: