From 6c0e60d4dad7ced1d4b1c53207194213706f69f2 Mon Sep 17 00:00:00 2001 From: Pawel Chojnacki Date: Thu, 7 Mar 2019 15:07:26 +0100 Subject: [PATCH] Cleanup config --- .circleci/config.yml | 170 +++++++++++-------------------------------- 1 file changed, 43 insertions(+), 127 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e211bc331ea..c9510c3a450 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -154,61 +154,15 @@ aliases: store_test_results: path: test-results -# Integrations tests execution - - - &STEP_RUN_INTEGRATIONS_TESTS_54 - run: - command: composer test-integrations-54 - - - &STEP_RUN_INTEGRATIONS_TESTS_56 - run: - command: composer test-integrations-56 - - - &STEP_RUN_INTEGRATIONS_TESTS_70 - run: - command: composer test-integrations-70 - - - &STEP_RUN_INTEGRATIONS_TESTS_71 - run: - command: composer test-integrations-71 - - - &STEP_RUN_INTEGRATIONS_TESTS_72 - run: - command: composer test-integrations-72 - - - &STEP_RUN_WEB_TESTS_54 - run: - command: composer test-web-54 - - - &STEP_RUN_WEB_TESTS_56 - run: - command: composer test-web-56 - - - &STEP_RUN_WEB_TESTS_70 - run: - command: composer test-web-70 - - - &STEP_RUN_WEB_TESTS_71 - run: - command: composer test-web-71 - - - &STEP_RUN_WEB_TESTS_72 - run: - command: composer test-web-72 - - commands: prepare_extension_and_composer_with_cache: parameters: disable_tls: - description: Disable tla in composer + description: Disable tls in composer type: boolean default: false steps: - <<: *STEP_EXT_INSTALL - - <<: *STEP_COMPOSER_SELF_UPDATE - - <<: *STEP_COMPOSER_CACHE_RESTORE - - <<: *STEP_COMPOSER_INSTALL - when: condition: << disable_tls >> steps: @@ -216,6 +170,10 @@ commands: when: << disable_tls >> name: Disable tls for php < 5.6 (https://stackoverflow.com/questions/47527455/getting-an-error-peer-fingerprint-did-not-match-after-running-composer-update) command: composer config disable-tls + - <<: *STEP_COMPOSER_SELF_UPDATE + - <<: *STEP_COMPOSER_CACHE_RESTORE + - <<: *STEP_COMPOSER_INSTALL + - <<: *STEP_COMPOSER_CACHE_SAVE executors: @@ -306,13 +264,11 @@ jobs: - run: name: Running phpstan command: PATH=$PATH:~/.composer/vendor/bin composer static-analyze + unit_tests: parameters: version: type: string - disable_composer_tls: - type: boolean - default: false working_directory: ~/datadog environment: DDAGENT_HOSTNAME: 127.0.0.1 @@ -323,7 +279,7 @@ jobs: - checkout - <<: *STEP_ATTACH_WORKSPACE - prepare_extension_and_composer_with_cache: - disable_tls: << parameters.disable_composer_tls >> + disable_tls: true # disabled by default due to test flakiness - <<: *STEP_PREPARE_TEST_RESULTS_DIR - <<: *STEP_EXPORT_CI_ENV - <<: *STEP_RUN_EXTENSION_TESTS @@ -337,44 +293,8 @@ jobs: parameters: image_tag: type: string - integration_tests_version: - type: string - disable_composer_tls: - type: boolean - default: false - executor: - name: with_integrations - tag: << parameters.image_tag >> - steps: - - checkout - - <<: *STEP_ATTACH_WORKSPACE - - prepare_extension_and_composer_with_cache: - disable_tls: << parameters.disable_composer_tls >> - - <<: *STEP_PREPARE_TEST_RESULTS_DIR - - <<: *STEP_EXPORT_CI_ENV - - <<: *STEP_WAIT_AGENT - - <<: *STEP_WAIT_MYSQL - - <<: *STEP_WAIT_MONGODB - - <<: *STEP_WAIT_REQUEST_REPLAYER - - <<: *STEP_RUN_UNIT_TESTS - - <<: *STEP_RUN_AUTO_INSTRUMENTATION_TESTS - - <<: *STEP_RUN_INTEGRATION_TESTS - - run: - name: Run integrsation test specific to << parameters.integration_tests_version >> - command: composer test-integrations-<< parameters.integration_tests_version >> - - <<: *STEP_PERSIST_TO_WORKSPACE - - <<: *STEP_STORE_TEST_RESULTS - - <<: *STEP_STORE_ARTIFACTS -web_integration_tests: - working_directory: ~/datadog - parameters: - image_tag: - type: string - integration_tests_version: + integration_testsuite: type: string - disable_composer_tls: - type: boolean - default: false executor: name: with_integrations tag: << parameters.image_tag >> @@ -382,19 +302,18 @@ web_integration_tests: - checkout - <<: *STEP_ATTACH_WORKSPACE - prepare_extension_and_composer_with_cache: - disable_tls: << parameters.disable_composer_tls >> + disable_tls: true # disabled by default due to test flakiness - <<: *STEP_PREPARE_TEST_RESULTS_DIR - <<: *STEP_EXPORT_CI_ENV - <<: *STEP_WAIT_AGENT - <<: *STEP_WAIT_MYSQL - <<: *STEP_WAIT_MONGODB - <<: *STEP_WAIT_REQUEST_REPLAYER - - <<: *STEP_RUN_UNIT_TESTS - <<: *STEP_RUN_AUTO_INSTRUMENTATION_TESTS - <<: *STEP_RUN_INTEGRATION_TESTS - run: - name: Run integrsation test specific to << parameters.integration_tests_version >> - command: composer test-web-<< parameters.integration_tests_version >> + name: Integration test + command: composer << parameters.integration_testsuite >> - <<: *STEP_PERSIST_TO_WORKSPACE - <<: *STEP_STORE_TEST_RESULTS - <<: *STEP_STORE_ARTIFACTS @@ -535,7 +454,6 @@ workflows: - unit_tests: name: "Unit tests 54" version: "5.4" - disable_composer_tls: true - unit_tests: name: "Unit tests 56" version: "5.6" @@ -552,54 +470,52 @@ workflows: # name: "Unit tests 73" # version: "7.3" # TODO: unit test for 7.3 are failing due to memory leaks - 7.3 not yet officially supported - integration_tests: - name: "Integration tests 54" + name: "Intg tests 54" image_tag: "ddtrace_alpine_php-5.4-debug" - integration_tests_version: "54" - disable_composer_tls: true + integration_testsuite: "test-integrations-54" - integration_tests: - name: "Integration tests 56" - integration_tests_version: "56" + name: "Intg tests 56" + integration_testsuite: "test-integrations-56" image_tag: "ddtrace_alpine_php-5.6-debug" - integration_tests: - name: "Integration tests 70" - integration_tests_version: "70" + name: "Intg tests 70" + integration_testsuite: "test-integrations-70" image_tag: "ddtrace_php_7_0" - integration_tests: - name: "Integration tests 71" - integration_tests_version: "71" + name: "Intg tests 71" + integration_testsuite: "test-integrations-71" image_tag: "ddtrace_php_7_1" - integration_tests: - name: "Integration tests 72" - integration_tests_version: "72" + name: "Intg tests 72" + integration_testsuite: "test-integrations-72" image_tag: "ddtrace_php_7_2" - integration_tests: - name: "Integration tests 73" - integration_tests_version: "72" # not yet defined for 7.3 - image_tag: "ddtrace_alpine_php-7.3" - - web_integration_tests: - name: "Integration tests 54" + name: "Intg tests 73" + integration_testsuite: "test-integrations-72" # not yet defined for 7.3 + image_tag: "ddtrace_alpine_php-7.3-debug" + - integration_tests: + name: "Web tests 54" image_tag: "ddtrace_alpine_php-5.4-debug" - integration_tests_version: "54" - disable_composer_tls: true - - web_integration_tests: - name: "Integration tests 56" - integration_tests_version: "56" + integration_testsuite: "test-web-54" + - integration_tests: + name: "Web tests 56" + integration_testsuite: "test-web-56" image_tag: "ddtrace_alpine_php-5.6-debug" - - web_integration_tests: - name: "Integration tests 70" - integration_tests_version: "70" + - integration_tests: + name: "Web tests 70" + integration_testsuite: "test-web-70" image_tag: "ddtrace_php_7_0" - - web_integration_tests: - name: "Integration tests 71" - integration_tests_version: "71" + - integration_tests: + name: "Web tests 71" + integration_testsuite: "test-web-71" image_tag: "ddtrace_php_7_1" - - web_integration_tests: - name: "Integration tests 72" - integration_tests_version: "72" + - integration_tests: + name: "Web tests 72" + integration_testsuite: "test-web-72" image_tag: "ddtrace_php_7_2" - - web_integration_tests: - name: "Integration tests 73" - integration_tests_version: "72" # not yet defined for 7.3 - image_tag: "ddtrace_alpine_php-7.3" + - integration_tests: + name: "Web tests 73" + integration_testsuite: "test-web-72" # not yet defined for 7.3 + image_tag: "ddtrace_alpine_php-7.3-debug" - "Lint files" - "Static Analysis"