BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c9d914a3
Commit
c9d914a3
authored
Sep 15, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix builds directory store
parent
ddde3e3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
.gitignore
.gitignore
+1
-1
builds.rb
lib/backup/builds.rb
+8
-4
No files found.
.gitignore
View file @
c9d914a3
...
...
@@ -42,4 +42,4 @@ rails_best_practices_output.html
/tags
tmp/
vendor/bundle/*
/ci/
builds/*
builds/*
lib/backup/builds.rb
View file @
c9d914a3
...
...
@@ -3,14 +3,18 @@ module Backup
attr_reader
:app_builds_dir
,
:backup_builds_dir
,
:backup_dir
def
initialize
@app_builds_dir
=
File
.
realpath
(
Rails
.
root
.
join
(
'ci/builds'
))
@backup_dir
=
Gitlab
Ci
.
config
.
backup
.
path
@backup_builds_dir
=
File
.
join
(
Gitlab
Ci
.
config
.
backup
.
path
,
'ci/
builds'
)
@app_builds_dir
=
Settings
.
gitlab_ci
.
builds_path
@backup_dir
=
Gitlab
.
config
.
backup
.
path
@backup_builds_dir
=
File
.
join
(
Gitlab
.
config
.
backup
.
path
,
'
builds'
)
end
# Copy builds from builds directory to backup/builds
def
dump
FileUtils
.
mkdir_p
(
backup_builds_dir
)
FileUtils
.
rm_rf
(
backup_builds_dir
)
# Ensure the parent dir of backup_builds_dir exists
FileUtils
.
mkdir_p
(
Gitlab
.
config
.
backup
.
path
)
# Fail if somebody raced to create backup_builds_dir before us
FileUtils
.
mkdir
(
backup_builds_dir
,
mode:
0700
)
FileUtils
.
cp_r
(
app_builds_dir
,
backup_dir
)
end
...
...
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