diff options
author | Varac <varac@leap.se> | 2017-02-23 20:08:44 +0000 |
---|---|---|
committer | Varac <varac@leap.se> | 2017-02-23 20:08:44 +0000 |
commit | ec0aca98c1ce2af5d85432dc041e6a092b77b458 (patch) | |
tree | 0386b0cac1808a7151b4ced541d4c1bd9afe0331 /puppet/modules | |
parent | ab5f9ccfe525e39dc1d6c77f12ad68878038f2c0 (diff) | |
parent | 15d2a330d3382306b80e3bd773604f0a6f0c79d5 (diff) |
Merge branch 'clean_vcsrepo' into 'master'
Cleanup modified Gemfile.lock before pulling nickserver vcsrepo
Closes #8492
See merge request !71
Diffstat (limited to 'puppet/modules')
-rw-r--r-- | puppet/modules/site_nickserver/manifests/init.pp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/puppet/modules/site_nickserver/manifests/init.pp b/puppet/modules/site_nickserver/manifests/init.pp index 12236b3b..8ef47b07 100644 --- a/puppet/modules/site_nickserver/manifests/init.pp +++ b/puppet/modules/site_nickserver/manifests/init.pp @@ -61,21 +61,30 @@ class site_nickserver { require => Group['nickserver']; } + # Eariler we used bundle install without --deployment + exec { 'clean_git_repo': + cwd => '/srv/leap/nickserver', + user => 'nickserver', + command => '/usr/bin/git checkout Gemfile.lock', + onlyif => '/usr/bin/git status | /bin/grep -q "modified: *Gemfile.lock"', + require => Package['git'] + } + vcsrepo { '/srv/leap/nickserver': - ensure => present, + ensure => latest, revision => $sources['nickserver']['revision'], provider => $sources['nickserver']['type'], source => $sources['nickserver']['source'], owner => 'nickserver', group => 'nickserver', - require => [ User['nickserver'], Group['nickserver'] ], + require => [ User['nickserver'], Group['nickserver'], Exec['clean_git_repo'] ], notify => Exec['nickserver_bundler_update']; } exec { 'nickserver_bundler_update': cwd => '/srv/leap/nickserver', - command => '/bin/bash -c "/usr/bin/bundle check || /usr/bin/bundle install --path vendor/bundle"', - unless => '/usr/bin/bundle check', + command => '/usr/bin/bundle install --deployment', + unless => '/bin/bash -c "/usr/bin/bundle config --local frozen 1; /usr/bin/bundle check"', user => 'nickserver', timeout => 600, require => [ |