diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 102 |
1 files changed, 29 insertions, 73 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e911d7e5b89..aa62a86d31d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,8 +19,8 @@ variables: before_script: - bundle --version - - . scripts/utils.sh - - ./scripts/prepare_build.sh + - source scripts/utils.sh + - source scripts/prepare_build.sh stages: - prepare @@ -253,38 +253,46 @@ spinach mysql 9 10: *spinach-knapsack-mysql SETUP_DB: "false" USE_BUNDLE_INSTALL: "true" -.exec: &exec +.rake-exec: &rake-exec <<: *ruby-static-analysis <<: *dedicated-runner <<: *except-docs stage: test script: - - bundle exec $CI_JOB_NAME + - bundle exec rake $CI_JOB_NAME -rubocop: +static-analysis: <<: *ruby-static-analysis <<: *dedicated-runner - <<: *except-docs stage: test script: - - bundle exec "rubocop --require rubocop-rspec" - -rake haml_lint: *exec -rake scss_lint: *exec -rake config_lint: *exec -rake brakeman: *exec -rake flay: *exec -license_finder: *exec -rake downtime_check: - <<: *exec + - scripts/static-analysis + +docs:check:links: + image: "registry.gitlab.com/gitlab-org/gitlab-build-images:nanoc-bootstrap-ruby-2.4-alpine" + stage: test + <<: *dedicated-runner + cache: {} + dependencies: [] + before_script: [] + script: + - mv doc/ /nanoc/content/ + - cd /nanoc + # Build HTML from Markdown + - bundle exec nanoc + # Check the internal links + - bundle exec nanoc check internal_links + +downtime_check: + <<: *rake-exec except: - master - tags - /^[\d-]+-stable(-ee)?$/ - /^docs\/*/ -rake ee_compat_check: - <<: *exec +ee_compat_check: + <<: *rake-exec only: - branches@gitlab-org/gitlab-ce except: @@ -306,22 +314,22 @@ rake ee_compat_check: .db-migrate-reset: &db-migrate-reset stage: test <<: *dedicated-runner + <<: *except-docs script: - bundle exec rake db:migrate:reset 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 <<: *dedicated-runner + <<: *except-docs script: - bundle exec rake db:rollback STEP=120 - bundle exec rake db:migrate @@ -329,16 +337,15 @@ 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 <<: *dedicated-runner + <<: *except-docs variables: SIZE: "1" SETUP_DB: "false" @@ -356,12 +363,10 @@ 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 @@ -402,31 +407,6 @@ rake karma: paths: - coverage-javascript/ -docs:check:apilint: - image: "phusion/baseimage" - stage: test - <<: *dedicated-runner - cache: {} - dependencies: [] - before_script: [] - script: - - scripts/lint-doc.sh - -docs:check:links: - image: "registry.gitlab.com/gitlab-org/gitlab-build-images:nanoc-bootstrap-ruby-2.4-alpine" - stage: test - <<: *dedicated-runner - cache: {} - dependencies: [] - before_script: [] - script: - - mv doc/ /nanoc/content/ - - cd /nanoc - # Build HTML from Markdown - - bundle exec nanoc - # Check the internal links - - bundle exec nanoc check internal_links - bundler:audit: stage: test <<: *ruby-static-analysis @@ -485,14 +465,6 @@ coverage: - coverage/index.html - coverage/assets/ -lint:javascript: - <<: *dedicated-runner - <<: *except-docs - stage: test - before_script: [] - script: - - yarn run eslint - lint:javascript:report: <<: *dedicated-runner <<: *except-docs @@ -526,22 +498,6 @@ trigger_docs: - master@gitlab-org/gitlab-ce - master@gitlab-org/gitlab-ee -# Notify slack in the end -notify:slack: - stage: post-test - <<: *dedicated-runner - variables: - SETUP_DB: "false" - USE_BUNDLE_INSTALL: "false" - script: - - ./scripts/notify_slack.sh "#development" "Build on \`$CI_COMMIT_REF_NAME\` failed! Commit \`$(git log -1 --oneline)\` See <https://gitlab.com/gitlab-org/$(basename "$PWD")/commit/"$CI_COMMIT_SHA"/pipelines>" - when: on_failure - only: - - master@gitlab-org/gitlab-ce - - tags@gitlab-org/gitlab-ce - - master@gitlab-org/gitlab-ee - - tags@gitlab-org/gitlab-ee - pages: before_script: [] stage: pages |