diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-07-25 10:17:36 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-07-25 10:17:36 +0300 |
commit | eeb7206c276c1b0a357360f6c25bad7073bbcaa2 (patch) | |
tree | 78ab6ca464991accf5a9ef5a206004144fbd6f74 /.gitlab-ci.yml | |
parent | bf0be1ad00e3c2657c2e5d66ec86824d859aa2fb (diff) | |
parent | f5f9f1a771b936e44152fbddb40c0b078a9baff1 (diff) |
Merge branch 'pks-ci-drop-docs-only-optimization' into 'master'
ci: Drop optimization to run tests with code changes only
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6115
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c088fc3f3..b97e7ed6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -138,31 +138,11 @@ workflow: when: always expire_in: 1 week -.only_code_changes: &only_code_changes - changes: - - "**.go" - - "**.proto" - - "**.sql" - - "{,**/}go.{mod,sum}" - - Makefile - - .gitlab-ci.yml - .rules_run_always: &rules_run_always - if: $CI_MERGE_REQUEST_IID - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: '$CI_COMMIT_BRANCH =~ /^[\d-]+-stable$/' -.rules_run_on_code_change: &rules_run_on_code_change - - if: $CI_MERGE_REQUEST_IID - <<: *only_code_changes - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - <<: *only_code_changes - - if: '$CI_COMMIT_BRANCH =~ /^[\d-]+-stable$/' - <<: *only_code_changes - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - when: manual - allow_failure: true - .rules_run_on_merge: &rules_run_on_merge # We only execute these rules in the main Gitaly repository. This is # because jobs which run conditionally when being merged may depend on @@ -208,8 +188,8 @@ build: - GO_VERSION: [ "1.20" ] TEST_BOOT_ARGS: "--bundled-git" - GIT_VERSION: "v2.41.0" - only: - <<: *only_code_changes + rules: + - *rules_run_always build:binaries: needs: [] @@ -217,8 +197,6 @@ build:binaries: cache: - *cache_deps_configuration - *cache_go_configuration - only: - - tags script: # Just in case we start running CI builds on other architectures in future - go version @@ -233,8 +211,9 @@ build:binaries: parallel: matrix: - GO_VERSION: [ "1.20" ] - only: - <<: *only_code_changes + rules: + - *rules_run_always + - if: $CI_COMMIT_TAG test: <<: *test_definition @@ -256,7 +235,7 @@ test: - POSTGRES_VERSION: "11-alpine" TEST_TARGET: [ test, test-with-praefect ] rules: - - *rules_run_on_code_change + - *rules_run_always test:pgbouncer: <<: *test_definition @@ -287,7 +266,7 @@ test:pgbouncer: # can reach Postgres. TEST_TARGET: "test-with-praefect" rules: - - *rules_run_on_code_change + - *rules_run_always test:nightly: <<: *test_definition @@ -311,7 +290,7 @@ test:praefect_smoke: - ./_build/bin/praefect -config config.praefect.toml sql-ping - ./_build/bin/praefect -config config.praefect.toml sql-migrate rules: - - *rules_run_on_code_change + - *rules_run_always test:sha256: @@ -321,7 +300,7 @@ test:sha256: - TEST_TARGET: [ test, test-with-praefect ] TEST_WITH_SHA256: "YesPlease" rules: - - *rules_run_on_code_change + - *rules_run_always test:fips: @@ -428,7 +407,7 @@ verify: - proto/go/gitalypb/* when: on_failure rules: - - *rules_run_on_code_change + - *rules_run_always dbschema: needs: [] @@ -449,7 +428,7 @@ dbschema: - _support/praefect-schema.sql when: on_failure rules: - - *rules_run_on_code_change + - *rules_run_always semgrep-sast: needs: [] @@ -459,7 +438,7 @@ semgrep-sast: rules: - if: $SAST_DISABLED when: never - - *rules_run_on_code_change + - *rules_run_always license_scanning: needs: [] |