Skip to content
Snippets Groups Projects
Commit cb579f79 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Merge remote-tracking branch 'origin/master' into 8-0-stable

parents 2c80e8fa 96b17c17
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -154,7 +154,7 @@ If you are courageous enough, you can make it fully open and accept everything:
```
[runners.docker]
image = "ruby:2.1"
allowed_images = ["*", "*/*"]
allowed_images = ["*", "*/*", "*/*/*"]
allowed_services = ["*", "*/*"]
```
 
Loading
Loading
@@ -200,4 +200,4 @@ The build_script is piped using STDIN to bash interpreter which executes the bui
docker rm -f -v build service-mysql service-postgres
```
This will forcefully (the `-f` switch) remove build container and service containers
and all volumes (the `-v` switch) that were created with the container creation.
and all volumes (the `-v` switch) that were created with the container creation.
\ No newline at end of file
Loading
Loading
@@ -30,7 +30,7 @@ module Backup
# default behavior of tar is to talk to a tape device instead of
# stdin/stdout.
system(
*%W(tar -C #{app_builds_dir} -xzf - -- .),
*%W(tar -C #{app_builds_dir} -xzf -),
in: backup_builds_tarball
)
end
Loading
Loading
Loading
Loading
@@ -19,17 +19,16 @@ module Backup
 
# create archive
$progress.print "Creating backup archive: #{tar_file} ... "
orig_umask = File.umask(0077)
if Kernel.system('tar', '-cf', tar_file, *backup_contents)
$progress.puts "done".green
else
puts "creating archive #{tar_file} failed".red
abort 'Backup failed'
end
File.umask(orig_umask)
 
upload(tar_file)
end
File.join(GitlabCi.config.backup.path, tar_file)
end
 
def upload(tar_file)
Loading
Loading
Loading
Loading
@@ -18,9 +18,40 @@ namespace :backup do
$progress.puts "done".green
 
backup = Backup::Manager.new
backup.pack
tar_file = backup.pack
backup.cleanup
backup.remove_old
# Relax backup directory permissions to make the migration easier
File.chmod(0755, GitlabCi.config.backup.path)
$progress.puts "\n\nYour final CI export is in the following file:\n\n"
system(*%W(ls -lh #{tar_file}))
$progress.puts
end
desc "GITLAB | Show database secrets"
task show_secrets: :environment do
configure_cron_mode
$progress.puts <<-EOS
If you are moving to a GitLab installation installed from source, replace the
contents of /home/git/gitlab/config/secrets.yml with the following:
---
production:
db_key_base: #{JSON.dump(GitlabCi::Application.secrets.db_key_base)}
If your GitLab server uses Omnibus packages, add the following line to
/etc/gitlab/gitlab.rb:
gitlab_rails['db_key_base'] = #{GitlabCi::Application.secrets.db_key_base.inspect}
EOS
end
 
desc "GITLAB | Restore a previously created backup"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment