mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-23 00:47:51 +00:00
Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
@ -16,12 +16,9 @@ rspec:
|
||||
services:
|
||||
- name: postgres:${POSTGRES_VERSION}
|
||||
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
|
||||
needs:
|
||||
- project: $CI_PROJECT_PATH
|
||||
job: "db:setup pg16"
|
||||
ref: "master"
|
||||
artifacts: true
|
||||
before_script:
|
||||
- |
|
||||
curl -o structure.sql -fsSL --retry 3 --header "JOB-TOKEN: $CI_JOB_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/files/db%2Fstructure.sql/raw?ref=master"
|
||||
- echo -e "\e[0Ksection_start:`date +%s`:postgresql16\r\e[0KInstalling PostgreSQL 16"
|
||||
- curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
|
||||
- echo "deb https://apt.postgresql.org/pub/repos/apt $(. /etc/os-release && echo "$VERSION_CODENAME")-pgdg main" > /etc/apt/sources.list.d/pgdg.list
|
||||
@ -29,7 +26,8 @@ rspec:
|
||||
- echo -e "\e[0Ksection_end:`date +%s`:postgresql16\r\e[0K"
|
||||
- psql -h postgres -U $POSTGRES_USER -c 'create database gitlabhq_test;'
|
||||
- psql -h postgres -U $POSTGRES_USER -c 'create database gitlabhq_ci_test;'
|
||||
- psql -h postgres -U $POSTGRES_USER -q < pg_dumpall.sql > /dev/null
|
||||
- psql -h postgres -U $POSTGRES_USER -d gitlabhq_test -q < structure.sql > /dev/null
|
||||
- psql -h postgres -U $POSTGRES_USER -d gitlabhq_ci_test -q < structure.sql > /dev/null
|
||||
- cp gems/gitlab-backup-cli/spec/fixtures/config/database.yml config/
|
||||
- "sed -i \"s/username: postgres$/username: $POSTGRES_USER/g\" config/database.yml"
|
||||
- "sed -i \"s/password:\\s*$/password: $POSTGRES_PASSWORD/g\" config/database.yml"
|
||||
|
Reference in New Issue
Block a user