Skip to content
Snippets Groups Projects
Commit d2c7c732 authored by Jeroen Nijhof's avatar Jeroen Nijhof
Browse files

Merge branch 'extend_cron' into 'master'

Add pre_command for cronjob

See merge request !42
parents 4aac3643 44480708
No related branches found
No related tags found
1 merge request!42Add pre_command for cronjob
# 0.3.13
- Add pre_command for backup cronjob
# 0.3.12
 
- Add sidekiq-cluster service
Loading
Loading
Loading
Loading
@@ -46,3 +46,4 @@ default['omnibus-gitlab']['backup_cron_job']['minute'] = '30'
default['omnibus-gitlab']['backup_cron_job']['weekday'] = nil # defaults to '*', every day
default['omnibus-gitlab']['backup_cron_job']['user'] = 'root'
default['omnibus-gitlab']['backup_cron_job']['enable'] = true
default['omnibus-gitlab']['backup_cron_job']['pre_command'] = ''
Loading
Loading
@@ -4,7 +4,7 @@ maintainer_email 'marin@gitlab.com'
license 'All rights reserved'
description 'Installs/Configures GitLab using omnibus-gitlab'
long_description 'Installs/Configures GitLab using omnibus-gitlab'
version '0.3.12'
version '0.3.13'
issues_url 'https://gitlab.com/gitlab-org/cookbook-omnibus-gitlab/issues'
source_url 'https://gitlab.com/gitlab-org/cookbook-omnibus-gitlab/'
 
Loading
Loading
Loading
Loading
@@ -10,17 +10,9 @@
#
 
backup_cron_job = node['omnibus-gitlab']['backup_cron_job']
pre_command = backup_cron_job['pre_command']
options = ''
 
remote_file '/usr/local/bin/chronic' do
source 'http://habilis.net/cronic/cronic'
owner 'root'
group 'root'
checksum '25d9772e142ebdcaa72433431e26d855ae82b085709faf0d2169b3bda867aeac'
mode '0755'
action :create_if_missing
end
if backup_cron_job['skip'].any?
options << " SKIP=#{backup_cron_job['skip'].join(',')}"
end
Loading
Loading
@@ -28,7 +20,7 @@ end
options << ' CRON=1' if backup_cron_job['silent']
 
cron 'GitLab backup' do
command "/opt/gitlab/bin/gitlab-rake gitlab:backup:create #{options}"
command "#{pre_command}/opt/gitlab/bin/gitlab-rake gitlab:backup:create #{options}"
hour backup_cron_job['hour']
minute backup_cron_job['minute']
weekday backup_cron_job['weekday']
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