From 1df3932ecee6432aa26b67129d40ace13903cc6f Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 14 Feb 2017 08:03:40 -0600 Subject: [PATCH] Run track-upstream in a cronjob After removing track-upstream from manage-projects, we need to run track-upstream regularly. Add an hourly cronjob that will take care of upstream tracking. Change-Id: I7f5cb770e2af65fc2db9626eb1c8f01c3f3a64f1 Depends-On: I454b1ba400dc86abcc9b939564eb4eb7c324308c --- doc/source/jeepyb.rst | 2 +- modules/openstack_project/manifests/gerrit.pp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/source/jeepyb.rst b/doc/source/jeepyb.rst index af30d10481..2c992412d6 100644 --- a/doc/source/jeepyb.rst +++ b/doc/source/jeepyb.rst @@ -179,7 +179,7 @@ Manage Projects --------------- Some projects may have upstreams defined in Jeepyb; the -``manage-projects`` cron job will update these remotes so that their +``track-upstream`` cron job will update these remotes so that their commits are available in Gerrit. It will also ensure that project metadata is set up as defined in projects.yaml. diff --git a/modules/openstack_project/manifests/gerrit.pp b/modules/openstack_project/manifests/gerrit.pp index dccddee3e7..335069e968 100644 --- a/modules/openstack_project/manifests/gerrit.pp +++ b/modules/openstack_project/manifests/gerrit.pp @@ -468,6 +468,16 @@ class openstack_project::gerrit ( Class['jeepyb'], ], } + cron { 'track_upstream': + user => 'root', + hour => '*', + command => '/usr/local/bin/track-upstream -v -l /var/log/track_upstream.log', + environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin', + require => [ + File['/home/gerrit2/projects.yaml'], + Class['jeepyb'], + ], + } include logrotate logrotate::file { 'manage_projects.log':