Skip to content

Commit

Permalink
notify service after installation/migration
Browse files Browse the repository at this point in the history
better upgrade experience with puppet

tested with:
6.9.x  -> 7.12.x
and
7.12.x -> 7.14.x

Refs sbadia#47
  • Loading branch information
toepi committed Oct 1, 2016
1 parent 654a3ff commit 9f4b21c
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@
File["${git_home}/gitlab/config/gitlab.yml"],
Gitlab::Config::Resque['gitlab'],
],
notify => Exec['run migrations'],
notify => [
Exec['run migrations'],
Exec['cleanup'],
]
}

exec { 'setup gitlab database':
Expand All @@ -124,9 +127,19 @@

exec { 'run migrations':
command => 'bundle exec rake db:migrate RAILS_ENV=production',
cwd => "${git_home}/gitlab",
refreshonly => true,
notify => Exec['precompile assets'],
cwd => "${git_home}/gitlab",
refreshonly => true,
notify => [
Exec['precompile assets'],
Class['::gitlab::service'],
],
}

exec { 'cleanup':
command => 'bundle clean',
cwd => "${git_home}/gitlab",
refreshonly => true,
notify => Class['::gitlab::service'],
}

file {
Expand Down

0 comments on commit 9f4b21c

Please sign in to comment.