Commit cf76d567 authored by Nick Thomas's avatar Nick Thomas

Merge branch '208836-run-pg-10-by-default' into 'master'

Run tests against PG10 by default

See merge request gitlab-org/gitlab!28116
parents a3b9bd70 dea33ff4
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-9.6-graphicsmagick-1.3.34" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
stages: stages:
- sync - sync
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
- .default-retry - .default-retry
- .default-cache - .default-cache
- .default-before_script - .default-before_script
- .use-pg9 - .use-pg10
stage: test stage: test
needs: ["setup-test-env"] needs: ["setup-test-env pg10"]
variables: variables:
FIXTURE_PATH: "db/fixtures/development" FIXTURE_PATH: "db/fixtures/development"
SEED_CYCLE_ANALYTICS: "true" SEED_CYCLE_ANALYTICS: "true"
...@@ -26,7 +26,7 @@ run-dev-fixtures-ee: ...@@ -26,7 +26,7 @@ run-dev-fixtures-ee:
extends: extends:
- .run-dev-fixtures - .run-dev-fixtures
- .dev-fixtures:rules:ee-only - .dev-fixtures:rules:ee-only
- .use-pg9-ee - .use-pg10-ee
script: script:
- scripts/gitaly-test-spawn - scripts/gitaly-test-spawn
- cp ee/db/fixtures/development/* $FIXTURE_PATH - cp ee/db/fixtures/development/* $FIXTURE_PATH
......
...@@ -66,9 +66,9 @@ graphql-reference-verify: ...@@ -66,9 +66,9 @@ graphql-reference-verify:
- .default-cache - .default-cache
- .default-before_script - .default-before_script
- .docs:rules:graphql-reference-verify - .docs:rules:graphql-reference-verify
- .use-pg9 - .use-pg10
stage: test stage: test
needs: ["setup-test-env"] needs: ["setup-test-env pg10"]
script: script:
- bundle exec rake gitlab:graphql:check_docs - bundle exec rake gitlab:graphql:check_docs
- bundle exec rake gitlab:graphql:check_schema - bundle exec rake gitlab:graphql:check_schema
...@@ -135,13 +135,9 @@ compile-assets pull-cache as-if-foss: ...@@ -135,13 +135,9 @@ compile-assets pull-cache as-if-foss:
- .default-retry - .default-retry
- .default-cache - .default-cache
- .default-before_script - .default-before_script
- .use-pg9 - .use-pg10
stage: fixtures stage: fixtures
needs: needs: ["setup-test-env pg10", "compile-assets pull-cache"]
- job: "setup-test-env"
artifacts: true
- job: "compile-assets pull-cache"
artifacts: true
script: script:
- date - date
- scripts/gitaly-test-spawn - scripts/gitaly-test-spawn
...@@ -270,7 +266,6 @@ coverage-frontend: ...@@ -270,7 +266,6 @@ coverage-frontend:
.qa-frontend-node: .qa-frontend-node:
extends: extends:
- .default-retry - .default-retry
- .default-cache
- .frontend:rules:qa-frontend-node - .frontend:rules:qa-frontend-node
stage: test stage: test
dependencies: [] dependencies: []
...@@ -300,7 +295,7 @@ webpack-dev-server: ...@@ -300,7 +295,7 @@ webpack-dev-server:
- .default-cache - .default-cache
- .frontend:rules:default-frontend-jobs - .frontend:rules:default-frontend-jobs
stage: test stage: test
needs: ["setup-test-env", "compile-assets pull-cache"] needs: ["setup-test-env pg10", "compile-assets pull-cache"]
variables: variables:
WEBPACK_MEMORY_TEST: "true" WEBPACK_MEMORY_TEST: "true"
WEBPACK_VENDOR_DLL: "true" WEBPACK_VENDOR_DLL: "true"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
# Jobs that only need to pull cache # Jobs that only need to pull cache
.default-cache: .default-cache:
cache: cache:
key: "debian-stretch-ruby-2.6.5-pg9.6-node-12.x" key: "debian-stretch-ruby-2.6.5-pg10-node-12.x"
paths: paths:
- .go/pkg/mod - .go/pkg/mod
- vendor/ruby - vendor/ruby
...@@ -30,12 +30,15 @@ ...@@ -30,12 +30,15 @@
policy: pull policy: pull
.use-pg9: .use-pg9:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-9.6-graphicsmagick-1.3.34"
services: services:
- name: postgres:9.6.17 - name: postgres:9.6.17
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine - name: redis:alpine
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg9-node-12.x"
.use-pg10: .use-pg10:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
...@@ -45,6 +48,8 @@ ...@@ -45,6 +48,8 @@
- name: redis:alpine - name: redis:alpine
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg10-node-12.x"
.use-pg11: .use-pg11:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34"
...@@ -54,8 +59,11 @@ ...@@ -54,8 +59,11 @@
- name: redis:alpine - name: redis:alpine
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg11-node-12.x"
.use-pg9-ee: .use-pg9-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-9.6-graphicsmagick-1.3.34"
services: services:
- name: postgres:9.6.17 - name: postgres:9.6.17
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
...@@ -63,6 +71,8 @@ ...@@ -63,6 +71,8 @@
- name: elasticsearch:6.4.2 - name: elasticsearch:6.4.2
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg9-node-12.x"
.use-pg10-ee: .use-pg10-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
...@@ -73,6 +83,8 @@ ...@@ -73,6 +83,8 @@
- name: elasticsearch:6.4.2 - name: elasticsearch:6.4.2
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg10-node-12.x"
.use-pg11-ee: .use-pg11-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.14-git-2.26-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-11-graphicsmagick-1.3.34"
...@@ -83,6 +95,8 @@ ...@@ -83,6 +95,8 @@
- name: elasticsearch:6.4.2 - name: elasticsearch:6.4.2
variables: variables:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
cache:
key: "debian-stretch-ruby-2.6.5-pg11-node-12.x"
.as-if-foss: .as-if-foss:
variables: variables:
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
memory-static: memory-static:
extends: .only-code-memory-job-base extends: .only-code-memory-job-base
stage: test stage: test
needs: needs: ["setup-test-env pg10"]
- job: setup-test-env
artifacts: true
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
script: script:
...@@ -40,11 +38,7 @@ memory-on-boot: ...@@ -40,11 +38,7 @@ memory-on-boot:
- .only-code-memory-job-base - .only-code-memory-job-base
- .use-pg10 - .use-pg10
stage: test stage: test
needs: needs: ["setup-test-env pg10", "compile-assets pull-cache"]
- job: setup-test-env
artifacts: true
- job: compile-assets pull-cache
artifacts: true
variables: variables:
NODE_ENV: "production" NODE_ENV: "production"
RAILS_ENV: "production" RAILS_ENV: "production"
......
pages: pages:
extends: extends:
- .default-retry - .default-retry
- .default-cache
- .pages:rules - .pages:rules
stage: pages stage: pages
dependencies: ["rspec:coverage", "karma", "gitlab:assets:compile pull-cache"] dependencies: ["rspec:coverage", "karma", "gitlab:assets:compile pull-cache"]
......
This diff is collapsed.
...@@ -361,6 +361,7 @@ ...@@ -361,6 +361,7 @@
- <<: *if-master-refs - <<: *if-master-refs
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: on_success when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:master-refs-code-backstage-ee-only: .rails:rules:master-refs-code-backstage-ee-only:
rules: rules:
...@@ -369,12 +370,23 @@ ...@@ -369,12 +370,23 @@
- <<: *if-master-refs - <<: *if-master-refs
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: on_success when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:nightly-master-refs-code-backstage: .rails:rules:nightly-master-refs-code-backstage:
rules: rules:
- <<: *if-nightly-master-schedule - <<: *if-nightly-master-schedule
changes: *code-backstage-patterns changes: *code-backstage-patterns
when: on_success when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:nightly-master-refs-code-backstage-ee-only:
rules:
- <<: *if-not-ee
when: never
- <<: *if-nightly-master-schedule
changes: *code-backstage-patterns
when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:ee-only: .rails:rules:ee-only:
rules: rules:
......
...@@ -7,9 +7,7 @@ cache gems: ...@@ -7,9 +7,7 @@ cache gems:
- .default-before_script - .default-before_script
- .setup:rules:cache-gems - .setup:rules:cache-gems
stage: test stage: test
needs: needs: ["setup-test-env pg10"]
- job: setup-test-env
artifacts: true
variables: variables:
SETUP_DB: "false" SETUP_DB: "false"
script: script:
......
...@@ -176,7 +176,7 @@ graph RL; ...@@ -176,7 +176,7 @@ graph RL;
O[coverage-frontend]; O[coverage-frontend];
N["pages (master only)"]; N["pages (master only)"];
Q[package-and-qa]; Q[package-and-qa];
S["RSpec<br/>(e.g. rspec unit pg9)"] S["RSpec<br/>(e.g. rspec unit pg10)"]
T[retrieve-tests-metadata]; T[retrieve-tests-metadata];
QA["qa:internal, qa:selectors"]; QA["qa:internal, qa:selectors"];
QA2["qa:internal-as-if-foss, qa:selectors-as-if-foss<br/>(EE default refs only)"]; QA2["qa:internal-as-if-foss, qa:selectors-as-if-foss<br/>(EE default refs only)"];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment