diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-04-27 12:47:36 +0200 |
---|---|---|
committer | Achilleas Pipinellis <axilleas@axilleas.me> | 2017-04-28 12:08:50 +0200 |
commit | 0f327e02d84f2bf0575fc6fec07bcb0ea4bcb964 (patch) | |
tree | bb0e64012980fabd940a4a0e9d862b25201d8ce5 /.gitlab-ci.yml | |
parent | ef518df28adc1366d868cb990952e87f60e8b0eb (diff) | |
download | gitlab-ce-0f327e02d84f2bf0575fc6fec07bcb0ea4bcb964.tar.gz |
Skip irrelevant jobs for documentation only changes
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50f1f65e4e8..e30dd93e860 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,6 +68,12 @@ stages: - //@gitlab-org/gitlab-ee - //@gitlab/gitlab-ee +# Skip all jobs except the ones that begin with 'docs/', for commits +# including ONLY doc changes inside the 'doc/` directory. +.except-docs: &except-docs + except: + - /^docs\/*/ + .rspec-knapsack: &rspec-knapsack stage: test <<: *dedicated-runner @@ -91,11 +97,13 @@ stages: .rspec-knapsack-pg: &rspec-knapsack-pg <<: *rspec-knapsack <<: *use-pg + <<: *except-docs .rspec-knapsack-mysql: &rspec-knapsack-mysql <<: *rspec-knapsack <<: *use-mysql <<: *only-master-and-ee-or-mysql + <<: *except-docs .spinach-knapsack: &spinach-knapsack stage: test @@ -120,16 +128,19 @@ stages: .spinach-knapsack-pg: &spinach-knapsack-pg <<: *spinach-knapsack <<: *use-pg + <<: *except-docs .spinach-knapsack-mysql: &spinach-knapsack-mysql <<: *spinach-knapsack <<: *use-mysql <<: *only-master-and-ee-or-mysql + <<: *except-docs # Prepare and merge knapsack tests knapsack: <<: *knapsack-state <<: *dedicated-runner + <<: *except-docs stage: prepare script: - mkdir -p knapsack/${CI_PROJECT_NAME}/ @@ -156,6 +167,7 @@ update-knapsack: setup-test-env: <<: *use-pg <<: *dedicated-runner + <<: *except-docs stage: prepare script: - node --version @@ -243,6 +255,7 @@ spinach mysql 9 10: *spinach-knapsack-mysql .exec: &exec <<: *ruby-static-analysis <<: *dedicated-runner + <<: *except-docs stage: test script: - bundle exec $CI_JOB_NAME @@ -250,6 +263,7 @@ spinach mysql 9 10: *spinach-knapsack-mysql rubocop: <<: *ruby-static-analysis <<: *dedicated-runner + <<: *except-docs stage: test script: - bundle exec "rubocop --require rubocop-rspec" @@ -266,6 +280,7 @@ rake downtime_check: - master - tags - /^[\d-]+-stable(-ee)?$/ + - /^docs\/*/ rake ee_compat_check: <<: *exec @@ -296,10 +311,12 @@ rake ee_compat_check: rake pg db:migrate:reset: <<: *db-migrate-reset <<: *use-pg + <<: *except-docs rake mysql db:migrate:reset: <<: *db-migrate-reset <<: *use-mysql + <<: *except-docs .db-rollback: &db-rollback stage: test @@ -311,10 +328,12 @@ rake mysql db:migrate:reset: rake pg db:rollback: <<: *db-rollback <<: *use-pg + <<: *except-docs rake mysql db:rollback: <<: *db-rollback <<: *use-mysql + <<: *except-docs .db-seed_fu: &db-seed_fu stage: test @@ -336,14 +355,17 @@ rake mysql db:rollback: rake pg db:seed_fu: <<: *db-seed_fu <<: *use-pg + <<: *except-docs rake mysql db:seed_fu: <<: *db-seed_fu <<: *use-mysql + <<: *except-docs rake gitlab:assets:compile: stage: test <<: *dedicated-runner + <<: *except-docs dependencies: [] variables: NODE_ENV: "production" @@ -367,6 +389,7 @@ rake karma: stage: test <<: *use-pg <<: *dedicated-runner + <<: *except-docs variables: BABEL_ENV: "coverage" script: @@ -447,6 +470,7 @@ coverage: stage: post-test services: [] <<: *dedicated-runner + <<: *except-docs variables: SETUP_DB: "false" USE_BUNDLE_INSTALL: "true" @@ -462,6 +486,7 @@ coverage: lint:javascript: <<: *dedicated-runner + <<: *except-docs stage: test before_script: [] script: @@ -469,6 +494,7 @@ lint:javascript: lint:javascript:report: <<: *dedicated-runner + <<: *except-docs stage: post-test before_script: [] script: |