Skip to content

Commit

Permalink
Ensure database created
Browse files Browse the repository at this point in the history
  • Loading branch information
vrajmohan committed Dec 12, 2024
1 parent 8e57f86 commit 1679485
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1679485

Please sign in to comment.