Merge branch 'cronjob-as-gitlab-ci' into 'master'

Move cron job from root to the gitlab-ci user

With the new gitlab-rake wrapper it is no longer necessary to use root's crontab.

See merge request !367
This commit is contained in:
Marin Jankovski 2015-06-08 08:41:15 +00:00
commit 4b9926b8c0
1 changed files with 7 additions and 0 deletions

View File

@ -15,8 +15,15 @@
# limitations under the License.
#
# Remove the old cronjob from root's crontab
cron 'gitlab-ci schedule builds' do
user 'root'
action :delete
end
cron 'gitlab-ci schedule builds' do
minute node['gitlab']['gitlab-ci']['schedule_builds_minute']
command '/opt/gitlab/bin/gitlab-ci-rake schedule_builds'
user node['gitlab']['gitlab-ci']['username']
action node['gitlab']['gitlab-ci']['enable'] ? :create : :delete
end