Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-28 19:13:59 +0300
committerRémy Coutable <remy@rymai.me>2016-11-10 12:40:47 +0300
commit88edbd11a92d35af1311facff94756bb32dca0d7 (patch)
tree6f0baca881b6283dafd37cf9b6aa8238ce38269b /lib/tasks
parent0c99e5d0b6b457ef7db2c36f1394fad5c63d1142 (diff)
Improve EeCompatCheck, cache EE repo and keep artifacts for the ee_compat_check task
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/dev.rake26
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/tasks/gitlab/dev.rake b/lib/tasks/gitlab/dev.rake
index 5ee99dfc810..3117075b08b 100644
--- a/lib/tasks/gitlab/dev.rake
+++ b/lib/tasks/gitlab/dev.rake
@@ -1,18 +1,22 @@
namespace :gitlab do
namespace :dev do
desc 'Checks if the branch would apply cleanly to EE'
- task ee_compat_check: :environment do
- return if defined?(Gitlab::License)
- return unless ENV['CI']
+ task :ee_compat_check, [:branch] => :environment do |_, args|
+ opts =
+ if ENV['CI']
+ {
+ branch: ENV['CI_BUILD_REF_NAME'],
+ ce_repo: ENV['CI_BUILD_REPO']
+ }
+ else
+ unless args[:branch]
+ puts "Must specify a branch as an argument".color(:red)
+ exit 1
+ end
+ args
+ end
- success =
- Gitlab::EeCompatCheck.new(
- branch: ENV['CI_BUILD_REF_NAME'],
- check_dir: File.expand_path('ee-compat-check', __dir__),
- ce_repo: ENV['CI_BUILD_REPO']
- ).check
-
- if success
+ if Gitlab::EeCompatCheck.new(opts || {}).check
exit 0
else
exit 1