summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2015-09-21 18:33:42 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2015-09-21 18:33:42 +0000
commit534e548d4495e2193af6542ca8d62e7d5a3a223b (patch)
tree18f3defb9477f556fbbaa5a7513b5413e9dac7e1
parentcbdee053b4999f9ac029ac245f4043bd3005048d (diff)
parente0823d189f54ab10244afb8efb8aae22fa2dbbdf (diff)
downloadgitlab-ce-534e548d4495e2193af6542ca8d62e7d5a3a223b.tar.gz
Merge branch 'ci-import-improvements' into 'master'
CI import improvements See merge request !1369
-rw-r--r--lib/ci/migrate/builds.rb2
-rw-r--r--lib/ci/migrate/manager.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/ci/migrate/builds.rb b/lib/ci/migrate/builds.rb
index fdc143cfad5..c4f62e55295 100644
--- a/lib/ci/migrate/builds.rb
+++ b/lib/ci/migrate/builds.rb
@@ -13,7 +13,7 @@ module Ci
backup_existing_builds_dir
FileUtils.mkdir_p(app_builds_dir, mode: 0700)
- unless system('tar', '-C', app_builds_dir, '-zxvf', backup_builds_tarball)
+ unless system('tar', '-C', app_builds_dir, '-zxf', backup_builds_tarball)
abort 'Restore failed'.red
end
end
diff --git a/lib/ci/migrate/manager.rb b/lib/ci/migrate/manager.rb
index 4205809368d..e5e4fb784eb 100644
--- a/lib/ci/migrate/manager.rb
+++ b/lib/ci/migrate/manager.rb
@@ -1,6 +1,8 @@
module Ci
module Migrate
class Manager
+ CI_IMPORT_PREFIX = '8.0' # Only allow imports from CI 8.0.x
+
def cleanup
$progress.print "Deleting tmp directories ... "
@@ -48,7 +50,7 @@ module Ci
ENV["VERSION"] = "#{settings[:db_version]}" if settings[:db_version].to_i > 0
# restoring mismatching backups can lead to unexpected problems
- if settings[:gitlab_version] != GitlabCi::VERSION
+ if !settings[:gitlab_version].start_with?(CI_IMPORT_PREFIX)
puts "GitLab CI version mismatch:".red
puts " Your current GitLab CI version (#{GitlabCi::VERSION}) differs from the GitLab CI (#{settings[:gitlab_version]}) version in the backup!".red
exit 1