diff options
Diffstat (limited to '.gitlab/ci/package-and-test/main.gitlab-ci.yml')
-rw-r--r-- | .gitlab/ci/package-and-test/main.gitlab-ci.yml | 307 |
1 files changed, 213 insertions, 94 deletions
diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml index e90c0bbc7c4..fcea49e3103 100644 --- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml +++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml @@ -20,30 +20,6 @@ check-release-set: echo "Omnibus installation image is set to '$RELEASE'" fi -trigger-omnibus-env: - extends: - - .trigger-omnibus-env - - .rules:omnibus-build - -trigger-omnibus-env-ce: - extends: - - .trigger-omnibus-env-ce - - .rules:omnibus-build-ce - -trigger-omnibus: - extends: - - .trigger-omnibus - - .rules:omnibus-build - needs: - - trigger-omnibus-env - -trigger-omnibus-ce: - extends: - - .trigger-omnibus-ce - - .rules:omnibus-build-ce - needs: - - trigger-omnibus-env-ce - download-knapsack-report: extends: - .download-knapsack-report @@ -103,6 +79,19 @@ instance-ff-inverse: # ------------------------------------------ # Jobs with parallel variant # ------------------------------------------ + +# ========== instance =========== +instance: + extends: + - .parallel + - .qa + variables: + QA_SCENARIO: Test::Instance::Image + rules: + - !reference [.rules:test:feature-flags-set, rules] # always run instance to validate ff change + - !reference [.rules:test:qa-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + instance-selective: extends: .qa variables: @@ -110,12 +99,31 @@ instance-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -instance: + +instance-selective-parallel: extends: - .parallel - - instance-selective + - .qa + variables: + QA_SCENARIO: Test::Instance::Image + rules: + - !reference [.rules:test:qa-selective-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== praefect =========== + +praefect: + extends: + - .parallel + - .qa + parallel: 2 + variables: + QA_SCENARIO: Test::Integration::Praefect + QA_CAN_TEST_PRAEFECT: "true" + KNAPSACK_TEST_FILE_PATTERN: "qa/specs/features/**/3_create/**/*_spec.rb" rules: - - !reference [.rules:test:feature-flags-set, rules] # always run instance to validate ff change - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ @@ -127,10 +135,30 @@ praefect-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -praefect: + +praefect-selective-parallel: extends: + - .qa - .parallel - - praefect-selective + parallel: 2 + variables: + QA_SCENARIO: Test::Integration::Praefect + QA_CAN_TEST_PRAEFECT: "true" + KNAPSACK_TEST_FILE_PATTERN: "qa/specs/features/**/3_create/**/*_spec.rb" + rules: + - !reference [.rules:test:qa-selective-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== relative-url =========== + +relative-url: + extends: + - .qa + - .parallel + variables: + QA_SCENARIO: Test::Instance::RelativeUrl rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ @@ -142,10 +170,28 @@ relative-url-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -relative-url: + +relative-url-selective-parallel: extends: + - .qa - .parallel - - relative-url-selective + variables: + QA_SCENARIO: Test::Instance::RelativeUrl + rules: + - !reference [.rules:test:qa-selective-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== decomposition-single-db =========== + +decomposition-single-db: + extends: + - .qa + - .parallel + variables: + QA_SCENARIO: Test::Instance::Image + GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ @@ -158,10 +204,30 @@ decomposition-single-db-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -decomposition-single-db: + +decomposition-single-db-selective-parallel: extends: + - .qa - .parallel - - decomposition-single-db-selective + variables: + QA_SCENARIO: Test::Instance::Image + GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS + rules: + - !reference [.rules:test:qa-selective-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== decomposition-multiple-db =========== + +decomposition-multiple-db: + extends: + - .qa + - .parallel + variables: + QA_SCENARIO: Test::Instance::Image + GITLAB_ALLOW_SEPARATE_CI_DATABASE: "true" + GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db $EXTRA_GITLAB_QA_OPTS rules: - !reference [.rules:test:qa-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ @@ -175,13 +241,33 @@ decomposition-multiple-db-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::All/ -decomposition-multiple-db: + +decomposition-multiple-db-selective-parallel: extends: + - .qa - .parallel - - decomposition-multiple-db-selective + variables: + QA_SCENARIO: Test::Instance::Image + GITLAB_ALLOW_SEPARATE_CI_DATABASE: "true" + GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db $EXTRA_GITLAB_QA_OPTS rules: - - !reference [.rules:test:qa-parallel, rules] + - !reference [.rules:test:qa-selective-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::All/ + variables: + QA_TESTS: "" + +# ========== object-storage =========== + +object-storage: + extends: .qa + parallel: 2 + variables: + QA_SCENARIO: Test::Instance::Image + QA_RSPEC_TAGS: --tag object_storage + GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS + rules: + - !reference [.rules:test:qa-parallel, rules] + - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/ object-storage-selective: extends: .qa @@ -192,12 +278,30 @@ object-storage-selective: rules: - !reference [.rules:test:qa-selective, rules] - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/ -object-storage: - extends: object-storage-selective + +object-storage-selective-parallel: + extends: .qa parallel: 2 + variables: + QA_SCENARIO: Test::Instance::Image + QA_RSPEC_TAGS: --tag object_storage + GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS rules: - - !reference [.rules:test:qa-parallel, rules] + - !reference [.rules:test:qa-selective-parallel, rules] - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/ + variables: + QA_TESTS: "" + +# ========== object-storage-aws =========== + +object-storage-aws: + extends: object-storage + variables: + AWS_S3_ACCESS_KEY: $QA_AWS_S3_ACCESS_KEY + AWS_S3_BUCKET_NAME: $QA_AWS_S3_BUCKET_NAME + AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID + AWS_S3_REGION: $QA_AWS_S3_REGION + GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS object-storage-aws-selective: extends: object-storage-selective @@ -207,11 +311,27 @@ object-storage-aws-selective: AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID AWS_S3_REGION: $QA_AWS_S3_REGION GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS -object-storage-aws: - extends: object-storage-aws-selective - parallel: 2 - rules: - - !reference [object-storage, rules] + +object-storage-aws-selective-parallel: + extends: object-storage-selective-parallel + variables: + AWS_S3_ACCESS_KEY: $QA_AWS_S3_ACCESS_KEY + AWS_S3_BUCKET_NAME: $QA_AWS_S3_BUCKET_NAME + AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID + AWS_S3_REGION: $QA_AWS_S3_REGION + GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS + + +# ========== object-storage-gcs =========== + +object-storage-gcs: + extends: object-storage + variables: + GCS_BUCKET_NAME: $QA_GCS_BUCKET_NAME + GOOGLE_PROJECT: $QA_GOOGLE_PROJECT + GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY + GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL + GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS object-storage-gcs-selective: extends: object-storage-selective @@ -221,55 +341,19 @@ object-storage-gcs-selective: GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS -object-storage-gcs: - extends: object-storage-gcs-selective - parallel: 2 - rules: - - !reference [object-storage, rules] -packages-selective: - extends: .qa +object-storage-gcs-selective-parallel: + extends: object-storage-selective-parallel variables: - QA_SCENARIO: Test::Instance::Image - QA_RSPEC_TAGS: --tag packages - GITLAB_QA_OPTS: --omnibus-config packages $EXTRA_GITLAB_QA_OPTS - rules: - - !reference [.rules:test:qa-selective, rules] - - if: $QA_SUITES =~ /Test::Instance::Packages/ -packages: - extends: packages-selective - parallel: 2 - rules: - - !reference [.rules:test:qa-parallel, rules] - - if: $QA_SUITES =~ /Test::Instance::Packages/ + GCS_BUCKET_NAME: $QA_GCS_BUCKET_NAME + GOOGLE_PROJECT: $QA_GOOGLE_PROJECT + GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY + GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL + GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS # ------------------------------------------ # Non parallel jobs # ------------------------------------------ -update-minor: - extends: - - .qa - - .update-script - variables: - UPDATE_TYPE: minor - QA_RSPEC_TAGS: --tag smoke - rules: - - !reference [.rules:test:update, rules] - - if: $QA_SUITES =~ /Test::Instance::Smoke/ - - !reference [.rules:test:manual, rules] - -update-major: - extends: - - .qa - - .update-script - variables: - UPDATE_TYPE: major - QA_RSPEC_TAGS: --tag smoke - rules: - - !reference [.rules:test:update, rules] - - if: $QA_SUITES =~ /Test::Instance::Smoke/ - - !reference [.rules:test:manual, rules] - gitlab-pages: extends: .qa variables: @@ -474,7 +558,7 @@ elasticsearch: - !reference [.rules:test:manual, rules] registry-object-storage-tls: - extends: object-storage-aws-selective + extends: object-storage-aws-selective-parallel variables: QA_SCENARIO: Test::Integration::RegistryTLS QA_RSPEC_TAGS: "" @@ -491,6 +575,47 @@ importers: - if: $QA_SUITES =~ /Test::Integration::Import/ - !reference [.rules:test:manual, rules] +# ------------------------------------------ +# Update jobs +# ------------------------------------------ +update-minor: + extends: + - .qa + - .update-script + variables: + UPDATE_TYPE: minor + QA_RSPEC_TAGS: --tag smoke + rules: + - !reference [.rules:test:update, rules] + - if: $QA_SUITES =~ /Test::Instance::Smoke/ + - !reference [.rules:test:manual, rules] + +update-major: + extends: + - .qa + - .update-script + variables: + UPDATE_TYPE: major + QA_RSPEC_TAGS: --tag smoke + rules: + - !reference [.rules:test:update, rules] + - if: $QA_SUITES =~ /Test::Instance::Smoke/ + - !reference [.rules:test:manual, rules] + +update-ee-to-ce: + extends: + - .qa + - .update-script + variables: + UPDATE_TYPE: minor + UPDATE_FROM_EDITION: ee + QA_RSPEC_TAGS: --tag smoke + rules: + - !reference [.rules:test:ce-only, rules] + - !reference [.rules:test:update, rules] + - if: $QA_SUITES =~ /Test::Instance::Smoke/ + - !reference [.rules:test:manual, rules] + # ========================================== # Post test stage # ========================================== @@ -502,18 +627,12 @@ e2e-test-report: upload-knapsack-report: extends: - .upload-knapsack-report - - .rules:report:process-results export-test-metrics: extends: - .export-test-metrics - .rules:report:process-results -relate-test-failures: - extends: - - .relate-test-failures - - .rules:report:process-results - generate-test-session: extends: - .generate-test-session |