summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-04-11 15:51:31 +0200
committerRémy Coutable <remy@rymai.me>2018-04-11 23:07:05 +0200
commitd8a58f62bf9ef690b2398c00ae9b3e78071a655b (patch)
tree40763dd121e64196b70a352014e0b56137df4ba9
parent947ed8b88281a618530ae30bc0fe1e3d61a3c1d9 (diff)
downloadgitlab-ce-d8a58f62bf9ef690b2398c00ae9b3e78071a655b.tar.gz
Fix scripts/prune-old-flaky-specs requires Bundler to run
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--.gitlab-ci.yml4
-rwxr-xr-xscripts/prune-old-flaky-specs5
2 files changed, 7 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3a97777e99f..71ddebef662 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -364,11 +364,11 @@ update-tests-metadata:
- rspec_flaky/
policy: push
script:
- - retry gem install fog-aws mime-types
+ - retry gem install fog-aws mime-types activesupport
- scripts/merge-reports ${KNAPSACK_RSPEC_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/rspec-pg_node_*.json
- scripts/merge-reports ${KNAPSACK_SPINACH_SUITE_REPORT_PATH} knapsack/${CI_PROJECT_NAME}/spinach-pg_node_*.json
- scripts/merge-reports ${FLAKY_RSPEC_SUITE_REPORT_PATH} rspec_flaky/all_*_*.json
- - scripts/prune-old-flaky-specs ${FLAKY_RSPEC_SUITE_REPORT_PATH}
+ - FLAKY_RSPEC_GENERATE_REPORT=1 scripts/prune-old-flaky-specs ${FLAKY_RSPEC_SUITE_REPORT_PATH}
- '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $KNAPSACK_RSPEC_SUITE_REPORT_PATH $KNAPSACK_SPINACH_SUITE_REPORT_PATH'
- '[[ -z ${TESTS_METADATA_S3_BUCKET} ]] || scripts/sync-reports put $TESTS_METADATA_S3_BUCKET $FLAKY_RSPEC_SUITE_REPORT_PATH'
- rm -f knapsack/${CI_PROJECT_NAME}/*_node_*.json
diff --git a/scripts/prune-old-flaky-specs b/scripts/prune-old-flaky-specs
index ab03a0230cc..f7451fbd428 100755
--- a/scripts/prune-old-flaky-specs
+++ b/scripts/prune-old-flaky-specs
@@ -1,5 +1,10 @@
#!/usr/bin/env ruby
+# lib/rspec_flaky/flaky_examples_collection.rb is requiring
+# `active_support/hash_with_indifferent_access`, and we install the `activesupport`
+# gem manually on the CI
+require 'rubygems'
+
require_relative '../lib/rspec_flaky/report'
report_file = ARGV.shift