Commit 7c61599f authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch '215053-tests-against-pg9' into 'master'

Test against PG9 by default, PG11 in master, and PG10 nightly

Closes #215053

See merge request gitlab-org/gitlab!30293
parents d41db64a ce9229c0
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:
- sync
- prepare
......@@ -16,6 +14,7 @@ stages:
# in cases where jobs require Docker-in-Docker, the job
# definition must be extended with `.use-docker-in-docker`
default:
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"
tags:
- gitlab-org
# All jobs are interruptible by default
......
......@@ -3,9 +3,9 @@
- .default-retry
- .default-cache
- .default-before_script
- .use-pg11
- .use-pg9
stage: test
needs: ["setup-test-env pg11"]
needs: ["setup-test-env pg9"]
variables:
FIXTURE_PATH: "db/fixtures/development"
SEED_CYCLE_ANALYTICS: "true"
......@@ -26,7 +26,7 @@ run-dev-fixtures-ee:
extends:
- .run-dev-fixtures
- .dev-fixtures:rules:ee-only
- .use-pg11-ee
- .use-pg9-ee
script:
- scripts/gitaly-test-spawn
- cp ee/db/fixtures/development/* $FIXTURE_PATH
......
......@@ -66,9 +66,9 @@ graphql-reference-verify:
- .default-cache
- .default-before_script
- .docs:rules:graphql-reference-verify
- .use-pg11
- .use-pg9
stage: test
needs: ["setup-test-env pg11"]
needs: ["setup-test-env pg9"]
script:
- bundle exec rake gitlab:graphql:check_docs
- bundle exec rake gitlab:graphql:check_schema
......@@ -129,9 +129,9 @@ compile-assets pull-cache as-if-foss:
- .default-retry
- .default-cache
- .default-before_script
- .use-pg11
- .use-pg9
stage: fixtures
needs: ["setup-test-env pg11", "compile-assets pull-cache"]
needs: ["setup-test-env pg9", "compile-assets pull-cache"]
script:
- date
- scripts/gitaly-test-spawn
......
......@@ -8,7 +8,7 @@
memory-static:
extends: .only-code-memory-job-base
stage: test
needs: ["setup-test-env pg11"]
needs: ["setup-test-env pg9"]
variables:
SETUP_DB: "false"
script:
......@@ -36,9 +36,9 @@ memory-static:
memory-on-boot:
extends:
- .only-code-memory-job-base
- .use-pg11
- .use-pg9
stage: test
needs: ["setup-test-env pg11", "compile-assets pull-cache"]
needs: ["setup-test-env pg9", "compile-assets pull-cache"]
variables:
NODE_ENV: "production"
RAILS_ENV: "production"
......
This diff is collapsed.
......@@ -16,6 +16,15 @@
.if-master-refs: &if-master-refs
if: '$CI_COMMIT_REF_NAME == "master"'
.if-master-push: &if-master-push
if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push"'
.if-master-schedule-2-hourly: &if-master-schedule-2-hourly
if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "2-hourly"'
.if-master-schedule-nightly: &if-master-schedule-nightly
if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "nightly"'
.if-auto-deploy-branches: &if-auto-deploy-branches
if: '$CI_COMMIT_BRANCH =~ /^\d+-\d+-auto-deploy-\d+$/'
......@@ -25,9 +34,6 @@
.if-merge-request: &if-merge-request
if: '$CI_MERGE_REQUEST_IID'
.if-nightly-master-schedule: &if-nightly-master-schedule
if: '$NIGHTLY && $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule"'
.if-dot-com-gitlab-org-schedule: &if-dot-com-gitlab-org-schedule
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_PIPELINE_SOURCE == "schedule"'
......@@ -360,36 +366,33 @@
rules:
- <<: *if-default-refs
changes: *code-backstage-patterns
when: on_success
.rails:rules:default-refs-code-backstage-qa:
rules:
- <<: *if-default-refs
changes: *code-backstage-qa-patterns
when: on_success
.rails:rules:master-refs-code-backstage:
.rails:rules:master-push--master-schedule-2-hourly--code-backstage:
rules:
- <<: *if-master-refs
- <<: *if-master-push
changes: *code-backstage-patterns
when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
- <<: *if-master-schedule-2-hourly
- <<: *if-merge-request
changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:nightly-master-refs-code-backstage:
.rails:rules:master-schedule-nightly--code-backstage:
rules:
- <<: *if-nightly-master-schedule
changes: *code-backstage-patterns
when: on_success
- changes: [".gitlab/ci/rails.gitlab-ci.yml"]
- <<: *if-master-schedule-nightly
- <<: *if-merge-request
changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:nightly-master-refs-code-backstage-ee-only:
.rails:rules:master-schedule-nightly--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"]
- <<: *if-master-schedule-nightly
- <<: *if-merge-request
changes: [".gitlab/ci/rails.gitlab-ci.yml"]
.rails:rules:ee-only:
rules:
......@@ -397,7 +400,6 @@
when: never
- <<: *if-default-refs
changes: *code-backstage-patterns
when: on_success
.rails:rules:ee-mr-and-master-only:
rules:
......@@ -412,7 +414,6 @@
rules:
- <<: *if-merge-request
changes: *code-backstage-patterns
when: on_success
##################
# Releases rules #
......
......@@ -7,7 +7,7 @@ cache gems:
- .default-before_script
- .setup:rules:cache-gems
stage: test
needs: ["setup-test-env pg11"]
needs: ["setup-test-env pg9"]
variables:
SETUP_DB: "false"
script:
......
......@@ -32,18 +32,18 @@ update-tests-metadata:
- .test-metadata:rules:update-tests-metadata
stage: post-test
dependencies:
- setup-test-env pg11
- rspec migration pg11
- rspec unit pg11
- rspec integration pg11
- rspec system pg11
- rspec-ee migration pg11
- rspec-ee unit pg11
- rspec-ee integration pg11
- rspec-ee system pg11
- rspec-ee unit pg11 geo
- rspec-ee integration pg11 geo
- rspec-ee system pg11 geo
- setup-test-env pg9
- rspec migration pg9
- rspec unit pg9
- rspec integration pg9
- rspec system pg9
- rspec-ee migration pg9
- rspec-ee unit pg9
- rspec-ee integration pg9
- rspec-ee system pg9
- rspec-ee unit pg9 geo
- rspec-ee integration pg9 geo
- rspec-ee system pg9 geo
cache:
policy: push
script:
......
......@@ -151,15 +151,26 @@ request, be sure to start the `dont-interrupt-me` job before pushing.
## PostgreSQL versions testing
### Current versions testing
| Where? | PG version |
| ------ | ------ |
| MRs | 9.6 |
| `master` (non-scheduled pipelines) | 9.6 / 11 |
| 2-hourly scheduled pipelines | 9.6 / 11 |
| Nightly scheduled pipeline | 9.6 / 10 |
### Long-term plan
We follow the [PostgreSQL versions shipped with Omnibus GitLab](https://docs.gitlab.com/omnibus/package-information/postgresql_versions.html):
| | 12.10 (April 2020) | 13.0 (May 2020) | 13.1 (June 2020) | 13.2 (July 2020) | 13.3 (August 2020) | 13.4, 13.5 | 13.6 (November 2020) | 14.0 (May 2021?) |
| PG version | 12.10 (April 2020) | 13.0 (May 2020) | 13.1 (June 2020) | 13.2 (July 2020) | 13.3 (August 2020) | 13.4, 13.5 | 13.6 (November 2020) | 14.0 (May 2021?) |
| ------ | ------------------ | --------------- | ---------------- | ---------------- | ------------------ | ------------ | -------------------- | ---------------- |
| PG9.6 | nightly | - | - | - | - | - | - | - |
| PG10 | `master` | - | - | - | - | - | - | - |
| PG11 | MRs/`master` | MRs/`master` | MRs/`master` | MRs/`master` | MRs/`master` | MRs/`master` | nightly | - |
| PG12 | - | - | - | - | `master` | `master` | MRs/`master` | `master` |
| PG13 | - | - | - | - | - | - | - | MRs/`master` |
| PG9.6 | MRs/`master`/`2-hour`/`nightly` | - | - | - | - | - | - | - |
| PG10 | `nightly` | - | - | - | - | - | - | - |
| PG11 | `master`/`2-hour` | MRs/`master`/`2-hour`/`nightly` | MRs/`master`/`2-hour`/`nightly` | MRs/`master`/`2-hour`/`nightly` | MRs/`master`/`2-hour`/`nightly` | MRs/`master`/`2-hour`/`nightly` | `nightly` | - |
| PG12 | - | - | - | - | `master`/`2-hour` | `master`/`2-hour` | MRs/`master`/`2-hour`/`nightly` | `master`/`2-hour` |
| PG13 | - | - | - | - | - | - | - | MRs/`master`/`2-hour`/`nightly` |
## Pipeline types
......
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