diff options
author | Dimitrie Hoekstra <dimitrie@gitlab.com> | 2017-03-17 17:04:51 +0000 |
---|---|---|
committer | Dimitrie Hoekstra <dimitrie@gitlab.com> | 2017-03-17 17:04:51 +0000 |
commit | b6bab6ce47813c67ea1e2c7d4fde7d9e320da99c (patch) | |
tree | 6c1b7db2aeebc5756c73842cffef22df655cc820 /.gitlab-ci.yml | |
parent | 116efdaf128ddcccc30fb82615cd964b35cacc53 (diff) | |
parent | bb1620aaf712c22c61fda098260f481ad79a05e2 (diff) | |
download | gitlab-ce-focus-mode-board.tar.gz |
Merge branch 'master' into 'focus-mode-board'focus-mode-board
# Conflicts:
# app/views/shared/issuable/_filter.html.haml
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index deeb01f9a3c..080d8cd6c7f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,8 +7,6 @@ cache: variables: MYSQL_ALLOW_EMPTY_PASSWORD: "1" - # retry tests only in CI environment - RSPEC_RETRY_RETRY_COUNT: "3" RAILS_ENV: "test" SIMPLECOV: "true" SETUP_DB: "true" @@ -60,7 +58,7 @@ stages: <<: *dedicated-runner <<: *use-db script: - - JOB_NAME=( $CI_BUILD_NAME ) + - JOB_NAME=( $CI_JOB_NAME ) - export CI_NODE_INDEX=${JOB_NAME[1]} - export CI_NODE_TOTAL=${JOB_NAME[2]} - export KNAPSACK_REPORT_PATH=knapsack/rspec_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json @@ -69,16 +67,18 @@ stages: - knapsack rspec "--color --format documentation" artifacts: expire_in: 31d + when: always paths: - - knapsack/ - coverage/ + - knapsack/ + - tmp/capybara/ .spinach-knapsack: &spinach-knapsack stage: test <<: *dedicated-runner <<: *use-db script: - - JOB_NAME=( $CI_BUILD_NAME ) + - JOB_NAME=( $CI_JOB_NAME ) - export CI_NODE_INDEX=${JOB_NAME[1]} - export CI_NODE_TOTAL=${JOB_NAME[2]} - export KNAPSACK_REPORT_PATH=knapsack/spinach_node_${CI_NODE_INDEX}_${CI_NODE_TOTAL}_report.json @@ -87,9 +87,11 @@ stages: - knapsack spinach "-r rerun" || retry '[[ -e tmp/spinach-rerun.txt ]] && bundle exec spinach -r rerun $(cat tmp/spinach-rerun.txt)' artifacts: expire_in: 31d + when: always paths: - - knapsack/ - coverage/ + - knapsack/ + - tmp/capybara/ # Prepare and merge knapsack tests @@ -178,7 +180,7 @@ spinach 9 10: *spinach-knapsack <<: *dedicated-runner stage: test script: - - bundle exec $CI_BUILD_NAME + - bundle exec $CI_JOB_NAME rubocop: <<: *ruby-static-analysis @@ -209,7 +211,7 @@ rake ee_compat_check: - ee_compat_check/repo/ - vendor/ruby artifacts: - name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}_${CI_BUILD_REF}" + name: "${CI_JOB_NAME}_${CI_COMIT_REF_NAME}_${CI_COMMIT_SHA}" when: on_failure expire_in: 10d paths: @@ -222,6 +224,14 @@ rake db:migrate:reset: script: - bundle exec rake db:migrate:reset +rake db:rollback: + stage: test + <<: *use-db + <<: *dedicated-runner + script: + - bundle exec rake db:rollback STEP=120 + - bundle exec rake db:migrate + rake db:seed_fu: stage: test <<: *use-db @@ -320,7 +330,7 @@ migration paths: - sed -i 's/localhost/redis/g' config/resque.yml - bundle install --without postgres production --jobs $(nproc) $FLAGS --retry=3 - bundle exec rake db:drop db:create db:schema:load db:seed_fu - - git checkout $CI_BUILD_REF + - git checkout $CI_COMMIT_SHA - source scripts/prepare_build.sh - bundle exec rake db:migrate @@ -358,7 +368,7 @@ lint:javascript:report: stage: post-test before_script: [] script: - - find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files + - find app/ spec/ -name '*.js' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files - yarn run eslint-report || true # ignore exit code artifacts: name: eslint-report @@ -384,7 +394,6 @@ trigger_docs: - master@gitlab-org/gitlab-ce # Notify slack in the end - notify:slack: stage: post-test <<: *dedicated-runner @@ -392,7 +401,7 @@ notify:slack: SETUP_DB: "false" USE_BUNDLE_INSTALL: "false" script: - - ./scripts/notify_slack.sh "#development" "Build on \`$CI_BUILD_REF_NAME\` failed! Commit \`$(git log -1 --oneline)\` See <https://gitlab.com/gitlab-org/$(basename "$PWD")/commit/"$CI_BUILD_REF"/pipelines>" + - ./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 |