Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
534e548d
Commit
534e548d
authored
Sep 21, 2015
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ci-import-improvements' into 'master'
CI import improvements See merge request !1369
parents
cbdee053
e0823d18
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
lib/ci/migrate/builds.rb
lib/ci/migrate/builds.rb
+1
-1
lib/ci/migrate/manager.rb
lib/ci/migrate/manager.rb
+3
-1
No files found.
lib/ci/migrate/builds.rb
View file @
534e548d
...
@@ -13,7 +13,7 @@ module Ci
...
@@ -13,7 +13,7 @@ module Ci
backup_existing_builds_dir
backup_existing_builds_dir
FileUtils
.
mkdir_p
(
app_builds_dir
,
mode:
0700
)
FileUtils
.
mkdir_p
(
app_builds_dir
,
mode:
0700
)
unless
system
(
'tar'
,
'-C'
,
app_builds_dir
,
'-zx
v
f'
,
backup_builds_tarball
)
unless
system
(
'tar'
,
'-C'
,
app_builds_dir
,
'-zxf'
,
backup_builds_tarball
)
abort
'Restore failed'
.
red
abort
'Restore failed'
.
red
end
end
end
end
...
...
lib/ci/migrate/manager.rb
View file @
534e548d
module
Ci
module
Ci
module
Migrate
module
Migrate
class
Manager
class
Manager
CI_IMPORT_PREFIX
=
'8.0'
# Only allow imports from CI 8.0.x
def
cleanup
def
cleanup
$progress
.
print
"Deleting tmp directories ... "
$progress
.
print
"Deleting tmp directories ... "
...
@@ -48,7 +50,7 @@ module Ci
...
@@ -48,7 +50,7 @@ module Ci
ENV
[
"VERSION"
]
=
"
#{
settings
[
:db_version
]
}
"
if
settings
[
:db_version
].
to_i
>
0
ENV
[
"VERSION"
]
=
"
#{
settings
[
:db_version
]
}
"
if
settings
[
:db_version
].
to_i
>
0
# restoring mismatching backups can lead to unexpected problems
# 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
"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
puts
" Your current GitLab CI version (
#{
GitlabCi
::
VERSION
}
) differs from the GitLab CI (
#{
settings
[
:gitlab_version
]
}
) version in the backup!"
.
red
exit
1
exit
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment